-
Notifications
You must be signed in to change notification settings - Fork 134
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
[IPASIR UP] Search with uninitialized search limits #106
Comments
The general idea of the interface is that you add the initial clauses before asking cadical to solve the problem (instead of adding them during the check_model). But we should fix this, thanks for reporting. @kfazekas is mobical able to generate such problems (so empty and only adding clauses during check_model)? |
This was not fixed in 2.1, please continue adding at least one clause before calling solve. |
A shame no fix made it into the 2.1 release. There certainly seem to be some great IPASIR-UP improvements in there. I’m not sure whether the closing of this issue meant that no fix is planned for this issue. I just wanted to note that it is not just when no clauses are added to the solver (which not uncommon in our LCG solver), but this issue occurs also when the formula is solved during presolving. This makes the issue trickier than just “adding at least one clause” from the user side. |
Reopening the issue.
What resolving do you mean here? |
Sorry, that was meant to say “presolving” but got corrected by my phone 😅 |
Yeah but I am still confused how you trigger that.
You have a way to run the solver without hitting Or am I missing something? Edit: or some example where this happens would be helpful. |
Sorry. It seems that I might have misjudged this. I’ve only run into this issue when by happenstance creating formulas with no initial clauses. However, I saw the Still I would love to see a merged fix for this problem. The current behaviour that still calls the |
When implementing a lazy solving approach, I ended up in a situation where Cadical (with the IPASIR UP interface) would start with an empty formula, where the
check_model
callback in the ExternalPropagator would then add the initial clauses. Although this callback proceeded correctly, Cadical would then immediately return the “unknown” result.I managed to trace this back to Cadical checking the search limits in the extended CDCL loop, and because its limits weren't initialized would immediately exit. I found that ensuring that the limits always get initialized when having an external propagator in
Internal::solve
seems to solve a problem.I’ve attached a patch with this small change and an additional assertion that limits are initialized when checked. I’d love to hear whether this is the correct approach, or whether I’m overlooking something.
ipasirup_init_limits-1.patch
The text was updated successfully, but these errors were encountered: