From ce1c2de044c91624370411e23acab13b0381949b Mon Sep 17 00:00:00 2001 From: mikebarnett Date: Wed, 15 Jul 2009 21:03:41 +0000 Subject: Initial set of files. --- Test/test13/Answer | 15 ++++++++++++ Test/test13/ErrorTraceTestLoopInvViolationBPL.bpl | 30 +++++++++++++++++++++++ Test/test13/Output | 15 ++++++++++++ Test/test13/runtest.bat | 11 +++++++++ 4 files changed, 71 insertions(+) create mode 100644 Test/test13/Answer create mode 100644 Test/test13/ErrorTraceTestLoopInvViolationBPL.bpl create mode 100644 Test/test13/Output create mode 100644 Test/test13/runtest.bat (limited to 'Test/test13') 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 +) -- cgit v1.2.3