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;};
18 virtual void updateParents() {}
23 class ElementConst : public Element {
25 ElementConst(uint64_t value, VarType type, Set *_set);
28 Element *clone(CSolver *solver, CloneMap *map);
32 class ElementSet : public Element {
36 Element *clone(CSolver *solver, CloneMap *map);
40 class ElementFunction : public Element {
42 ElementFunction(Function *function, Element **array, uint numArrays, BooleanEdge overflowstatus);
44 Array<Element *> inputs;
45 BooleanEdge overflowstatus;
46 FunctionEncoding functionencoding;
47 Element *clone(CSolver *solver, CloneMap *map);
52 Set *getElementSet(Element *This);
54 static inline ElementEncoding *getElementEncoding(Element *e) {
58 static inline FunctionEncoding *getElementFunctionEncoding(ElementFunction *func) {
59 return &func->functionencoding;