]>
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 | |
7b8f5716 | 20 | struct s_constraintTerm { |
4ab867d6 | 21 | /*@only@*/ fileloc loc; |
920a3797 | 22 | constraintTermValue value; |
6e88de2d | 23 | constraintTermType kind; |
990ec868 | 24 | } ; |
92c4a786 | 25 | |
7b8f5716 | 26 | abst_typedef struct s_constraintTerm *constraintTerm; |
92c4a786 | 27 | |
b941db6b | 28 | |
7b8f5716 | 29 | extern bool constraintTerm_isDefined (constraintTerm p_t) /*@*/ ; |
f0171cff | 30 | |
2934b455 | 31 | extern constraintTermType constraintTerm_getKind (constraintTerm) ; |
32 | extern /*@exposed@*/ sRef constraintTerm_getSRef (constraintTerm) ; | |
92c4a786 | 33 | |
7b8f5716 | 34 | void constraintTerm_free (/*@only@*/ constraintTerm p_term); |
a8e557d3 | 35 | |
7b8f5716 | 36 | constraintTerm constraintTerm_simplify (/*@returned@*/ constraintTerm p_term) /*@modifies p_term@*/ ; |
361091cc | 37 | |
7b8f5716 | 38 | /*@only@*/ constraintTerm constraintTerm_makeExprNode (/*@dependent@*/ exprNode p_e) /*@*/; |
361091cc | 39 | |
7b8f5716 | 40 | constraintTerm constraintTerm_copy (constraintTerm p_term) /*@*/; |
361091cc | 41 | |
7b8f5716 | 42 | bool constraintTerm_similar (constraintTerm p_term1, constraintTerm p_term2) /*@*/; |
361091cc | 43 | |
ae133592 | 44 | extern bool constraintTerm_canGetValue (constraintTerm p_term)/*@*/; |
45 | extern long constraintTerm_getValue (constraintTerm p_term) /*@*/; | |
46 | extern void constraintTerm_setValue (constraintTerm p_term, long p_value) /*@modifies p_term@*/; | |
361091cc | 47 | |
ae133592 | 48 | extern fileloc constraintTerm_getFileloc (constraintTerm p_t) /*@*/; |
361091cc | 49 | |
ae133592 | 50 | extern bool constraintTerm_isIntLiteral (constraintTerm p_term) /*@*/; |
ef2aa32a | 51 | |
ae133592 | 52 | extern constraintTerm constraintTerm_makesRef (/*@temp@*/ /*@observer@*/ sRef p_s) /*@*/; |
ef2aa32a | 53 | |
7b8f5716 | 54 | /*@unused@*/ bool constraintTerm_probSame (constraintTerm p_term1, constraintTerm p_term2) /*@*/; |
ef2aa32a | 55 | |
7b8f5716 | 56 | constraintTerm constraintTerm_setFileloc (/*@returned@*/ constraintTerm p_term, fileloc p_loc) /*@modifies p_term@*/; |
92c4a786 | 57 | |
7b8f5716 | 58 | constraintTerm constraintTerm_makeIntLiteral (long p_i) /*@*/; |
92c4a786 | 59 | |
7b8f5716 | 60 | bool constraintTerm_isStringLiteral (constraintTerm p_c) /*@*/; |
61 | cstring constraintTerm_getStringLiteral (constraintTerm p_c) /*@*/; | |
92c4a786 | 62 | |
a8e557d3 | 63 | |
7b8f5716 | 64 | constraintTerm constraintTerm_doSRefFixBaseParam (/*@returned@*/ constraintTerm p_term, exprNodeList p_arglist) /*@modifies p_term@*/; |
92c4a786 | 65 | |
2a6e9c30 | 66 | extern cstring constraintTerm_unparse (constraintTerm) /*@*/ ; |
86d93ed3 | 67 | |
7b8f5716 | 68 | extern void constraintTerm_dump ( /*@observer@*/ constraintTerm p_t, FILE * p_f); |
69 | extern /*@only@*/ constraintTerm constraintTerm_undump ( FILE * p_f); | |
2a6e9c30 | 70 | extern bool constraintTerm_isInitBlock (/*@observer@*/ /*@temp@*/ constraintTerm p_c) /*@*/; |
71 | extern int constraintTerm_getInitBlockLength (/*@observer@*/ /*@temp@*/ constraintTerm p_c) /*@*/; | |
7b8f5716 | 72 | extern bool constraintTerm_isExprNode (/*@observer@*/ /*@temp@*/ constraintTerm p_c) /*@*/; |
73 | extern ctype constraintTerm_getCType (constraintTerm p_term); | |
86d93ed3 | 74 | |
7b8f5716 | 75 | extern /*@exposed@*/ exprNode constraintTerm_getExprNode (constraintTerm p_t); |
76 | extern /*@exposed@*/ sRef constraintTerm_getsRef (constraintTerm p_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 |