summaryrefslogtreecommitdiff
path: root/Test/og/one.bpl
blob: 1da2f11662276ee79f48d062dd4b422066eb55d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
var {:phase 1} x:int;

procedure {:yields} {:phase 0,1} Set(v: int);
ensures {:atomic}
|{A:
  x := v; return true;
}|;

procedure A()
modifies x;
{
  x := x;
}

procedure {:yields} {:phase 1} B()
{
  yield;
  call Set(5);
  yield;
  assert {:phase 1} x == 5;
}