class Literal;

#ifndef __PROP_LITERAL_H__
#define __PROP_LITERAL_H__

#include <vector>
#include <boost/logic/tribool.hpp>
#include "variable.hpp"
#include "qbf_literal.hpp"

class Literal
{
public:
    // member 
    bool truth;
    bool value;
    Variable* var;
    std::vector<QBF_Literal*> parent_list;
    
    // constructor 
    Literal(bool t, Variable* v);
    ~Literal(void);

    // method
    boost::logic::tribool eval();
    static Literal* get_literal(bool t, Variable* v);
    void add_parent(QBF_Literal* p);
    void propagate(unsigned long assigner_id, bool b); //

private:
    // member
    static std::map<Variable*, Literal*> true_literal_map;
    static std::map<Variable*, Literal*> false_literal_map;

};
#endif
