class Variable;

#ifndef __VARIABLE_H__
#define __VARIABLE_H__

#include <string>
#include <map>
#include "literal.hpp"
#include <boost/logic/tribool.hpp>

class Variable
{
public:
    // member
    std::string var_name;
    bool value;

    bool preference;
    bool not_preference;

    long double true_cost;
    long double false_cost;

    Literal* true_literal;
    Literal* false_literal;

    static unsigned long counter;

    void assign_prefered_value();
    void assign_not_prefered_value();

    void propagate(unsigned long assigner_id, bool b); //

    static Variable* get_variable(std::string name);

private:
    // member
    static std::map<std::string, Variable*> var_map;

    // constructor 
    Variable(const std::string x);
    ~Variable();
};
#endif
