summaryrefslogtreecommitdiff
path: root/Test/civl/one.bpl
blob: 3b370fa7e7aa4fdfa924eff4248e30b0210fd914 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// RUN: %boogie -noinfer "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
var {:layer 0,1} x:int;

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

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