7 #include "functionencoding.h"
8 #include "elementencoding.h"
11 #define GETELEMENTTYPE(o) GETASTNODETYPE(o)
12 #define GETELEMENTPARENTS(o) (&((Element*)o)->parents)
16 VectorASTNode parents;
22 ElementEncoding encoding;
25 struct ElementFunction {
29 Boolean * overflowstatus;
30 FunctionEncoding functionencoding;
31 ElementEncoding domainencoding;
34 Element * allocElementSet(Set *s);
35 Element* allocElementFunction(Function * function, Element ** array, uint numArrays, Boolean * overflowstatus);
36 void deleteElement(Element *This);
38 inline ElementEncoding* getElementEncoding(Element* This){
39 switch(GETELEMENTTYPE(This)){
41 return &((ElementSet*)This)->encoding;
43 return &((ElementFunction*)This)->domainencoding;
50 uint getElementSize(Element* This);
51 Constraint * getElementValueConstraint(Element* This, uint64_t value);