projects
/
satune.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adding an API for finalizing MutableSet
[satune.git]
/
src
/
AST
/
set.h
diff --git
a/src/AST/set.h
b/src/AST/set.h
index 9303fa843cc059d6bb6348641b7b50b1bde8e431..ef10b39bdaf3dc75830dde6d980a0a155b1293eb 100644
(file)
--- a/
src/AST/set.h
+++ b/
src/AST/set.h
@@
-13,22
+13,30
@@
#include "mymemory.h"
class Set {
#include "mymemory.h"
class Set {
-
public:
+public:
Set(VarType t);
Set(VarType t, uint64_t *elements, uint num);
Set(VarType t, uint64_t lowrange, uint64_t highrange);
Set(VarType t);
Set(VarType t, uint64_t *elements, uint num);
Set(VarType t, uint64_t lowrange, uint64_t highrange);
- ~Set();
+
virtual
~Set();
bool exists(uint64_t element);
uint getSize();
bool exists(uint64_t element);
uint getSize();
+ VarType getType() {return type;}
+ uint64_t getNewUniqueItem() {return low++;}
+ uint64_t getMemberAt(uint index);
uint64_t getElement(uint index);
uint64_t getElement(uint index);
-
+ virtual bool isMutableSet() {return false;}
+ virtual Set *clone(CSolver *solver, CloneMap *map);
+ virtual void serialize(Serializer* serializer);
+ CMEMALLOC;
+protected:
VarType type;
bool isRange;
uint64_t low;//also used to count unique items
uint64_t high;
Vector<uint64_t> *members;
VarType type;
bool isRange;
uint64_t low;//also used to count unique items
uint64_t high;
Vector<uint64_t> *members;
- MEMALLOC;
+
};
};
+int intcompare(const void *p1, const void *p2);
#endif/* SET_H */
#endif/* SET_H */