Changes between Version 43 and Version 44 of ContractReduction
- Timestamp:
- 12/14/15 10:53:04 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ContractReduction
v43 v44 12 12 * `reads` clause: specify memory locations read by the function, the syntax of which is similar to `assigns` clause 13 13 * additional parameter for `allocates` clause: specify the scope of the heap for allocation; if absent then the root scope is used 14 * wildcard term: ` \everything`14 * wildcard term: `...` 15 15 16 16 {{{ … … 35 35 completeness-clause ::= complete behaviors (id (, id)∗)? ; 36 36 | disjoint behaviors (id (, id)∗)? ; 37 term ::= \old ( term ) | \result | \nothing | \everything37 term ::= \old ( term ) | \result | \nothing | ... 38 38 pred ::= \old ( pred ) 39 39 }}} … … 64 64 [[* `mem1+mem2`, where `mem1` and `mem2` are expressions of type `$memory`. This is the union of the two sets.]] Problem this is ambiguous with numeric +, as in x+y. 65 65 66 == `assigns` clause ==66 == `assigns` and `reads` clause == 67 67 68 68 As in other contract specification language, this contract clause is used to specify a set of existing memory units. The claim is that if an existing memory unit is not in the set, it will not be modified in the course of the function call. The syntax is: 69 69 70 `assigns location (, location)*` or `assigns \nothing` or `assigns $everything`70 `assigns/reads location (, location)*` or `assigns/reads \nothing` 71 71 72 72 where `location` is a `tset` expressions of type `$memory`. … … 77 77 }}} 78 78 79 * absence of `assigns`/`reads` clause 80 * for non-system functions, the function body is scanned to understand the memory locations assigned/read by it 81 * for system functions, only memory locations reachable form the arguments shall be assigned/read 79 82 80 83 == `depends` clause ==
