From df1fcecae3a43d6079eb6b335b80d9a907945ffe Mon Sep 17 00:00:00 2001 From: wuestholz Date: Mon, 24 Nov 2014 11:14:42 +0100 Subject: Fixed issues in the verification result caching (old expressions). --- Test/snapshots/Snapshots31.v0.bpl | 15 ++++++++++++++ Test/snapshots/Snapshots31.v1.bpl | 14 +++++++++++++ Test/snapshots/Snapshots32.v0.bpl | 15 ++++++++++++++ Test/snapshots/Snapshots32.v1.bpl | 12 ++++++++++++ Test/snapshots/Snapshots33.v0.bpl | 15 ++++++++++++++ Test/snapshots/Snapshots33.v1.bpl | 8 ++++++++ Test/snapshots/runtest.snapshot | 2 +- Test/snapshots/runtest.snapshot.expect | 36 ++++++++++++++++++++++++++++++++++ 8 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 Test/snapshots/Snapshots31.v0.bpl create mode 100644 Test/snapshots/Snapshots31.v1.bpl create mode 100644 Test/snapshots/Snapshots32.v0.bpl create mode 100644 Test/snapshots/Snapshots32.v1.bpl create mode 100644 Test/snapshots/Snapshots33.v0.bpl create mode 100644 Test/snapshots/Snapshots33.v1.bpl (limited to 'Test/snapshots') 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 ) 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 ) 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 ) 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 -- cgit v1.2.3