3ff404a5be1c4b858c0da3ac66dd79501599ec1c
[satune.git] / src / AST / set.h
1 /*
2  * File:   set.h
3  * Author: hamed
4  *
5  * Created on June 13, 2017, 3:01 PM
6  */
7
8 #ifndef SET_H
9 #define SET_H
10
11 #include "classlist.h"
12 #include "structs.h"
13 #include "mymemory.h"
14
15 class Set {
16 public:
17         Set(VarType t);
18         Set(VarType t, uint64_t *elements, uint num);
19         Set(VarType t, uint64_t lowrange, uint64_t highrange);
20         virtual ~Set();
21         bool exists(uint64_t element);
22         uint getSize();
23         uint64_t getElement(uint index);
24         virtual Set * clone(CSolver * solver, CloneMap *map);
25         
26         VarType type;
27         bool isRange;
28         uint64_t low;//also used to count unique items
29         uint64_t high;
30         Vector<uint64_t> *members;
31         MEMALLOC;
32 };
33
34 #endif/* SET_H */
35