-
Notifications
You must be signed in to change notification settings - Fork 276
Separate interface for solving under assumptions [depends: 4450, blocks: 4054] #4451
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
Separate interface for solving under assumptions [depends: 4450, blocks: 4054] #4451
Conversation
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.
Am unsure but I guess it makes sense to resolve the discussion around #4450 first.
|
||
void decision_procedure_assumptionst::set_assumptions(const bvt &) | ||
{ | ||
UNREACHABLE; |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, I've actually thought I had patched that. Will change.
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.
Done
{ | ||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no particular reason except legacy. You can remove assumptions by passing an empty bvt
.
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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.
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.