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/test17/contractinfer.bpl | 46 +++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'Test/test17/contractinfer.bpl') diff --git a/Test/test17/contractinfer.bpl b/Test/test17/contractinfer.bpl index aeec020a..afe5a2ea 100644 --- a/Test/test17/contractinfer.bpl +++ b/Test/test17/contractinfer.bpl @@ -1,24 +1,24 @@ -const {:existential true} b1:bool; -const {:existential true} b2:bool; -const {:existential true} b3:bool; -const {:existential true} b4:bool; - -var array:[int]int; - -procedure foo (i:int) -requires b2 ==> i > 0; -ensures b3 ==> array[i] > 0; -modifies array; -ensures (forall x:int :: {array[x]} x == i || array[x] == old(array)[x]); -{ - array[i] := 2 * i; -} - -procedure bar (j:int) returns (result:int) -requires b4 ==> j > 0; -modifies array; -ensures (forall x:int :: {array[x]} (b1 && x == j) || array[x] == old(array)[x]); -{ - call foo(j); - result := array[j]; +const {:existential true} b1:bool; +const {:existential true} b2:bool; +const {:existential true} b3:bool; +const {:existential true} b4:bool; + +var array:[int]int; + +procedure foo (i:int) +requires b2 ==> i > 0; +ensures b3 ==> array[i] > 0; +modifies array; +ensures (forall x:int :: {array[x]} x == i || array[x] == old(array)[x]); +{ + array[i] := 2 * i; +} + +procedure bar (j:int) returns (result:int) +requires b4 ==> j > 0; +modifies array; +ensures (forall x:int :: {array[x]} (b1 && x == j) || array[x] == old(array)[x]); +{ + call foo(j); + result := array[j]; } \ No newline at end of file -- cgit v1.2.3