From d652155ae013f36a1ee17653a8e458baad2d9c2c Mon Sep 17 00:00:00 2001 From: Checkmate50 Date: Mon, 6 Jun 2016 23:14:18 -0600 Subject: Merging complete. Everything looks good *crosses fingers* --- Test/test21/InterestingExamples1.bpl | 66 ++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'Test/test21/InterestingExamples1.bpl') diff --git a/Test/test21/InterestingExamples1.bpl b/Test/test21/InterestingExamples1.bpl index 247e2c5b..48b4a5dd 100644 --- a/Test/test21/InterestingExamples1.bpl +++ b/Test/test21/InterestingExamples1.bpl @@ -1,33 +1,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" - -type Set = [a] bool; -type Field a; -type Heap = [ref, Field b] b; - - -const emptySet : Set; -axiom (forall x:t :: !emptySet[x]); - -procedure P() returns () { - var x : Set, f : Field Set, g : Field int, heap : Heap, o : ref; - - x := emptySet; - heap[o, f] := x; - heap[o, g] := 13; - assert heap[o, f] == emptySet && heap[o, g] == 13; - - heap[o, f] := heap[o, f][17 := true]; - heap[o, f] := heap[o, f][g := true]; - - assert (forall y:t :: heap[o, f][y] == (y == 17 || y == g)); - assert (forall y:t :: heap[o, f][y] == (y == 16 || y == g)); // should not hold - -} - -type ref; - +// 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" + +type Set = [a] bool; +type Field a; +type Heap = [ref, Field b] b; + + +const emptySet : Set; +axiom (forall x:t :: !emptySet[x]); + +procedure P() returns () { + var x : Set, f : Field Set, g : Field int, heap : Heap, o : ref; + + x := emptySet; + heap[o, f] := x; + heap[o, g] := 13; + assert heap[o, f] == emptySet && heap[o, g] == 13; + + heap[o, f] := heap[o, f][17 := true]; + heap[o, f] := heap[o, f][g := true]; + + assert (forall y:t :: heap[o, f][y] == (y == 17 || y == g)); + assert (forall y:t :: heap[o, f][y] == (y == 16 || y == g)); // should not hold + +} + +type ref; + -- cgit v1.2.3