]> andersk Git - splint.git/blame - src/Headers/constraintList.h
*** empty log message ***
[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
28bf4b0b 10struct s_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
3814599d 29extern constraintList constraintList_single (/*@only@*/ constraint) ;
30
31extern constraintList constraintList_addListFree (/*@returned@*/ constraintList, /*@only@*/ constraintList) ;
28bf4b0b 32extern constraintList constraintList_preserveCallInfo (/*@returned@*/ constraintList p_c, /*@observer@*/ /*@dependent@*/ exprNode p_fcn) ;
4cccc6ad 33
34/*@iter constraintList_elements (sef constraintList x, yield exposed constraint el); @*/
35# define constraintList_elements(x, m_el) \
60eced23 36 { if (constraintList_isDefined (x)) { int m_ind; constraint *m_elements = &((x)->elements[0]); \
4cccc6ad 37 for (m_ind = 0 ; m_ind < (x)->nelements; m_ind++) \
38 { constraint m_el = *(m_elements++);
39
60eced23 40# define end_constraintList_elements }}}
4cccc6ad 41
6e88de2d 42extern /*@only@*/ constraintList constraintList_makeNew(void) /*@*/;
43extern constraintList constraintList_add (/*@returned@*/ constraintList p_s, /*@only@*/ constraint p_el) /*@modifies p_s@*/ ;
4cccc6ad 44
28bf4b0b 45extern /*@only@*/ constraintList constraintList_addList (/*@only@*/ /*@returned@*/ constraintList p_s, /*@observer@*/ constraintList p_newList) /*@modifies p_s@*/ ;
361091cc 46
47
28bf4b0b 48extern constraintList constraintList_copy ( /*@observer@*/ /*@temp@*/ constraintList p_s) /*@*/ ;
4cccc6ad 49
4cccc6ad 50
920a3797 51extern void constraintList_free (/*@only@*/ constraintList p_s) ;
361091cc 52
ef2aa32a 53
920a3797 54extern /*@only@*/ cstring constraintList_unparse ( /*@observer@*/ constraintList p_s) /*@*/;
361091cc 55
28bf4b0b 56/*@only@*/ extern cstring constraintList_print ( /*@observer@*/ /*@temp@*/ constraintList p_s) /*@*/;
754746a0 57
58extern cstring
28bf4b0b 59constraintList_printDetailed ( /*@observer@*/ constraintList p_s) /*@*/;
754746a0 60
84c9ffbf 61extern /*@only@*/ constraintList
28bf4b0b 62constraintList_logicalOr ( /*@observer@*/ constraintList p_l1, /*@observer@*/ constraintList p_l2);
754746a0 63
28bf4b0b 64extern constraintList constraintList_preserveOrig (/*@returned@*/ constraintList p_c);
754746a0 65
4cccc6ad 66/*@constant int constraintListBASESIZE;@*/
754746a0 67
84c9ffbf 68# define constraintListBASESIZE SMALLBASESIZE
69
28bf4b0b 70extern /*@only@*/ constraintList constraintList_doSRefFixBaseParam ( constraintList p_preconditions, /*@temp@*/ /*@observer@*/ exprNodeList p_arglist) /*@modifies p_preconditions@*/;
754746a0 71
28bf4b0b 72extern constraintList constraintList_togglePost (/*@returned@*/ constraintList p_c) /*@modifies p_c@*/;
ef2aa32a 73
28bf4b0b 74extern /*@only@*/ constraintList constraintList_doSRefFixConstraintParam ( /*@only@*/ constraintList p_preconditions, /*@observer@*/ /*@temp@*/ exprNodeList p_arglist) /*@modifies p_preconditions@*/;
ef2aa32a 75
28bf4b0b 76extern constraintList exprNode_getPostConditions (/*@dependent@*/ /*@observer@*/ exprNode p_fcn, exprNodeList p_arglist, /*@dependent@*/ /*@observer@*/ exprNode p_fcnCall) /*@*/;
ef2aa32a 77
28bf4b0b 78/*@only@*/ constraintList constraintList_doFixResult ( /*@only@*/ constraintList p_postconditions, /*@observer@*/ /*@dependent@*/ exprNode p_fcnCall) /*@modifies p_postconditions@*/;
103db890 79
28bf4b0b 80extern constraintList constraintList_addGeneratingExpr (/*@returned@*/ constraintList p_c, /*@dependent@*/ /*@observer@*/ exprNode p_e) /*@modifies p_c@*/;
920a3797 81extern /*@only@*/ constraintList constraintList_makeFixedArrayConstraints ( /*@observer@*/ sRefSet p_s) ;
2934b455 82extern void constraintList_printErrorPostConditions (constraintList p_s, fileloc p_loc) ;
28bf4b0b 83extern void constraintList_printError (constraintList p_s, /*@observer@*/ fileloc p_loc) ;
4cccc6ad 84
6970c11b 85extern constraintList constraintList_sort (/*@returned@*/ constraintList p_ret) /*@modifes p_ref@*/ ;
86
28bf4b0b 87void constraintList_dump (/*@observer@*/ constraintList p_c, FILE * p_f);
920a3797 88
28bf4b0b 89/*@only@*/ constraintList constraintList_undump (FILE * p_f);
920a3797 90
4cccc6ad 91# else
92# error "Multiple include"
93# endif
94
95
96
97
This page took 0.067048 seconds and 5 git commands to generate.