]> andersk Git - splint.git/blame_incremental - src/Headers/constraintList.h
Changes to fix malloc size problem.
[splint.git] / src / Headers / constraintList.h
... / ...
CommitLineData
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
8typedef /*@only@*/ /*@notnull@*/ constraint o_constraint;
9
10struct 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
21extern /*@falsewhennull@*/ bool constraintList_isDefined (constraintList p_e) /*@*/ ;
22extern /*@unused@*/ /*@nullwhentrue@*/ bool constraintList_isUndefined (constraintList p_e) /*@*/ ;
23extern /*@nullwhentrue@*/ /*@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
29extern bool constraintList_isEmpty (/*@sef@*/ constraintList p_e) /*@*/;
30
31# define constraintList_isEmpty(e) ((constraintList_isUndefined((e)) ) ||(( (e)->nelements == 0) ) )
32
33extern constraintList constraintList_single (/*@only@*/ constraint) ;
34
35extern constraintList constraintList_addListFree (/*@returned@*/ constraintList, /*@only@*/ constraintList) ;
36extern constraintList constraintList_preserveCallInfo (/*@returned@*/ constraintList p_c, /*@observer@*/ /*@dependent@*/ exprNode p_fcn) ;
37
38/*@iter constraintList_elements (sef constraintList x, yield exposed constraint el); @*/
39# define constraintList_elements(x, m_el) \
40 { if (constraintList_isDefined (x)) { int m_ind; constraint *m_elements = &((x)->elements[0]); \
41 for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \
42 { constraint m_el = *(m_elements++);
43
44# define end_constraintList_elements }}}
45
46extern /*@only@*/ constraintList constraintList_makeNew(void) /*@*/;
47extern constraintList constraintList_add (/*@returned@*/ constraintList p_s, /*@only@*/ constraint p_el) /*@modifies p_s@*/ ;
48
49 extern /*@only@*/ constraintList constraintList_addList (/*@only@*/ /*@returned@*/ constraintList p_s, /*@observer@*/ /*@temp@*/ constraintList p_newList) /*@modifies p_s@*/ ;
50
51
52extern constraintList constraintList_copy ( /*@observer@*/ /*@temp@*/ constraintList p_s) /*@*/ ;
53
54
55extern void constraintList_free (/*@only@*/ constraintList p_s) ;
56
57
58extern /*@only@*/ cstring constraintList_unparse (/*@observer@*/ constraintList p_s) /*@*/;
59
60extern cstring constraintList_unparseDetailed (/*@observer@*/ constraintList p_s) /*@*/;
61
62extern /*@only@*/ constraintList
63constraintList_logicalOr ( /*@observer@*/ constraintList p_l1, /*@observer@*/ constraintList p_l2);
64
65extern constraintList constraintList_preserveOrig (/*@returned@*/ constraintList p_c);
66
67/*@constant int constraintListBASESIZE;@*/
68
69# define constraintListBASESIZE SMALLBASESIZE
70
71extern /*@only@*/ constraintList constraintList_doSRefFixBaseParam ( constraintList p_preconditions, /*@temp@*/ /*@observer@*/ exprNodeList p_arglist) /*@modifies p_preconditions@*/;
72
73extern constraintList constraintList_togglePost (/*@returned@*/ constraintList p_c) /*@modifies p_c@*/;
74
75extern /*@only@*/ constraintList constraintList_doSRefFixConstraintParam ( /*@only@*/ constraintList p_preconditions, /*@observer@*/ /*@temp@*/ exprNodeList p_arglist) /*@modifies p_preconditions@*/;
76
77extern constraintList exprNode_getPostConditions (/*@dependent@*/ /*@observer@*/ exprNode p_fcn, exprNodeList p_arglist, /*@dependent@*/ /*@observer@*/ exprNode p_fcnCall) /*@*/;
78
79/*@only@*/ constraintList constraintList_doFixResult ( /*@only@*/ constraintList p_postconditions, /*@observer@*/ /*@dependent@*/ exprNode p_fcnCall) /*@modifies p_postconditions@*/;
80
81extern constraintList constraintList_addGeneratingExpr (/*@returned@*/ constraintList p_c, /*@dependent@*/ /*@observer@*/ exprNode p_e) /*@modifies p_c@*/;
82extern /*@only@*/ constraintList constraintList_makeFixedArrayConstraints ( /*@observer@*/ sRefSet p_s) ;
83extern void constraintList_printErrorPostConditions (constraintList p_s, fileloc p_loc) ;
84extern void constraintList_printError (constraintList p_s, /*@observer@*/ fileloc p_loc) ;
85
86extern constraintList constraintList_sort (/*@returned@*/ constraintList p_ret)
87 /*@modifies p_ret@*/ ;
88
89extern void constraintList_castConstraints (constraintList p_c, ctype p_tfrom, ctype p_tto)
90 /*@modifies p_c@*/ ;
91
92extern void constraintList_dump (/*@observer@*/ constraintList p_c, FILE * p_f);
93
94/*@only@*/ constraintList constraintList_undump (FILE * p_f);
95/*@only@*/ constraintList constraintList_removeSurpressed (/*@only@*/ constraintList p_s);
96
97/*drl 1/6/2001: I didn't think these functions were solid enough to include in the stable release of splint.*/
98/*drl added 12/30/01 */
99/* / *@only@* / constraintList constraintList_doSRefFixStructConstraint(constraintList p_invars, sRef p_s, ctype p_ct ); */
100
101# else
102# error "Multiple include"
103# endif
104
105
106
107
This page took 0.123869 seconds and 5 git commands to generate.