summaryrefslogtreecommitdiff
path: root/Test/test0/PrettyPrint.bpl
blob: a1f941d83ed303ac0043262f310b94fa8b297ee1 (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
38
39
40
const x: int;
const y: int;
const z: int;
const P: bool;
const Q: bool;
const R: bool;

axiom x * (y + z) == x + (y * z);
axiom (x * y) + z == (x + y) * z;

axiom x * y * z == (x * (y * z));
axiom (x * y) * (z * x) == (x * y) * z;

axiom x / y / z == (x / (y / z));
axiom (x / y) / (z / x) == (x / y) / z;

axiom x - y - z == (x - (y - z));
axiom (x - y) - (z - x) == (x - y) - z;

axiom x + y - z - x + y == 0;
axiom ((((x + y) - z) - x) + y) == (x + (y - (z - (x + y))));

axiom P ==> Q ==> R <==> (P ==> (Q ==> R));
axiom ((P ==> Q) ==> (R ==> P)) == ((P ==> Q) ==> R);

axiom P <==> Q <==> R;
axiom P ==> Q <==> Q ==> R <==> R ==> P;

axiom (P && Q) || (Q && R);
axiom (P || Q) && (Q || R);
axiom (P || Q) || (Q || R);
axiom (P && Q) && (Q && R);

// -------------- quantifier key-value decorations

function f(int) returns (int);

axiom (forall x: int :: {:xname "hello"}
              {  :weight 5} {f(x+x)}   {:ValueFunc f(x+1)  }  {f(x)*f(x)} {:nopats f(x+x+x)}
         f(f(x)) < 200);