diff options
author | wuestholz <unknown> | 2014-07-03 03:20:50 +0200 |
---|---|---|
committer | wuestholz <unknown> | 2014-07-03 03:20:50 +0200 |
commit | d274c9f110459096a71b8aabbcf7cf27582bf70e (patch) | |
tree | a6ed947fe2550ab1dec3456d28e59dba840b8cf7 /Test | |
parent | cd4a6b3e97b74abd0fabc70b071ba2b80d6227d2 (diff) |
Fixed issue involving axioms in the dependency analysis used for verification result caching.
Diffstat (limited to 'Test')
-rw-r--r-- | Test/snapshots/Snapshots16.v0.bpl | 15 | ||||
-rw-r--r-- | Test/snapshots/Snapshots16.v1.bpl | 15 | ||||
-rw-r--r-- | Test/snapshots/runtest.snapshot | 2 | ||||
-rw-r--r-- | Test/snapshots/runtest.snapshot.expect | 7 |
4 files changed, 38 insertions, 1 deletions
diff --git a/Test/snapshots/Snapshots16.v0.bpl b/Test/snapshots/Snapshots16.v0.bpl new file mode 100644 index 00000000..45cb4a76 --- /dev/null +++ b/Test/snapshots/Snapshots16.v0.bpl @@ -0,0 +1,15 @@ +function {:checksum "1"} PlusOne(n: int) : int
+{
+ n + 1
+}
+
+function {:checksum "0"} F(n: int) : int;
+
+axiom (forall n: int :: { F(n) } F(n) == PlusOne(n));
+
+procedure {:checksum "2"} M();
+
+implementation {:id "M"} {:checksum "3"} M()
+{
+ assert F(0) == 1;
+}
diff --git a/Test/snapshots/Snapshots16.v1.bpl b/Test/snapshots/Snapshots16.v1.bpl new file mode 100644 index 00000000..4d7cc354 --- /dev/null +++ b/Test/snapshots/Snapshots16.v1.bpl @@ -0,0 +1,15 @@ +function {:checksum "4"} PlusOne(n: int) : int
+{
+ n + 2
+}
+
+function {:checksum "0"} F(n: int) : int;
+
+axiom (forall n: int :: { F(n) } F(n) == PlusOne(n));
+
+procedure {:checksum "2"} M();
+
+implementation {:id "M"} {:checksum "3"} M()
+{
+ assert F(0) == 1; // error
+}
diff --git a/Test/snapshots/runtest.snapshot b/Test/snapshots/runtest.snapshot index 9d456440..ffa54a53 100644 --- a/Test/snapshots/runtest.snapshot +++ b/Test/snapshots/runtest.snapshot @@ -1,2 +1,2 @@ -// RUN: %boogie -verifySnapshots:2 -verifySeparately 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 > "%t" +// RUN: %boogie -verifySnapshots:2 -verifySeparately 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 > "%t" // RUN: %diff "%s.expect" "%t" diff --git a/Test/snapshots/runtest.snapshot.expect b/Test/snapshots/runtest.snapshot.expect index 853c5a80..41193348 100644 --- a/Test/snapshots/runtest.snapshot.expect +++ b/Test/snapshots/runtest.snapshot.expect @@ -142,3 +142,10 @@ Execution trace: Snapshots15.v1.bpl(5,5): anon0
Boogie program verifier finished with 0 verified, 1 error
+
+Boogie program verifier finished with 1 verified, 0 errors
+Snapshots16.v1.bpl(14,5): Error BP5001: This assertion might not hold.
+Execution trace:
+ Snapshots16.v1.bpl(14,5): anon0
+
+Boogie program verifier finished with 0 verified, 1 error
|