1 #ifndef FUNCTIONENCODING_H
2 #define FUNCTIONENCODING_H
5 enum FunctionEncodingType {
6 FUNC_UNASSIGNED, ENUMERATEIMPLICATIONS, CIRCUIT
9 typedef enum FunctionEncodingType FunctionEncodingType;
11 union ElementPredicate {
16 typedef union ElementPredicate ElementPredicate;
18 struct FunctionEncoding {
19 FunctionEncodingType type;
20 bool isFunction;//true for function, false for predicate
24 inline FunctionEncoding* getFunctionEncoding(ASTNode func){
25 switch(GETASTNODETYPE(func)){
27 return &((ElementFunction*)func)->functionencoding;
29 return &((BooleanPredicate*)func)->encoding;
36 void initFunctionEncoding(FunctionEncoding *encoding, Element *function);
37 void initPredicateEncoding(FunctionEncoding *encoding, Boolean *predicate);
38 void setFunctionEncodingType(FunctionEncoding* encoding, FunctionEncodingType type);
39 void deleteFunctionEncoding(FunctionEncoding *This);