]> andersk Git - splint.git/blame - src/Headers/constraintList.h
Fixed library dump support so that buffer constraint annotations are read and written...
[splint.git] / src / Headers / constraintList.h
CommitLineData
4cccc6ad 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
84c9ffbf 8typedef /*@only@*/ /*@notnull@*/ constraint o_constraint;
4cccc6ad 9
93307a76 10struct _constraintList
4cccc6ad 11{
12 int nelements;
13 int nspace;
14 /*@reldef@*/ /*@relnull@*/ o_constraint *elements;
93307a76 15} ;
16
17/*@constant null constraintList constraintList_undefined;@*/
84c9ffbf 18
19# define constraintList_undefined ((constraintList)NULL)
20
21extern /*@falsenull@*/ bool constraintList_isDefined (constraintList p_e) /*@*/ ;
22extern /*@unused@*/ /*@truenull@*/ bool constraintList_isUndefined (constraintList p_e) /*@*/ ;
23extern /*@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
2934b455 29extern /*@only@*/ constraintList constraintList_addListFree (/*@only@*/ constraintList, /*@only@*/ constraintList) ;
30extern constraintList constraintList_preserveCallInfo (/*@returned@*/ constraintList p_c, exprNode p_fcn) ;
4cccc6ad 31
32/*@iter constraintList_elements (sef constraintList x, yield exposed constraint el); @*/
33# define constraintList_elements(x, m_el) \
34 { int m_ind; constraint *m_elements = &((x)->elements[0]); \
35 for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \
36 { constraint m_el = *(m_elements++);
37
38# define end_constraintList_elements }}
39
6e88de2d 40extern /*@only@*/ constraintList constraintList_makeNew(void) /*@*/;
41extern constraintList constraintList_add (/*@returned@*/ constraintList p_s, /*@only@*/ constraint p_el) /*@modifies p_s@*/ ;
4cccc6ad 42
4ab867d6 43extern /*@only@*/ constraintList constraintList_addList (/*@returned@*/ constraintList p_s, /*@observer@*/ constraintList new) /*@modifies p_s@*/ ;
361091cc 44
45
84c9ffbf 46extern constraintList constraintList_copy ( /*@observer@*/ constraintList p_s) /*@*/ ;
4cccc6ad 47
4cccc6ad 48
920a3797 49extern void constraintList_free (/*@only@*/ constraintList p_s) ;
361091cc 50
ef2aa32a 51
920a3797 52extern /*@only@*/ cstring constraintList_unparse ( /*@observer@*/ constraintList p_s) /*@*/;
361091cc 53
920a3797 54/*@only@*/ extern cstring constraintList_print ( /*@observer@*/ constraintList s) /*@*/;
754746a0 55
56extern cstring
84c9ffbf 57constraintList_printDetailed ( /*@observer@*/ constraintList s) /*@*/;
754746a0 58
84c9ffbf 59extern /*@only@*/ constraintList
60constraintList_logicalOr ( /*@observer@*/ constraintList l1, /*@observer@*/ constraintList l2);
754746a0 61
6e88de2d 62extern constraintList constraintList_preserveOrig (/*@returned@*/ constraintList c);
754746a0 63
4cccc6ad 64/*@constant int constraintListBASESIZE;@*/
754746a0 65
84c9ffbf 66# define constraintListBASESIZE SMALLBASESIZE
67
bb25bea6 68extern /*@only@*/ constraintList constraintList_doSRefFixBaseParam ( /*@observer@*/ constraintList preconditions, /*@observer@*/ exprNodeList arglist) /*@modifies preconditions@*/;
754746a0 69
6e88de2d 70extern constraintList constraintList_togglePost (/*@returned@*/ constraintList c) /*@modifies c@*/;
ef2aa32a 71
bb25bea6 72extern /*@only@*/ constraintList constraintList_doSRefFixConstraintParam ( /*@only@*/ constraintList preconditions, /*@observer@*/ exprNodeList arglist) /*@modifies preconditions@*/;
ef2aa32a 73
6e88de2d 74extern constraintList getPostConditions (exprNode fcn, exprNodeList arglist, exprNode fcnCall) /*@*/;
ef2aa32a 75
bb25bea6 76/*@only@*/ constraintList constraintList_doFixResult ( /*@only@*/ constraintList postconditions, /*@observer@*/ exprNode fcnCall) /*@modifies postconditions@*/;
103db890 77
2934b455 78extern constraintList constraintList_addGeneratingExpr (/*@returned@*/ constraintList c, exprNode e) /*@modifies c@*/;
920a3797 79extern /*@only@*/ constraintList constraintList_makeFixedArrayConstraints ( /*@observer@*/ sRefSet p_s) ;
2934b455 80extern void constraintList_printErrorPostConditions (constraintList p_s, fileloc p_loc) ;
81extern void constraintList_printError (constraintList p_s, fileloc p_loc) ;
4cccc6ad 82
920a3797 83void constraintList_dump (/*@observer@*/ constraintList c, FILE *f);
84
85/*@only@*/ constraintList constraintList_undump (FILE *f);
86
87
4cccc6ad 88# else
89# error "Multiple include"
90# endif
91
92
93
94
This page took 0.064585 seconds and 5 git commands to generate.