summaryrefslogtreecommitdiff
path: root/Test/test21/InterestingExamples3.bpl
blob: 8eef3dffb863946680438c0a39f7587f3d8db1a8 (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

procedure P() returns () {

 assume (forall<t> m : [t]bool ::                // uses "infinitely many" map types
         (forall x : t ::    m[x] == false));

}


procedure Q() returns () {
 var h : [int] bool;

 assume (forall<t> m : [t]bool, x : t ::    m[x] == false);
 assert !h[42];
 assert false;                    // should really be provable
}



procedure R() returns () {
 var h : [int] bool;

 assume (forall<t> m : [t]bool, x : t ::    m[x] == false);
 assert !h[42];
 assert !h[42 := true][42];
 assert false;                    // wow
}