Changes between Version 6 and Version 7 of Function_Contracts
- Timestamp:
- 01/18/16 20:36:18 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Function_Contracts
v6 v7 15 15 depends: 'depends' e (',' e)* ';' ; 16 16 ... 17 behavior: 'be havior' id ':' behaviorBody;17 behavior: 'begin behavior' id ':' behaviorBody 'end behavior'; 18 18 behaviorBody: behaviorClause+; 19 19 behaviorClause: assumes | requires | simple ; … … 27 27 fun[atomic] sendRecv(Int cmd, Pointer buf): Integer 28 28 reads deref(buf); 29 be havior send:29 begin behavior send: 30 30 depends writes(buf); 31 31 assigns nothing; 32 behavior receive: 32 end behavior 33 begin behavior receive: 33 34 depends access(deref(buf)); 34 35 assigns deref(buf); 36 end behavior 35 37 { 36 38 begin choose … … 67 69 * Note: `guards`, `depends` and `reads` are CIVL extension for ACSL 68 70 * named behavior: 69 * `be havior id : c0; c1; c2; ...`, where `id` is the name of this behavior, `c0, c1, c2, ...` are behavior clauses71 * `begin behavior id : c0; c1; c2; ... end behavior`, where `id` is the name of this behavior, `c0, c1, c2, ...` are behavior clauses 70 72 * behavior clause: a clause that can be used in the body of a behavior, and could be one of the following: 71 73 * assumes clause … … 110 112 fun[atomic] sendRecv(Int cmd, Pointer buf): Integer 111 113 reads deref(buf); 112 be havior send:114 begin behavior send: 113 115 depends writes(buf); 114 116 assigns nothing; 115 behavior receive: 117 end behavior 118 begin behavior receive: 116 119 depends access(deref(buf)); 117 120 assigns deref(buf); 121 end behavior 118 122 { 119 123 begin choose
