-
Notifications
You must be signed in to change notification settings - Fork 274
Add interpretation of SMT check-sat responses for incremental SMT solving support #6474
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 9 commits into
diffblue:develop
from
thomasspriggs:tas/smt_sat_unsat
Nov 26, 2021
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
07ae79d
Mark validate_smt_response `NODISCARD`
thomasspriggs b94fc17
Add test of existing `number_of_solver_calls` implementation
thomasspriggs 0fa9a43
Add interpretation of SMT check-sat responses
thomasspriggs 5a18428
Complete unit test of solving count
thomasspriggs 0889b84
Add regression test for SMT2 solver returning unsat
thomasspriggs 13da8cf
Separate duplicated unit test environment setup code
thomasspriggs 194bf8a
Add unit test of check-sat response to decision result mapping
thomasspriggs 040d6d1
Implement handling of success messages from SMT solver
thomasspriggs 1441111
Implement handling of unexpected responses from SMT solver
thomasspriggs 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
12 changes: 12 additions & 0 deletions
12
regression/cbmc-incr-smt2/nondeterministic-int-assert/valid_unsat.c
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,12 @@ | ||
|
||
int main() | ||
{ | ||
int x; | ||
int y; | ||
if(y) | ||
y = x; | ||
else | ||
y = x; | ||
__CPROVER_assert(y == x, "Nondeterministic int assert."); | ||
return 0; | ||
} |
14 changes: 14 additions & 0 deletions
14
regression/cbmc-incr-smt2/nondeterministic-int-assert/valid_unsat.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,14 @@ | ||
CORE winbug | ||
valid_unsat.c | ||
--incremental-smt2-solver "z3 --smt2 -in" --verbosity 10 | ||
Passing problem to incremental SMT2 solving via "z3 --smt2 -in" | ||
Sending command to SMT2 solver - \(check-sat\) | ||
Solver response - unsat | ||
VERIFICATION SUCCESSFUL | ||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
-- | ||
type: pointer | ||
-- | ||
Test that given a `.c` program where all assertions hold, the solver responds | ||
with unsat and CBMC reports that verification is successful. |
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
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.