]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2000. | |
3 | ** See ../LICENSE for license information. | |
4 | */ | |
5 | # ifndef constraintLIST_H | |
6 | # define constraintLIST_H | |
7 | ||
8 | typedef /*@only@*/ /*@notnull@*/ constraint o_constraint; | |
9 | ||
10 | struct s_constraintList | |
11 | { | |
12 | int nelements; | |
13 | int nspace; | |
14 | /*@reldef@*/ /*@relnull@*/ o_constraint *elements; | |
15 | } ; | |
16 | ||
17 | /*@constant null constraintList constraintList_undefined;@*/ | |
18 | ||
19 | # define constraintList_undefined ((constraintList)NULL) | |
20 | ||
21 | extern /*@falsenull@*/ bool constraintList_isDefined (constraintList p_e) /*@*/ ; | |
22 | extern /*@unused@*/ /*@truenull@*/ bool constraintList_isUndefined (constraintList p_e) /*@*/ ; | |
23 | extern /*@truenull@*/ /*@unused@*/ bool constraintList_isError (constraintList p_e) /*@*/ ; | |
24 | ||
25 | # define constraintList_isDefined(e) ((e) != constraintList_undefined) | |
26 | # define constraintList_isUndefined(e) ((e) == constraintList_undefined) | |
27 | # define constraintList_isError(e) ((e) == constraintList_undefined) | |
28 | ||
29 | extern constraintList constraintList_single (/*@only@*/ constraint) ; | |
30 | ||
31 | extern constraintList constraintList_addListFree (/*@returned@*/ constraintList, /*@only@*/ constraintList) ; | |
32 | extern constraintList constraintList_preserveCallInfo (/*@returned@*/ constraintList p_c, /*@observer@*/ /*@dependent@*/ exprNode p_fcn) ; | |
33 | ||
34 | /*@iter constraintList_elements (sef constraintList x, yield exposed constraint el); @*/ | |
35 | # define constraintList_elements(x, m_el) \ | |
36 | { if (constraintList_isDefined (x)) { int m_ind; constraint *m_elements = &((x)->elements[0]); \ | |
37 | for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \ | |
38 | { constraint m_el = *(m_elements++); | |
39 | ||
40 | # define end_constraintList_elements }}} | |
41 | ||
42 | extern /*@only@*/ constraintList constraintList_makeNew(void) /*@*/; | |
43 | extern constraintList constraintList_add (/*@returned@*/ constraintList p_s, /*@only@*/ constraint p_el) /*@modifies p_s@*/ ; | |
44 | ||
45 | extern /*@only@*/ constraintList constraintList_addList (/*@only@*/ /*@returned@*/ constraintList p_s, /*@observer@*/ constraintList p_newList) /*@modifies p_s@*/ ; | |
46 | ||
47 | ||
48 | extern constraintList constraintList_copy ( /*@observer@*/ /*@temp@*/ constraintList p_s) /*@*/ ; | |
49 | ||
50 | ||
51 | extern void constraintList_free (/*@only@*/ constraintList p_s) ; | |
52 | ||
53 | ||
54 | extern /*@only@*/ cstring constraintList_unparse ( /*@observer@*/ constraintList p_s) /*@*/; | |
55 | ||
56 | /*@only@*/ extern cstring constraintList_print ( /*@observer@*/ /*@temp@*/ constraintList p_s) /*@*/; | |
57 | ||
58 | extern cstring | |
59 | constraintList_printDetailed ( /*@observer@*/ constraintList p_s) /*@*/; | |
60 | ||
61 | extern /*@only@*/ constraintList | |
62 | constraintList_logicalOr ( /*@observer@*/ constraintList p_l1, /*@observer@*/ constraintList p_l2); | |
63 | ||
64 | extern constraintList constraintList_preserveOrig (/*@returned@*/ constraintList p_c); | |
65 | ||
66 | /*@constant int constraintListBASESIZE;@*/ | |
67 | ||
68 | # define constraintListBASESIZE SMALLBASESIZE | |
69 | ||
70 | extern /*@only@*/ constraintList constraintList_doSRefFixBaseParam ( constraintList p_preconditions, /*@temp@*/ /*@observer@*/ exprNodeList p_arglist) /*@modifies p_preconditions@*/; | |
71 | ||
72 | extern constraintList constraintList_togglePost (/*@returned@*/ constraintList p_c) /*@modifies p_c@*/; | |
73 | ||
74 | extern /*@only@*/ constraintList constraintList_doSRefFixConstraintParam ( /*@only@*/ constraintList p_preconditions, /*@observer@*/ /*@temp@*/ exprNodeList p_arglist) /*@modifies p_preconditions@*/; | |
75 | ||
76 | extern constraintList exprNode_getPostConditions (/*@dependent@*/ /*@observer@*/ exprNode p_fcn, exprNodeList p_arglist, /*@dependent@*/ /*@observer@*/ exprNode p_fcnCall) /*@*/; | |
77 | ||
78 | /*@only@*/ constraintList constraintList_doFixResult ( /*@only@*/ constraintList p_postconditions, /*@observer@*/ /*@dependent@*/ exprNode p_fcnCall) /*@modifies p_postconditions@*/; | |
79 | ||
80 | extern constraintList constraintList_addGeneratingExpr (/*@returned@*/ constraintList p_c, /*@dependent@*/ /*@observer@*/ exprNode p_e) /*@modifies p_c@*/; | |
81 | extern /*@only@*/ constraintList constraintList_makeFixedArrayConstraints ( /*@observer@*/ sRefSet p_s) ; | |
82 | extern void constraintList_printErrorPostConditions (constraintList p_s, fileloc p_loc) ; | |
83 | extern void constraintList_printError (constraintList p_s, /*@observer@*/ fileloc p_loc) ; | |
84 | ||
85 | extern constraintList constraintList_sort (/*@returned@*/ constraintList p_ret) /*@modifes p_ref@*/ ; | |
86 | ||
87 | void constraintList_dump (/*@observer@*/ constraintList p_c, FILE * p_f); | |
88 | ||
89 | /*@only@*/ constraintList constraintList_undump (FILE * p_f); | |
90 | ||
91 | # else | |
92 | # error "Multiple include" | |
93 | # endif | |
94 | ||
95 | ||
96 | ||
97 |