Various minor fixes for compiler/linter (other then splint itself) warnings.
[splint-patched.git] / src / Headers / constraintTerm.h
blobfa47a023033bce6fa6fcd6dea4635df69072d80e
1 #ifndef CONSTRAINT_TERM_H
2 #define CONSTRAINT_TERM_H
4 typedef union
6 /*@exposed@*/ /*@dependent@*/ exprNode expr;
7 /*@only@*/ sRef sref;
8 long intlit;
9 } constraintTermValue;
11 typedef enum
13 CTT_ERRORBADCONSTRAINTTERMTYPE,
14 CTT_EXPR,
15 CTT_SREF,
16 CTT_INTLITERAL
17 } constraintTermType;
19 struct s_constraintTerm {
20 /*@only@*/ fileloc loc;
21 constraintTermValue value;
22 constraintTermType kind;
23 } ;
25 abst_typedef struct s_constraintTerm *constraintTerm;
28 extern bool constraintTerm_isDefined (constraintTerm p_t) /*@*/ ;
30 extern constraintTermType constraintTerm_getKind (constraintTerm) ;
31 extern /*@exposed@*/ sRef constraintTerm_getSRef (constraintTerm) ;
33 void constraintTerm_free (/*@only@*/ constraintTerm p_term);
35 constraintTerm constraintTerm_simplify (/*@returned@*/ constraintTerm p_term) /*@modifies p_term@*/ ;
37 /*@only@*/ constraintTerm constraintTerm_makeExprNode (/*@dependent@*/ exprNode p_e) /*@*/;
39 constraintTerm constraintTerm_copy (constraintTerm p_term) /*@*/;
41 bool constraintTerm_similar (constraintTerm p_term1, constraintTerm p_term2) /*@*/;
43 extern bool constraintTerm_canGetValue (constraintTerm p_term)/*@*/;
44 extern long constraintTerm_getValue (constraintTerm p_term) /*@*/;
45 extern void constraintTerm_setValue (constraintTerm p_term, long p_value) /*@modifies p_term@*/;
47 extern fileloc constraintTerm_getFileloc (constraintTerm p_t) /*@*/;
49 extern bool constraintTerm_isIntLiteral (constraintTerm p_term) /*@*/;
51 extern constraintTerm constraintTerm_makesRef (/*@temp@*/ /*@observer@*/ sRef p_s) /*@*/;
53 constraintTerm constraintTerm_setFileloc (/*@returned@*/ constraintTerm p_term, fileloc p_loc) /*@modifies p_term@*/;
55 constraintTerm constraintTerm_makeIntLiteral (long p_i) /*@*/;
57 bool constraintTerm_isStringLiteral (constraintTerm p_c) /*@*/;
58 cstring constraintTerm_getStringLiteral (constraintTerm p_c) /*@*/;
61 extern cstring constraintTerm_unparse (constraintTerm) /*@*/ ;
63 extern void constraintTerm_dump ( /*@observer@*/ constraintTerm p_t, FILE * p_f);
64 extern /*@only@*/ constraintTerm constraintTerm_undump ( FILE * p_f);
65 extern bool constraintTerm_isInitBlock (/*@observer@*/ /*@temp@*/ constraintTerm p_c) /*@*/;
66 extern int constraintTerm_getInitBlockLength (/*@observer@*/ /*@temp@*/ constraintTerm p_c) /*@*/;
67 extern bool constraintTerm_isExprNode (/*@observer@*/ /*@temp@*/ constraintTerm p_c) /*@*/;
68 extern ctype constraintTerm_getCType (constraintTerm p_term);
70 extern /*@exposed@*/ exprNode constraintTerm_getExprNode (constraintTerm p_t);
71 extern /*@exposed@*/ sRef constraintTerm_getsRef (constraintTerm p_t);
73 /*drl added 12/19/2002*/
74 extern bool constraintTerm_isConstantOnly (constraintTerm p_term);
76 #else
77 #error "Multiple Include!"
78 #endif