-
Notifications
You must be signed in to change notification settings - Fork 119
Add support for irreducible CFG #1032
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
f1324cb
Added implementation for irreducible CFG
radumcostache a5560d9
Fixed style issues
radumcostache 46b2f30
Added test cases
radumcostache ffe60b4
Changed name for a test
radumcostache f605f1d
Merge branch 'master' into irreducible-cfg
shazqadeer 8bf4aae
Merge branch 'master' into irreducible-cfg
radumcostache 5b70d43
Merge branch 'master' into irreducible-cfg
radumcostache 39e295a
Refactor conversion to reducible graph (generalize)
radumcostache c7014d9
Drop irreducible exceptions
radumcostache 050296c
Drop unused return value
radumcostache 97cfe8e
Update CommandLineOptions
radumcostache 94845b2
Drop previous TODO comment
radumcostache 927dd9e
Cleanup according to the review
radumcostache 24ae8e1
Fix failing assertion
radumcostache a225a98
Add testcase for irreducible and extractLoops
radumcostache 092bc4c
Merge branch 'master' into irreducible-cfg
radumcostache File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,44 @@ | ||
| // RUN: %parallel-boogie "%s" > "%t" | ||
| // RUN: %OutputCheck --file-to-check "%t" "%s" | ||
| // CHECK-L: Boogie program verifier finished with 1 verified, 0 errors | ||
|
|
||
| var new: int; | ||
| procedure await_eq_add(val : int) | ||
| modifies new; | ||
| ensures val == old(val); | ||
| ensures (new == old(new) + val); | ||
| { | ||
| var x : int; | ||
| var tmp : bool; | ||
| assume tmp == true; | ||
| B: | ||
| havoc x; | ||
| if (x == val) { | ||
| goto E; | ||
| } | ||
| else { | ||
| goto C; | ||
| } | ||
| C: | ||
| if (tmp == true) { | ||
| havoc x; | ||
| } | ||
| goto D; | ||
| D: | ||
| if (x != val) { | ||
| goto C; | ||
| } | ||
| else { | ||
| goto E; | ||
| } | ||
| E: | ||
| havoc tmp; | ||
| if (tmp == true) { | ||
| new := new + x; | ||
| goto G; | ||
| } | ||
| else { | ||
| goto C; | ||
| } | ||
| G: | ||
| } |
This file contains hidden or 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,26 @@ | ||
| // RUN: %parallel-boogie "%s" > "%t" | ||
| // RUN: %diff "%s.expect" "%t" | ||
|
|
||
| procedure irreducible() { | ||
| var i: int; | ||
| var j: int; | ||
|
|
||
| i := 1; | ||
| goto B1, B4; | ||
|
|
||
| B1: | ||
| assume j > 0; | ||
| goto B2; | ||
|
|
||
| B2: | ||
| assert i > 0; | ||
| goto B3; | ||
|
|
||
| B3: | ||
| assert j > 0; | ||
| goto B4; | ||
|
|
||
| B4: | ||
| i := i+1; | ||
| goto B2; | ||
| } |
This file contains hidden or 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,5 @@ | ||
| BackEdgeCounter.bpl(20,9): Error: this loop invariant could not be proved on entry | ||
| Execution trace: | ||
| BackEdgeCounter.bpl(8,7): anon0 | ||
|
|
||
| Boogie program verifier finished with 0 verified, 1 error |
This file contains hidden or 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,11 @@ | ||
| // RUN: %parallel-boogie "%s" > "%t" | ||
| // RUN: %OutputCheck --file-to-check "%t" "%s" | ||
| // CHECK-L: Boogie program verifier finished with 1 verified, 0 errors | ||
|
|
||
| procedure Irreducible () | ||
| { | ||
| A: goto B,C; | ||
| B: goto C,D; | ||
| C: goto B; | ||
| D: return; | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.