-
Notifications
You must be signed in to change notification settings - Fork 284
Incremental solving producing cprover status as it goes #5316
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
NlightNFotis
merged 7 commits into
diffblue:develop
from
thk123:print-status-during-incremental-solving
May 4, 2020
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
320da32
Add tests verifying the incremental status is output
d4c5e99
Tests for incremental status with multiple properties
22bce6f
Print incremental-status when doing incremental solving
fdbbf7e
Tweak where we print the incremental status
0e6cfbf
Adapt tests for printing
3f6f0ca
Add tests for when the program verifies
4972f54
Add test to check for no incremental status when no properties to check
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
CORE | ||
main.c | ||
--incremental-loop main.0 --unwind-max 15 | ||
activate-multi-line-match | ||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
^VERIFICATION SUCCESSFUL$ | ||
Incremental status: INCONCLUSIVE\nCurrent unwinding: 15 | ||
-- | ||
^warning: ignoring |
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 |
---|---|---|
@@ -1,9 +1,15 @@ | ||
CORE | ||
main.c | ||
--incremental-loop main.0 --unwind-min 5 --unwind-max 10 | ||
activate-multi-line-match | ||
Current unwinding: 1 | ||
Incremental status: INCONCLUSIVE | ||
Incremental status: INCONCLUSIVE\nCurrent unwinding: 6 | ||
Incremental status: INCONCLUSIVE\nCurrent unwinding: 7 | ||
^EXIT=10$ | ||
^SIGNAL=0$ | ||
^VERIFICATION FAILED$ | ||
-- | ||
^warning: ignoring | ||
-- | ||
The multi-line match is added to verify that an incremental status is printed immediately after each unwinding |
18 changes: 18 additions & 0 deletions
18
regression/cbmc-incr-oneloop/multiple-asserts/test-no-cp.desc
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,18 @@ | ||
CORE | ||
test.c | ||
--incremental-loop main.0 --no-propagation | ||
activate-multi-line-match | ||
Incremental status: INCONCLUSIVE\nCurrent unwinding: 2 | ||
Incremental status: INCONCLUSIVE\nCurrent unwinding: 6 | ||
Incremental status: FAILURE\nCurrent unwinding: 7 | ||
^EXIT=10$ | ||
^SIGNAL=0$ | ||
^VERIFICATION FAILED$ | ||
-- | ||
^warning: ignoring | ||
-- | ||
Ensure that with multiple properties, the incremental status | ||
switches to failure as soon as one property has been falsified | ||
but keeps unwinding till it has resolved them all | ||
|
||
Use `--no-propagation` to ensure that even the output is the same regardless of whether the asserts are checked via the solver or the constant propagator |
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,9 @@ | ||
int main() | ||
{ | ||
for(int i = 0; i < 10; ++i) | ||
{ | ||
assert(i != 5); | ||
assert(i != 8); | ||
} | ||
return 0; | ||
} |
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,16 @@ | ||
CORE | ||
test.c | ||
--incremental-loop main.0 | ||
activate-multi-line-match | ||
Incremental status: INCONCLUSIVE\nCurrent unwinding: 2 | ||
Incremental status: INCONCLUSIVE\nCurrent unwinding: 6 | ||
Incremental status: FAILURE\nCurrent unwinding: 7 | ||
^EXIT=10$ | ||
^SIGNAL=0$ | ||
^VERIFICATION FAILED$ | ||
-- | ||
^warning: ignoring | ||
-- | ||
Ensure that with multiple properties, the incremental status | ||
switches to failure as soon as one property has been falsified | ||
but keeps unwinding till it has resolved them all |
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,8 @@ | ||
int main() | ||
{ | ||
for(int i = 0; i < 10; ++i) | ||
{ | ||
} | ||
// nothing to check | ||
return 0; | ||
} |
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 @@ | ||
CORE | ||
test.c | ||
--incremental-loop main.0 | ||
activate-multi-line-match | ||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
VERIFICATION SUCCESSFUL | ||
-- | ||
Incremental status | ||
-- | ||
Verify no incremental status updates when no properties to check |
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,8 @@ | ||
int main() | ||
{ | ||
for(int i = 0; i < 10; ++i) | ||
{ | ||
assert(i != 10); | ||
} | ||
return 0; | ||
} |
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,16 @@ | ||
CORE | ||
test.c | ||
--incremental-loop main.0 | ||
activate-multi-line-match | ||
Incremental status: INCONCLUSIVE\nCurrent unwinding: 2 | ||
Incremental status: INCONCLUSIVE\nCurrent unwinding: 10 | ||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
^VERIFICATION SUCCESSFUL$ | ||
-- | ||
^warning: ignoring | ||
Incremental status: SUCCESS | ||
-- | ||
Check that for valid asserts, the incremental status is inconclusive | ||
as it is only after the incrementer has been stopped we conclude is | ||
verified. |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this behave in the success case?
Please check the output also on a
VERIFICATION SUCCESSFUL
test.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peterschrammel In the commit message this says that it's not possible to conclude that verification is successful before the unwinding is finished, so it doesn't matter?