#ifndef __QBF_H__
#define __QBF_H__

#include <string>
#include <boost/logic/tribool.hpp>
class QBF
{
public:
    enum logical_operator {AND, OR, EQU, XOR};
    enum quantifier {FORALL, EXISTS};
    
    // member 
    unsigned long id;
    boost::logic::tribool status;
    long double prob;
    long double size;
    long double cost;
    QBF* parent;

    /// constructor 
    QBF(void);
    /// destructor
    virtual ~QBF(void);

    // method
    virtual std::string toString() = 0;
    void set_parent(QBF* p);
    virtual void update();
    virtual bool eval() = 0;
    virtual void propagate(unsigned long assigner_id, bool b) = 0; //
    virtual void reset_status(); //

private:
    // method
    virtual void update_prob() = 0;
    virtual void update_size() = 0;
    virtual void update_child_cost() = 0;
};
#endif
