Separate interface for solving under assumptions [depends: 4450, blocks: 4054]#4451
Separate interface for solving under assumptions [depends: 4450, blocks: 4054]#4451peterschrammel wants to merge 4 commits intodiffblue:developfrom
Conversation
|
|
||
| void decision_procedure_assumptionst::set_assumptions(const bvt &) | ||
| { | ||
| UNREACHABLE; |
There was a problem hiding this comment.
Could this be pure virtual or something else? Base implementations of methods that are just "nope!" make me kinda nervous.
There was a problem hiding this comment.
True, I've actually thought I had patched that. Will change.
| { | ||
| public: | ||
| /// Set assumptions for the next call to operator() to solve the problem | ||
| virtual void set_assumptions(const bvt &); |
There was a problem hiding this comment.
Why is this / should this be a separate call? If the solver is deterministic then it's not like you are going to call solve multiple times? One reason it might be separate is that you want to be able to call this multiple times, but, if that is the case, do you need interfaces to manage and remove these?
There was a problem hiding this comment.
There is no particular reason except legacy. You can remove assumptions by passing an empty bvt.
There was a problem hiding this comment.
If we are going to refactor then really the assumptions should be an argument to the solve call and not stateful.
There was a problem hiding this comment.
Better yet; it can be an argument and a result of the solve call so we can get back a reduced set of assumptions that are sufficient to give UNSAT.
6b7e292 to
1de02f5
Compare
|
@martin-cs, another question is whether |
03739c1 to
de0f768
Compare
decision_procedure_incrementalt will then be further split into support for assumptions and contexts.
Makes it explicit which algorithms actually require this feature.
This is only provided by the prop_conv_solvert-based hierarchy at the moment and is quite specific to MiniSAT-based solvers. The functionality itself is used out-of-tree only (2LS).
de0f768 to
a17fb36
Compare
allredj
left a comment
There was a problem hiding this comment.
This PR failed Diffblue compatibility checks (cbmc commit: a17fb36).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/106239885
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.
|
To my mind |
|
@martin-cs, no. Minisat Solver.cc:401: |
|
@peterschrammel : my point is that this could be wrapped by this API and made into a single call to |
|
obsolete |
Based on #4450, only review last commit.