summaryrefslogtreecommitdiff
path: root/Test/z3api/boog10.bpl
blob: 075432d79cecbce1b6b33e5fe5fb0f19cf92a350 (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
type ref;
// types
type Color;
const unique red: Color;
const unique blue: Color;
const unique green: Color;

axiom (forall ce:Color :: ce==red || ce==blue || ce==green);
var myColor: Color;

// procedure
procedure SetTo(c: Color);
  modifies myColor
;

  ensures myColor==c;

implementation SetTo(c: Color) {
  assert (blue==green);
  myColor:=blue;
}