summaryrefslogtreecommitdiff
path: root/Test/AbsHoudini/houd7.bpl
blob: 4035755cfc83a40e00673376d938c1c4e51bf72e (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
36
37
// RUN: %boogie -noinfer -contractInfer -printAssignment -abstractHoudini:IA[ConstantProp] "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
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