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;};
22 class ElementConst : public Element {
24 ElementConst(uint64_t value, VarType type, Set *_set);
27 Element *clone(CSolver *solver, CloneMap *map);
31 class ElementSet : public Element {
35 Element *clone(CSolver *solver, CloneMap *map);
39 class ElementFunction : public Element {
41 ElementFunction(Function *function, Element **array, uint numArrays, BooleanEdge overflowstatus);
43 Array<Element *> inputs;
44 BooleanEdge overflowstatus;
45 FunctionEncoding functionencoding;
46 Element *clone(CSolver *solver, CloneMap *map);
50 Set *getElementSet(Element *This);
52 static inline ElementEncoding *getElementEncoding(Element *e) {
56 static inline FunctionEncoding *getElementFunctionEncoding(ElementFunction *func) {
57 return &func->functionencoding;