remove redundant sets
[satune.git] / src / AST / set.h
index 6a41815cfe401eabdfbb0c2814dd1b398c125e9f..ca8533153f18cba94c3a4541fa030dbf4a8fdabc 100644 (file)
@@ -11,9 +11,8 @@
 #include "classlist.h"
 #include "structs.h"
 #include "mymemory.h"
-#include "serializable.h"
 
-class Set : public Serializable {
+class Set {
 public:
        Set(VarType t);
        Set(VarType t, uint64_t *elements, uint num);
@@ -23,19 +22,22 @@ public:
        uint getSize();
        VarType getType() {return type;}
        uint64_t getNewUniqueItem() {return low++;}
-       uint64_t getMemberAt(uint index);
        uint64_t getElement(uint index);
+       uint getUnionSize(Set *s);
+       virtual bool isMutableSet() {return false;}
        virtual Set *clone(CSolver *solver, CloneMap *map);
-       virtual void serialize(Serializer* serializer);
+       virtual void serialize(Serializer *serializer);
+       virtual void print();
        CMEMALLOC;
 protected:
        VarType type;
        bool isRange;
-       uint64_t low;//also used to count unique items
+       uint64_t low;   //also used to count unique items
        uint64_t high;
        Vector<uint64_t> *members;
-
+       friend class ElementOpt;
 };
 
+int intcompare(const void *p1, const void *p2);
 #endif/* SET_H */