blob: 7be8f5618e1a04c4ed2732cdc93d3688d91719d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// RUN: %boogie -noinfer -typeEncoding:m -useArrayTheory "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
var {:layer 0} x: int;
procedure {:yields} {:layer 0,1} Incr();
ensures {:right} |{ A: x := x + 1; return true; }|;
procedure {:yields} {:layer 1,2} Incr2()
ensures {:right} |{ A: x := x + 2; return true; }|;
{
yield;
par Incr() | Incr();
yield;
}
procedure {:yields} {:layer 1} Yield()
{
yield;
}
procedure {:yields} {:layer 2,3} Incr4()
ensures {:atomic} |{ A: x := x + 4; return true; }|;
{
yield;
par Incr2() | Incr2() | Yield();
yield;
}
|