7 #include "functionencoding.h"
8 #include "elementencoding.h"
11 class Element : public ASTNode {
13 Element(ASTNodeType type);
15 Vector<ASTNode *> parents;
16 ElementEncoding encoding;
17 virtual Element *clone(CSolver *solver, CloneMap *map) {ASSERT(0); return NULL;};
21 class ElementConst : public Element {
23 ElementConst(uint64_t value, VarType type, Set *_set);
26 Element *clone(CSolver *solver, CloneMap *map);
30 class ElementSet : public Element {
34 Element *clone(CSolver *solver, CloneMap *map);
38 class ElementFunction : public Element {
40 ElementFunction(Function *function, Element **array, uint numArrays, Boolean *overflowstatus);
42 Array<Element *> inputs;
43 Boolean *overflowstatus;
44 FunctionEncoding functionencoding;
45 Element *clone(CSolver *solver, CloneMap *map);
49 Set *getElementSet(Element *This);
51 static inline ElementEncoding *getElementEncoding(Element *e) {
55 static inline FunctionEncoding *getElementFunctionEncoding(ElementFunction *func) {
56 return &func->functionencoding;