summaryrefslogtreecommitdiff
path: root/Test/snapshots
diff options
context:
space:
mode:
authorGravatar wuestholz <unknown>2014-11-24 11:14:42 +0100
committerGravatar wuestholz <unknown>2014-11-24 11:14:42 +0100
commitdf1fcecae3a43d6079eb6b335b80d9a907945ffe (patch)
tree249432178878fee6e0ef21c9739e39c057c62b94 /Test/snapshots
parent30de798ff34bbb34ee474ee510aba08c43e9ac7c (diff)
Fixed issues in the verification result caching (old expressions).
Diffstat (limited to 'Test/snapshots')
-rw-r--r--Test/snapshots/Snapshots31.v0.bpl15
-rw-r--r--Test/snapshots/Snapshots31.v1.bpl14
-rw-r--r--Test/snapshots/Snapshots32.v0.bpl15
-rw-r--r--Test/snapshots/Snapshots32.v1.bpl12
-rw-r--r--Test/snapshots/Snapshots33.v0.bpl15
-rw-r--r--Test/snapshots/Snapshots33.v1.bpl8
-rw-r--r--Test/snapshots/runtest.snapshot2
-rw-r--r--Test/snapshots/runtest.snapshot.expect36
8 files changed, 116 insertions, 1 deletions
diff --git a/Test/snapshots/Snapshots31.v0.bpl b/Test/snapshots/Snapshots31.v0.bpl
new file mode 100644
index 00000000..845a6cef
--- /dev/null
+++ b/Test/snapshots/Snapshots31.v0.bpl
@@ -0,0 +1,15 @@
+var g: int;
+
+procedure {:checksum "0"} P();
+ requires g == 0;
+ modifies g;
+
+implementation {:id "P"} {:checksum "1"} P()
+{
+ call Q();
+ assert 0 < g;
+}
+
+procedure {:checksum "2"} Q();
+ modifies g;
+ ensures old(g) < g;
diff --git a/Test/snapshots/Snapshots31.v1.bpl b/Test/snapshots/Snapshots31.v1.bpl
new file mode 100644
index 00000000..a3b37168
--- /dev/null
+++ b/Test/snapshots/Snapshots31.v1.bpl
@@ -0,0 +1,14 @@
+var g: int;
+
+procedure {:checksum "0"} P();
+ requires g == 0;
+ modifies g;
+
+implementation {:id "P"} {:checksum "1"} P()
+{
+ call Q();
+ assert 0 < g;
+}
+
+procedure {:checksum "3"} Q();
+ modifies g;
diff --git a/Test/snapshots/Snapshots32.v0.bpl b/Test/snapshots/Snapshots32.v0.bpl
new file mode 100644
index 00000000..845a6cef
--- /dev/null
+++ b/Test/snapshots/Snapshots32.v0.bpl
@@ -0,0 +1,15 @@
+var g: int;
+
+procedure {:checksum "0"} P();
+ requires g == 0;
+ modifies g;
+
+implementation {:id "P"} {:checksum "1"} P()
+{
+ call Q();
+ assert 0 < g;
+}
+
+procedure {:checksum "2"} Q();
+ modifies g;
+ ensures old(g) < g;
diff --git a/Test/snapshots/Snapshots32.v1.bpl b/Test/snapshots/Snapshots32.v1.bpl
new file mode 100644
index 00000000..cbffe891
--- /dev/null
+++ b/Test/snapshots/Snapshots32.v1.bpl
@@ -0,0 +1,12 @@
+var g: int;
+
+procedure {:checksum "0"} P();
+ requires g == 0;
+
+implementation {:id "P"} {:checksum "1"} P()
+{
+ call Q();
+ assert 0 < g;
+}
+
+procedure {:checksum "3"} Q();
diff --git a/Test/snapshots/Snapshots33.v0.bpl b/Test/snapshots/Snapshots33.v0.bpl
new file mode 100644
index 00000000..845a6cef
--- /dev/null
+++ b/Test/snapshots/Snapshots33.v0.bpl
@@ -0,0 +1,15 @@
+var g: int;
+
+procedure {:checksum "0"} P();
+ requires g == 0;
+ modifies g;
+
+implementation {:id "P"} {:checksum "1"} P()
+{
+ call Q();
+ assert 0 < g;
+}
+
+procedure {:checksum "2"} Q();
+ modifies g;
+ ensures old(g) < g;
diff --git a/Test/snapshots/Snapshots33.v1.bpl b/Test/snapshots/Snapshots33.v1.bpl
new file mode 100644
index 00000000..1c6d6dbf
--- /dev/null
+++ b/Test/snapshots/Snapshots33.v1.bpl
@@ -0,0 +1,8 @@
+procedure {:checksum "5"} P();
+
+implementation {:id "P"} {:checksum "4"} P()
+{
+ call Q();
+}
+
+procedure {:checksum "3"} Q();
diff --git a/Test/snapshots/runtest.snapshot b/Test/snapshots/runtest.snapshot
index fb476128..a203ffac 100644
--- a/Test/snapshots/runtest.snapshot
+++ b/Test/snapshots/runtest.snapshot
@@ -1,2 +1,2 @@
-// RUN: %boogie -errorTrace:0 -traceCaching:1 -verifySnapshots:2 -verifySeparately -noinfer Snapshots0.bpl Snapshots1.bpl Snapshots2.bpl Snapshots3.bpl Snapshots4.bpl Snapshots5.bpl Snapshots6.bpl Snapshots7.bpl Snapshots8.bpl Snapshots9.bpl Snapshots10.bpl Snapshots11.bpl Snapshots12.bpl Snapshots13.bpl Snapshots14.bpl Snapshots15.bpl Snapshots16.bpl Snapshots17.bpl Snapshots18.bpl Snapshots19.bpl Snapshots20.bpl Snapshots21.bpl Snapshots22.bpl Snapshots23.bpl Snapshots24.bpl Snapshots25.bpl Snapshots26.bpl Snapshots27.bpl Snapshots28.bpl Snapshots30.bpl > "%t"
+// RUN: %boogie -errorTrace:0 -traceCaching:1 -verifySnapshots:2 -verifySeparately -noinfer Snapshots0.bpl Snapshots1.bpl Snapshots2.bpl Snapshots3.bpl Snapshots4.bpl Snapshots5.bpl Snapshots6.bpl Snapshots7.bpl Snapshots8.bpl Snapshots9.bpl Snapshots10.bpl Snapshots11.bpl Snapshots12.bpl Snapshots13.bpl Snapshots14.bpl Snapshots15.bpl Snapshots16.bpl Snapshots17.bpl Snapshots18.bpl Snapshots19.bpl Snapshots20.bpl Snapshots21.bpl Snapshots22.bpl Snapshots23.bpl Snapshots24.bpl Snapshots25.bpl Snapshots26.bpl Snapshots27.bpl Snapshots28.bpl Snapshots30.bpl Snapshots31.bpl Snapshots32.bpl Snapshots33.bpl > "%t"
// RUN: %diff "%s.expect" "%t"
diff --git a/Test/snapshots/runtest.snapshot.expect b/Test/snapshots/runtest.snapshot.expect
index d8642441..7f912427 100644
--- a/Test/snapshots/runtest.snapshot.expect
+++ b/Test/snapshots/runtest.snapshot.expect
@@ -126,6 +126,7 @@ Processing command (at Snapshots7.v0.bpl(14,5)) assert y < 0;
Boogie program verifier finished with 1 verified, 0 errors
Processing call to procedure N in implementation M (at Snapshots7.v1.bpl(12,5)):
+ >>> added before: y##old##0 := y;
>>> added after: a##post##0 := a##post##0 && y < z;
Processing command (at <unknown location>) a##post##0 := a##post##0 && y < z;
>>> AssumeNegationOfAssumptionVariable
@@ -546,3 +547,38 @@ Snapshots30.v0.bpl(5,5): Error BP5002: A precondition for this call might not ho
Snapshots30.v0.bpl(11,3): Related location: This is the precondition that might not hold.
Boogie program verifier finished with 0 verified, 1 error
+Processing command (at Snapshots31.v0.bpl(10,5)) assert 0 < g;
+ >>> DoNothingToAssert
+
+Boogie program verifier finished with 1 verified, 0 errors
+Processing call to procedure Q in implementation P (at Snapshots31.v1.bpl(9,5)):
+ >>> added after: a##post##0 := a##post##0 && call0old#AT#g < g;
+Processing command (at <unknown location>) a##post##0 := a##post##0 && call0old#AT#g < g;
+ >>> AssumeNegationOfAssumptionVariable
+Processing command (at Snapshots31.v1.bpl(10,5)) assert 0 < g;
+ >>> MarkAsPartiallyVerified
+Snapshots31.v1.bpl(10,5): Error BP5001: This assertion might not hold.
+
+Boogie program verifier finished with 0 verified, 1 error
+Processing command (at Snapshots32.v0.bpl(10,5)) assert 0 < g;
+ >>> DoNothingToAssert
+
+Boogie program verifier finished with 1 verified, 0 errors
+Processing call to procedure Q in implementation P (at Snapshots32.v1.bpl(8,5)):
+ >>> added before: g##old##0 := g;
+ >>> added after: a##post##0 := a##post##0 && g##old##0 < g;
+Processing command (at <unknown location>) a##post##0 := a##post##0 && g##old##0 < g;
+ >>> AssumeNegationOfAssumptionVariable
+Processing command (at Snapshots32.v1.bpl(9,5)) assert 0 < g;
+ >>> MarkAsPartiallyVerified
+Snapshots32.v1.bpl(9,5): Error BP5001: This assertion might not hold.
+
+Boogie program verifier finished with 0 verified, 1 error
+Processing command (at Snapshots33.v0.bpl(10,5)) assert 0 < g;
+ >>> DoNothingToAssert
+
+Boogie program verifier finished with 1 verified, 0 errors
+Processing call to procedure Q in implementation P (at Snapshots33.v1.bpl(5,5)):
+ >>> added after: a##post##0 := a##post##0 && false;
+
+Boogie program verifier finished with 1 verified, 0 errors