summaryrefslogtreecommitdiff
path: root/Test/AbsHoudini/houd7.bpl
blob: ef3293dbcbb92b3a3a773fb5ae9a4f12aca92341 (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
32
33
34
35
function {:existential true} b1():bool;
function {:existential true} b2():bool;
function {:existential true} b3():bool;
function {:existential true} Assert(): bool;
var myVar: int;

procedure foo(i:int) 
requires b1() || i>0;
requires b2() || i==0;
requires b3() || i<0;
modifies myVar;
ensures Assert() || myVar>0;
{
  myVar:=5; 
}

procedure bar(i:int) 
modifies myVar;
{
  call foo(5);
}
// expected outcome: Correct
// expected Assigment: Assert = false, b1->false,b2->true,b3->true