summaryrefslogtreecommitdiff
path: root/Test/og/one.bpl
blob: 0fc6d32f683ee9fe12489de44c19be20c340416f (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
// RUN: %boogie -noinfer "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
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;
}