]>
Commit | Line | Data |
---|---|---|
92c4a786 | 1 | #ifndef __constraintTerm_h__ |
2 | ||
3 | #define __constraintTerm_h__ | |
4 | ||
6e88de2d | 5 | typedef union |
6 | { | |
28bf4b0b | 7 | /*@exposed@*/ /*@dependent@*/ exprNode expr; |
8 | /*@only@*/ sRef sref; | |
b9904f57 | 9 | long intlit; |
6e88de2d | 10 | } constraintTermValue; |
dc92450f | 11 | |
6e88de2d | 12 | typedef enum |
13 | { | |
2a6e9c30 | 14 | CTT_ERRORBADCONSTRAINTTERMTYPE, |
15 | CTT_EXPR, | |
16 | CTT_SREF, | |
17 | CTT_INTLITERAL | |
6e88de2d | 18 | } constraintTermType; |
361091cc | 19 | |
6e88de2d | 20 | struct _constraintTerm { |
4ab867d6 | 21 | /*@only@*/ fileloc loc; |
920a3797 | 22 | constraintTermValue value; |
6e88de2d | 23 | constraintTermType kind; |
990ec868 | 24 | } ; |
92c4a786 | 25 | |
990ec868 | 26 | abst_typedef struct _constraintTerm *constraintTerm; |
92c4a786 | 27 | |
f0171cff | 28 | /*@i311 shouldn't need this...never null */ |
29 | extern bool constraintTerm_isDefined (constraintTerm t) /*@*/ ; | |
30 | ||
2934b455 | 31 | extern constraintTermType constraintTerm_getKind (constraintTerm) ; |
32 | extern /*@exposed@*/ sRef constraintTerm_getSRef (constraintTerm) ; | |
92c4a786 | 33 | |
d46ce6a4 | 34 | void constraintTerm_free (/*@only@*/ constraintTerm term); |
a8e557d3 | 35 | |
6e88de2d | 36 | constraintTerm constraintTerm_simplify (/*@returned@*/ constraintTerm term) /*@modifies term@*/ ; |
361091cc | 37 | |
28bf4b0b | 38 | /*@only@*/ constraintTerm constraintTerm_makeExprNode (/*@dependent@*/ exprNode e) /*@*/; |
361091cc | 39 | |
6e88de2d | 40 | constraintTerm constraintTerm_copy (constraintTerm term) /*@*/; |
361091cc | 41 | |
6e88de2d | 42 | bool constraintTerm_similar (constraintTerm term1, constraintTerm term2) /*@*/; |
361091cc | 43 | |
6e88de2d | 44 | bool constraintTerm_canGetValue (constraintTerm term)/*@*/; |
b9904f57 | 45 | long constraintTerm_getValue (constraintTerm term) /*@*/; |
361091cc | 46 | |
6e88de2d | 47 | fileloc constraintTerm_getFileloc (constraintTerm t) /*@*/; |
361091cc | 48 | |
ef2aa32a | 49 | |
6e88de2d | 50 | bool constraintTerm_isIntLiteral (constraintTerm term) /*@*/; |
dc92450f | 51 | |
28bf4b0b | 52 | constraintTerm constraintTerm_makesRef (/*@temp@*/ /*@observer@*/ sRef s) /*@*/; |
ef2aa32a | 53 | |
bb25bea6 | 54 | /*@unused@*/ bool constraintTerm_probSame (constraintTerm term1, constraintTerm term2) /*@*/; |
ef2aa32a | 55 | |
6e88de2d | 56 | constraintTerm constraintTerm_setFileloc (/*@returned@*/ constraintTerm term, fileloc loc) /*@modifies term@*/; |
92c4a786 | 57 | |
b9904f57 | 58 | constraintTerm constraintTerm_makeIntLiteral (long i) /*@*/; |
92c4a786 | 59 | |
6e88de2d | 60 | bool constraintTerm_isStringLiteral (constraintTerm c) /*@*/; |
61 | cstring constraintTerm_getStringLiteral (constraintTerm c) /*@*/; | |
92c4a786 | 62 | |
a8e557d3 | 63 | |
bb25bea6 | 64 | constraintTerm constraintTerm_doSRefFixBaseParam (/*@returned@*/ constraintTerm term, exprNodeList arglist) /*@modifies term@*/; |
92c4a786 | 65 | |
2a6e9c30 | 66 | extern cstring constraintTerm_unparse (constraintTerm) /*@*/ ; |
86d93ed3 | 67 | |
2a6e9c30 | 68 | extern void constraintTerm_dump ( /*@observer@*/ constraintTerm t, FILE *f); |
69 | extern /*@only@*/ constraintTerm constraintTerm_undump ( FILE *f); | |
70 | extern bool constraintTerm_isInitBlock (/*@observer@*/ /*@temp@*/ constraintTerm p_c) /*@*/; | |
71 | extern int constraintTerm_getInitBlockLength (/*@observer@*/ /*@temp@*/ constraintTerm p_c) /*@*/; | |
72 | extern bool constraintTerm_isExprNode (/*@observer@*/ /*@temp@*/ constraintTerm c) /*@*/; | |
86d93ed3 | 73 | extern ctype constraintTerm_getCType (constraintTerm term); |
74 | ||
2a6e9c30 | 75 | extern /*@exposed@*/ exprNode constraintTerm_getExprNode (constraintTerm t); |
76 | extern /*@exposed@*/ sRef constraintTerm_getsRef (constraintTerm t); | |
28bf4b0b | 77 | |
fba0ed37 | 78 | /*drl added 12/19/2002*/ |
2a6e9c30 | 79 | extern bool constraintTerm_isConstantOnly (constraintTerm p_term); |
fba0ed37 | 80 | |
6e88de2d | 81 | #else |
2a6e9c30 | 82 | #error "Multiple Include!" |
6e88de2d | 83 | #endif |