Changes between Version 42 and Version 43 of ContractReduction
- Timestamp:
- 12/14/15 10:44:25 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ContractReduction
v42 v43 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 15 15 16 {{{ … … 315 316 316 317 {{{ 317 /*@ depends \read(q->owner) +\write(q->owner);318 /*@ depends \read(q->owner), \write(q->owner); 318 319 @ assigns q->owner; 319 320 */ 320 321 $atomic_f _Bool lock(cqueue* q) 321 $depends {$access(q->owner)}322 $assigns {q->owner}323 322 { 324 323 if(q->owner==$self) … … 333 332 334 333 {{{ 335 /*@ depends \calls(enqueue, q, ...) +$calls(dequeue,q, ...);334 /*@ depends \calls(enqueue, q, ...), $calls(dequeue,q, ...); 336 335 @ reads q->data; 337 336 @ assigns \nothing; … … 347 346 @ behavior success: 348 347 @ assumes q->owner==$self; 349 @ $depends $access(q->owner);348 @ depends \access(q->owner); 350 349 @ assigns q->owner; 351 350 @ behavior failure: 352 351 @ assumes q->owner!=$self; 353 @ $depends \nothing;352 @ depends \nothing; 354 353 @ assigns \nothing; 355 354 @*/
