diff options
author | mikebarnett <unknown> | 2009-07-15 21:03:41 +0000 |
---|---|---|
committer | mikebarnett <unknown> | 2009-07-15 21:03:41 +0000 |
commit | ce1c2de044c91624370411e23acab13b0381949b (patch) | |
tree | 592539996fe08050ead5ee210c973801611dde40 /Test/test13 |
Initial set of files.
Diffstat (limited to 'Test/test13')
-rw-r--r-- | Test/test13/Answer | 15 | ||||
-rw-r--r-- | Test/test13/ErrorTraceTestLoopInvViolationBPL.bpl | 30 | ||||
-rw-r--r-- | Test/test13/Output | 15 | ||||
-rw-r--r-- | Test/test13/runtest.bat | 11 |
4 files changed, 71 insertions, 0 deletions
diff --git a/Test/test13/Answer b/Test/test13/Answer new file mode 100644 index 00000000..c8263ac1 --- /dev/null +++ b/Test/test13/Answer @@ -0,0 +1,15 @@ +
+-------------------- ErrorTraceTestLoopInvViolationBPL --------------------
+ErrorTraceTestLoopInvViolationBPL.bpl(7,3): Error BP5001: This assertion might not hold.
+Execution trace:
+ ErrorTraceTestLoopInvViolationBPL.bpl(5,5): anon0
+ErrorTraceTestLoopInvViolationBPL.bpl(16,16): Error BP5004: This loop invariant might not hold on entry.
+Execution trace:
+ ErrorTraceTestLoopInvViolationBPL.bpl(14,5): anon0
+ErrorTraceTestLoopInvViolationBPL.bpl(27,17): Error BP5005: This loop invariant might not be maintained by the loop.
+Execution trace:
+ ErrorTraceTestLoopInvViolationBPL.bpl(25,5): anon0
+ ErrorTraceTestLoopInvViolationBPL.bpl(27,3): anon2_LoopHead
+ ErrorTraceTestLoopInvViolationBPL.bpl(28,7): anon2_LoopBody
+
+Boogie program verifier finished with 0 verified, 3 errors
diff --git a/Test/test13/ErrorTraceTestLoopInvViolationBPL.bpl b/Test/test13/ErrorTraceTestLoopInvViolationBPL.bpl new file mode 100644 index 00000000..f1be4414 --- /dev/null +++ b/Test/test13/ErrorTraceTestLoopInvViolationBPL.bpl @@ -0,0 +1,30 @@ +// simple assert
+procedure asserting() {
+ var x: int;
+
+ x := 0;
+
+ assert x == 1;
+}
+
+// invariant failing initially
+procedure loopInvInitiallyViolated(y: int) {
+ var x: int;
+
+ x := y;
+
+ while (true) invariant (x == 1); {
+ x := 1;
+ }
+}
+
+// invariant failing after iteration
+procedure loopInvMaintenanceViolated() {
+ var x: int;
+
+ x := 0;
+
+ while (true) invariant x == 0; {
+ x := 1;
+ }
+}
diff --git a/Test/test13/Output b/Test/test13/Output new file mode 100644 index 00000000..c8263ac1 --- /dev/null +++ b/Test/test13/Output @@ -0,0 +1,15 @@ +
+-------------------- ErrorTraceTestLoopInvViolationBPL --------------------
+ErrorTraceTestLoopInvViolationBPL.bpl(7,3): Error BP5001: This assertion might not hold.
+Execution trace:
+ ErrorTraceTestLoopInvViolationBPL.bpl(5,5): anon0
+ErrorTraceTestLoopInvViolationBPL.bpl(16,16): Error BP5004: This loop invariant might not hold on entry.
+Execution trace:
+ ErrorTraceTestLoopInvViolationBPL.bpl(14,5): anon0
+ErrorTraceTestLoopInvViolationBPL.bpl(27,17): Error BP5005: This loop invariant might not be maintained by the loop.
+Execution trace:
+ ErrorTraceTestLoopInvViolationBPL.bpl(25,5): anon0
+ ErrorTraceTestLoopInvViolationBPL.bpl(27,3): anon2_LoopHead
+ ErrorTraceTestLoopInvViolationBPL.bpl(28,7): anon2_LoopBody
+
+Boogie program verifier finished with 0 verified, 3 errors
diff --git a/Test/test13/runtest.bat b/Test/test13/runtest.bat new file mode 100644 index 00000000..e394fb2c --- /dev/null +++ b/Test/test13/runtest.bat @@ -0,0 +1,11 @@ +@echo off
+setlocal
+
+set BOOGIEDIR=..\..\Binaries
+set BPLEXE=%BOOGIEDIR%\Boogie.exe
+
+for %%f in (ErrorTraceTestLoopInvViolationBPL) do (
+ echo.
+ echo -------------------- %%f --------------------
+ "%BPLEXE%" %* %%f.bpl
+)
|