Merging + fixing memory bugs
[satune.git] / src / AST / boolean.h
index 9864d9bb3d39ff7ffcebb8ac01df2e5d93a9db80..dd1b58050a3454b68e72f9e627dbb8b4e6c73f9f 100644 (file)
@@ -11,6 +11,8 @@
 #include "serializer.h"
 
 class Boolean : public ASTNode {
+private:
+       static uint64_t counter;
 public:
        Boolean(ASTNodeType _type);
        virtual ~Boolean() {}
@@ -21,9 +23,9 @@ public:
        virtual bool isFalse() {return boolVal == BV_MUSTBEFALSE;}
        Polarity polarity;
        BooleanValue boolVal;
-       Vector<Boolean *> parents;
+       Vector<ASTNode *> parents;
        virtual void updateParents() {}
-
+       uint64_t id;
        CMEMALLOC;
 };
 
@@ -33,7 +35,7 @@ public:
        Boolean *clone(CSolver *solver, CloneMap *map);
        bool isTrue() {return istrue;}
        bool isFalse() {return !istrue;}
-       void serialize(Serializer *serializer ) {};
+       void serialize(Serializer *serializer );
        virtual void print();
        bool istrue;
        CMEMALLOC;
@@ -56,6 +58,7 @@ public:
        Boolean *clone(CSolver *solver, CloneMap *map);
        void serialize(Serializer *serializer );
        virtual void print();
+       void updateParents();
 
        Order *order;
        uint64_t first;