7 #include "functionencoding.h"
8 #include "elementencoding.h"
11 #define GETELEMENTTYPE(o) GETASTNODETYPE(o)
12 #define GETELEMENTPARENTS(o) (&((Element*)o)->parents)
15 VectorASTNode parents;
21 ElementEncoding encoding;
24 struct ElementFunction {
28 Boolean * overflowstatus;
29 FunctionEncoding functionencoding;
30 ElementEncoding domainencoding;
33 Element * allocElementSet(Set *s);
34 Element* allocElementFunction(Function * function, Element ** array, uint numArrays, Boolean * overflowstatus);
35 void deleteElement(Element *This);
36 Set* getElementSet(Element* This);
37 static inline ElementEncoding* getElementEncoding(Element* This){
38 switch(GETELEMENTTYPE(This)){
40 return &((ElementSet*)This)->encoding;
42 return &((ElementFunction*)This)->domainencoding;
50 static inline FunctionEncoding* getElementFunctionEncoding(ElementFunction* func){
51 return &func->functionencoding;
54 uint getElemEncodingInUseVarsSize(ElementEncoding* This);
55 Constraint * getElementValueBinaryIndexConstraint(Element* This, uint64_t value);