summaryrefslogtreecommitdiff
path: root/Test/test21/HeapAbstraction.bpl
blob: 1d2a7f99db29978da26e1bb720b1a935bee1baa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19


type Field a, Heap = <a>[ref, Field a]a;

function f<b>(<a>[b, Field a]a) returns (int);

axiom (forall x:<a>[int, Field a]a :: f(x) == 17);

axiom (forall x:<a>[ref, Field a]a :: f(x) == 42);

procedure P() returns () {
  var h : Heap, g : <a>[bool, Field a]a;

  assert f(h) == 42;
  assert f(g) >= 0;     // should not be provable
}

type ref;
const null : ref;