summaryrefslogtreecommitdiff
path: root/Test/houdini/houd7.bpl
blob: 6238ee5a3b6047eeac8159c4a2463b7ad5b73d77 (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 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
const {:existential true} b1:bool;
const {:existential true} b2:bool;
const {:existential true} b3:bool;

var myVar: int;

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

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