summaryrefslogtreecommitdiff
path: root/Test/test21/BooleanQuantification.bpl
blob: 52416e9d604936a0381066e2075444670423b672 (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



function f(bool) returns (int);

axiom f(true) == 17;
axiom f(false) == 19;

procedure P() returns () {
  assert (forall x:bool :: f(x) >= 0);
}

procedure Q() returns () {
  assert (forall x:int :: (x==7 || x==9) ==> x >= 0);
}

procedure R() returns () {
  assert f((forall x:bool :: f(x) >= 10)) < 19;
  assert (exists x:bool :: f(x) > 20);       // should not be provable
}


function g<a>(a) returns (int);

axiom g(true) == 17;
axiom g(false) == 21;

procedure S() returns () {
  assert (forall x:bool :: g(x) >= 0);
  assert g((forall x:bool :: g(x) >= 0)) >= 17;
  assert (forall x:bool :: f(x) == g(x));   // should not be provable
}