From 1db1508be2b8206fd1a9051f887f2fb20970c4c0 Mon Sep 17 00:00:00 2001 From: wuestholz Date: Mon, 13 Oct 2014 23:26:57 +0200 Subject: Fix issue in verification result caching for assertions without subsumption. --- Test/snapshots/Snapshots24.v0.bpl | 25 +++++++++++++++++++++++++ Test/snapshots/Snapshots24.v1.bpl | 25 +++++++++++++++++++++++++ Test/snapshots/runtest.snapshot | 2 +- Test/snapshots/runtest.snapshot.expect | 8 ++++++++ 4 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 Test/snapshots/Snapshots24.v0.bpl create mode 100644 Test/snapshots/Snapshots24.v1.bpl (limited to 'Test') diff --git a/Test/snapshots/Snapshots24.v0.bpl b/Test/snapshots/Snapshots24.v0.bpl new file mode 100644 index 00000000..1289399b --- /dev/null +++ b/Test/snapshots/Snapshots24.v0.bpl @@ -0,0 +1,25 @@ +procedure {:checksum "0"} M(); + +implementation {:id "M"} {:checksum "1"} M() +{ + if (*) + { + assert {:subsumption 0} 1 != 1; // error + } + else if (*) + { + assert {:subsumption 1} 5 != 5; // error + } + else if (*) + { + assert {:subsumption 2} 6 != 6; // error + } + else + { + assert {:subsumption 1} 2 == 2; + assert {:subsumption 2} 4 == 4; + assert 5 == 5; + } + + assert {:subsumption 0} 3 == 3; +} diff --git a/Test/snapshots/Snapshots24.v1.bpl b/Test/snapshots/Snapshots24.v1.bpl new file mode 100644 index 00000000..00d65961 --- /dev/null +++ b/Test/snapshots/Snapshots24.v1.bpl @@ -0,0 +1,25 @@ +procedure {:checksum "0"} M(); + +implementation {:id "M"} {:checksum "2"} M() +{ + if (*) + { + assert {:subsumption 0} 1 == 1; + } + else if (*) + { + assert {:subsumption 1} 5 == 5; + } + else if (*) + { + assert {:subsumption 2} 6 != 6; // error + } + else + { + assert {:subsumption 1} 2 == 2; + assert {:subsumption 2} 4 == 4; + assert 5 == 5; + } + + assert {:subsumption 0} 3 == 3; +} diff --git a/Test/snapshots/runtest.snapshot b/Test/snapshots/runtest.snapshot index 32c88216..04943c25 100644 --- a/Test/snapshots/runtest.snapshot +++ b/Test/snapshots/runtest.snapshot @@ -1,2 +1,2 @@ -// RUN: %boogie -errorTrace:0 -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 Snapshots17.bpl Snapshots18.bpl Snapshots19.bpl Snapshots20.bpl Snapshots21.bpl Snapshots22.bpl Snapshots23.bpl > "%t" +// RUN: %boogie -errorTrace:0 -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 Snapshots17.bpl Snapshots18.bpl Snapshots19.bpl Snapshots20.bpl Snapshots21.bpl Snapshots22.bpl Snapshots23.bpl Snapshots24.bpl > "%t" // RUN: %diff "%s.expect" "%t" diff --git a/Test/snapshots/runtest.snapshot.expect b/Test/snapshots/runtest.snapshot.expect index fd054579..899cd914 100644 --- a/Test/snapshots/runtest.snapshot.expect +++ b/Test/snapshots/runtest.snapshot.expect @@ -152,3 +152,11 @@ Boogie program verifier finished with 1 verified, 1 error Snapshots23.v0.bpl(7,9): Error BP5001: This assertion might not hold. Boogie program verifier finished with 1 verified, 1 error +Snapshots24.v0.bpl(7,9): Error BP5001: This assertion might not hold. +Snapshots24.v0.bpl(11,9): Error BP5001: This assertion might not hold. +Snapshots24.v0.bpl(15,9): Error BP5001: This assertion might not hold. + +Boogie program verifier finished with 0 verified, 3 errors +Snapshots24.v0.bpl(15,9): Error BP5001: This assertion might not hold. + +Boogie program verifier finished with 0 verified, 1 error -- cgit v1.2.3