-
Notifications
You must be signed in to change notification settings - Fork 274
Implement sending commands to solver in incremental SMT2 backend #6357
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
thomasspriggs
merged 18 commits into
diffblue:develop
from
thomasspriggs:tas/incremtal_backed_to_solver
Oct 8, 2021
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
e5676af
Make decision procedure use piped solver
thomasspriggs 829c778
Update existing test to add correct z3 arguments
thomasspriggs aad1bf5
Send initialisation commands to solver
thomasspriggs 3e9b4a8
Add debug logging of commands sent to SMT2 solver
thomasspriggs 778962e
Add test of the setup commands sent to smt2 solver
thomasspriggs 9027d98
Implement symbol_exprt to smt_termt conversion
thomasspriggs fba0629
Add namespace access to `smt2_incremental_decision_proceduret`
thomasspriggs f286c07
Add conversion of exprs to SMT2 and sending to solver process
thomasspriggs 6bc8b1f
Implement `dec_solve`
thomasspriggs b6bfe48
Fix guard identifier processing
thomasspriggs 74a83f7
Add test of an example with control flow
thomasspriggs 5f01e32
Disable running incremental smt2 tests on Windows
thomasspriggs 3bc5ee4
Refactor to separate solver communication from decision process
thomasspriggs 6c33e07
Fix handling of symbols with no value
thomasspriggs 28759bc
Refactor symbol lookup
thomasspriggs 91da8ba
Add smt2_incremental_decision_proceduret unit tests
thomasspriggs 7a0da55
Improve error printing in smt2 decision procedure unit test
thomasspriggs 71d746a
Make the order of SMT commands for sub-expressions deterministic
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
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.
Do we want to send these at solver construction time, or do we want to send/update these per query? I don't have a good answer now, but there was comment on another issue/PR that the logic could vary for different calls/inputs. Also do we want to be able to change these later (and is this allowed/easy to do)?
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.
According to section 4.1 of the SMTLIB standard version 2.6, the
set-logic
command can only be issued whilst the solver is in "Start mode" and the only way to return to this mode is to issue thereset
command. The actions of thereset
command include undefining all functions and assertions we have sent to the solver. Therefore if we were reseting and setting different logics for different rounds of solving, then we would no longer be carrying out incremental solving.TLDR; We should be sending these commands at construction time.