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/linear/f1.bpl | 96 +++++++++++++++++++++++++++--------------------------- 1 file changed, 48 insertions(+), 48 deletions(-) (limited to 'Test/linear/f1.bpl') diff --git a/Test/linear/f1.bpl b/Test/linear/f1.bpl index 0d255149..cf786143 100644 --- a/Test/linear/f1.bpl +++ b/Test/linear/f1.bpl @@ -1,48 +1,48 @@ -// RUN: %boogie -noinfer -typeEncoding:m -useArrayTheory -doModSetAnalysis "%s" > "%t" -// RUN: %diff "%s.expect" "%t" -function {:builtin "MapConst"} mapconstbool(bool) : [int]bool; -const {:existential true} b0: bool; -const {:existential true} b1: bool; -const {:existential true} b2: bool; -const {:existential true} b3: bool; -const {:existential true} b4: bool; -const {:existential true} b5: bool; -const {:existential true} b6: bool; -const {:existential true} b7: bool; -const {:existential true} b8: bool; - -axiom(b0); -axiom(b1); -axiom(b2); -axiom(b3); -axiom(b4); -axiom(b5); -axiom(!b6); -axiom(!b7); -axiom(b8); - -procedure main({:linear_in "1"} x_in: [int]bool) - requires b0 ==> x_in == mapconstbool(true); - requires b1 ==> x_in != mapconstbool(false); -{ - var {:linear "1"} x: [int] bool; - x := x_in; - - call foo(x); - - assert b6 ==> x == mapconstbool(true); - assert b7 ==> x != mapconstbool(false); - assert b8 ==> x == mapconstbool(false); -} - -procedure foo({:linear_in "1"} x_in: [int]bool) - requires b2 ==> x_in == mapconstbool(true); - requires b3 ==> x_in != mapconstbool(false); -{ - var {:linear "1"} x: [int] bool; - x := x_in; - - assert b4 ==> x == mapconstbool(true); - assert b5 ==> x != mapconstbool(false); - -} +// RUN: %boogie -noinfer -typeEncoding:m -useArrayTheory -doModSetAnalysis "%s" > "%t" +// RUN: %diff "%s.expect" "%t" +function {:builtin "MapConst"} mapconstbool(bool) : [int]bool; +const {:existential true} b0: bool; +const {:existential true} b1: bool; +const {:existential true} b2: bool; +const {:existential true} b3: bool; +const {:existential true} b4: bool; +const {:existential true} b5: bool; +const {:existential true} b6: bool; +const {:existential true} b7: bool; +const {:existential true} b8: bool; + +axiom(b0); +axiom(b1); +axiom(b2); +axiom(b3); +axiom(b4); +axiom(b5); +axiom(!b6); +axiom(!b7); +axiom(b8); + +procedure main({:linear_in "1"} x_in: [int]bool) + requires b0 ==> x_in == mapconstbool(true); + requires b1 ==> x_in != mapconstbool(false); +{ + var {:linear "1"} x: [int] bool; + x := x_in; + + call foo(x); + + assert b6 ==> x == mapconstbool(true); + assert b7 ==> x != mapconstbool(false); + assert b8 ==> x == mapconstbool(false); +} + +procedure foo({:linear_in "1"} x_in: [int]bool) + requires b2 ==> x_in == mapconstbool(true); + requires b3 ==> x_in != mapconstbool(false); +{ + var {:linear "1"} x: [int] bool; + x := x_in; + + assert b4 ==> x == mapconstbool(true); + assert b5 ==> x != mapconstbool(false); + +} -- cgit v1.2.3