Add IFF support
[satune.git] / src / AST / ops.h
1 #ifndef OPS_H
2 #define OPS_H
3 enum LogicOp {SATC_AND, SATC_OR, SATC_NOT, SATC_XOR, SATC_IFF, SATC_IMPLIES};
4 typedef enum LogicOp LogicOp;
5
6 enum ArithOp {SATC_ADD, SATC_SUB};
7 typedef enum ArithOp ArithOp;
8
9 enum CompOp {SATC_EQUALS, SATC_LT, SATC_GT, SATC_LTE, SATC_GTE};
10 typedef enum CompOp CompOp;
11
12 enum OrderType {SATC_PARTIAL, SATC_TOTAL};
13 typedef enum OrderType OrderType;
14
15 enum HappenedBefore {SATC_FIRST, SATC_SECOND, SATC_UNORDERED};
16 typedef enum HappenedBefore HappenedBefore;
17
18 /**
19  *    SATC_FLAGFORCESOVERFLOW forces the operation to overflow if the boolean flag is true
20  *  SATC_OVERFLOWSETSFLAG -- sets the flag if the operation overflows
21  *  SATC_FLAGIFFOVERFLOW -- flag is set iff the operation overflows
22  *  SATC_IGNORE -- doesn't constrain output if the result cannot be represented
23  *  SATC_WRAPAROUND -- wraps around like stand integer arithmetic
24  *  SATC_NOOVERFLOW -- client has ensured that overflow is impossible
25  */
26 enum OverFlowBehavior {SATC_IGNORE, SATC_WRAPAROUND, SATC_FLAGFORCESOVERFLOW, SATC_OVERFLOWSETSFLAG, SATC_FLAGIFFOVERFLOW, SATC_NOOVERFLOW};
27 typedef enum OverFlowBehavior OverFlowBehavior;
28
29 enum UndefinedBehavior {SATC_IGNOREBEHAVIOR, SATC_FLAGFORCEUNDEFINED, SATC_UNDEFINEDSETSFLAG, SATC_FLAGIFFUNDEFINED};
30 typedef enum UndefinedBehavior UndefinedBehavior;
31
32 #endif