Keeping the type of Boolean/Element struct, as well as keeping backward edges for...
[satune.git] / src / AST / ops.h
1 #ifndef OPS_H
2 #define OPS_H
3 enum LogicOp {L_AND, L_OR, L_NOT, L_XOR, L_IMPLIES};
4 typedef enum LogicOp LogicOp;
5
6 enum ArithOp {ADD, SUB};
7 typedef enum ArithOp ArithOp;
8
9 enum CompOp {EQUALS};
10 typedef enum CompOp CompOp;
11
12 enum OrderType {PARTIAL, TOTAL};
13 typedef enum OrderType OrderType;
14
15 /**
16  *    FLAGFORCESOVERFLOW forces the operation to overflow if the boolean flag is true
17  *  OVERFLOWSETSFLAG -- sets the flag if the operation overflows
18  *  FLAGIFFOVERFLOW -- flag is set iff the operation overflows
19  *  IGNORE -- doesn't constrain output if the result cannot be represented
20  *  WRAPAROUND -- wraps around like stand integer arithmetic
21  *  NOOVERFLOW -- client has ensured that overflow is impossible
22  */
23 enum OverFlowBehavior {IGNORE, WRAPAROUND, FLAGFORCESOVERFLOW, OVERFLOWSETSFLAG, FLAGIFFOVERFLOW, NOOVERFLOW};
24 typedef enum OverFlowBehavior OverFlowBehavior;
25
26 enum UndefinedBehavior {IGNOREBEHAVIOR, FLAGFORCEUNDEFINED, UNDEFINEDSETSFLAG, FLAGIFFUNDEFINED};
27 typedef enum UndefinedBehavior UndefinedBehavior;
28
29 enum BooleanType {ORDERCONST, BOOLEANVAR, LOGICOP, PREDICATEOP, TABLEPREDICATEOP};
30 typedef enum BooleanType BooleanType;
31
32 enum FunctionType {TABLEFUNC, OPERATORFUNC};
33 typedef enum FunctionType FunctionType;
34
35 enum PredicateType {TABLEPRED, OPERATORPRED};
36 typedef enum PredicateType PredicateType;
37
38 enum ElementType {ELEMSET, ELEMFUNCRETURN};
39 typedef enum ElementType ElementType;
40
41 enum StructType {_BOOLEAN, _ELEMENT};
42 typedef enum StructType StructType;
43
44 #endif