forked from boogie-org/boogie
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix for deterministicExtractLoops for nested loops
- Loading branch information
1 parent
e037ca9
commit 02f5c06
Showing
3 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// RUN: %boogie -nologo -stratifiedInline:1 -extractLoops -deterministicExtractLoops -recursionBound:100 "%s" > "%t" | ||
// RUN: %diff "%s.expect" "%t" | ||
|
||
//This example checks the bug fix in the loop extract for http://symdiff.codeplex.com/workitem/1 | ||
|
||
var t: int; | ||
procedure {:entrypoint} NestedLoops() | ||
modifies t; | ||
//ensures t == 6; | ||
{ | ||
var i:int, j:int; | ||
i, j, t := 0, 0, 0; | ||
while(i < 2) { | ||
j := 0; | ||
while (j < 3) { | ||
t := t + 1; | ||
j := j + 1; | ||
} | ||
i := i + 1; | ||
} | ||
assume true; //would be provable (!true) wihtout the fix | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
(0,0): Error BP5001: This assertion might not hold. | ||
Execution trace: | ||
detLoopExtractNested.bpl(12,12): anon0 | ||
detLoopExtractNested.bpl(14,8): anon5_LoopBody | ||
detLoopExtractNested.bpl(16,10): anon6_LoopBody | ||
detLoopExtractNested.bpl(16,10): anon6_LoopBody | ||
detLoopExtractNested.bpl(16,10): anon6_LoopBody | ||
detLoopExtractNested.bpl(15,6): anon6_LoopDone | ||
detLoopExtractNested.bpl(15,6): anon6_LoopDone | ||
detLoopExtractNested.bpl(14,8): anon5_LoopBody | ||
detLoopExtractNested.bpl(16,10): anon6_LoopBody | ||
detLoopExtractNested.bpl(16,10): anon6_LoopBody | ||
detLoopExtractNested.bpl(16,10): anon6_LoopBody | ||
detLoopExtractNested.bpl(15,6): anon6_LoopDone | ||
detLoopExtractNested.bpl(15,6): anon6_LoopDone | ||
detLoopExtractNested.bpl(13,4): anon5_LoopDone | ||
detLoopExtractNested.bpl(13,4): anon5_LoopDone | ||
|
||
Boogie program verifier finished with 0 verified, 1 error |