summaryrefslogtreecommitdiff
path: root/Test/test21/InterestingExamples3.bpl
blob: 24e89b2b23f08248f67b6d5d65e229fcb9adc9d9 (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
// RUN: %boogie -typeEncoding:n -logPrefix:0n "%s" > "%t"
// RUN: %diff "%s.n.expect" "%t"
// RUN: %boogie -typeEncoding:p -logPrefix:0p "%s" > "%t"
// RUN: %diff "%s.p.expect" "%t"
// RUN: %boogie -typeEncoding:a -logPrefix:0a "%s" > "%t"
// RUN: %diff "%s.a.expect" "%t"

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
}