Merge branch 'hamed' of ssh://plrg.eecs.uci.edu/home/git/constraint_compiler
[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, LT, GT, LTE, GTE};
10 typedef enum CompOp CompOp;
11
12 enum OrderType {PARTIAL, TOTAL};
13 typedef enum OrderType OrderType;
14
15 enum HappenedBefore {FIRST, SECOND, UNORDERED};
16 typedef enum HappenedBefore HappenedBefore;
17
18 /**
19  *    FLAGFORCESOVERFLOW forces the operation to overflow if the boolean flag is true
20  *  OVERFLOWSETSFLAG -- sets the flag if the operation overflows
21  *  FLAGIFFOVERFLOW -- flag is set iff the operation overflows
22  *  IGNORE -- doesn't constrain output if the result cannot be represented
23  *  WRAPAROUND -- wraps around like stand integer arithmetic
24  *  NOOVERFLOW -- client has ensured that overflow is impossible
25  */
26 enum OverFlowBehavior {IGNORE, WRAPAROUND, FLAGFORCESOVERFLOW, OVERFLOWSETSFLAG, FLAGIFFOVERFLOW, NOOVERFLOW};
27 typedef enum OverFlowBehavior OverFlowBehavior;
28
29 enum UndefinedBehavior {IGNOREBEHAVIOR, FLAGFORCEUNDEFINED, UNDEFINEDSETSFLAG, FLAGIFFUNDEFINED};
30 typedef enum UndefinedBehavior UndefinedBehavior;
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 ASTNodeType {ORDERCONST, BOOLEANVAR, LOGICOP, PREDICATEOP, BOOLCONST, ELEMSET, ELEMFUNCRETURN, ELEMCONST};
39 typedef enum ASTNodeType ASTNodeType;
40
41 enum Polarity {P_UNDEFINED=0, P_TRUE=1, P_FALSE=2, P_BOTHTRUEFALSE=3};
42 typedef enum Polarity Polarity;
43
44 enum BooleanValue {BV_UNDEFINED=0, BV_MUSTBETRUE=1, BV_MUSTBEFALSE=2, BV_UNSAT=3};
45 typedef enum BooleanValue BooleanValue;
46
47 #endif