Skip to content
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

Open
Dekker1 opened this issue Jul 8, 2024 · 1 comment
Open

[IPASIR UP] Search with uninitialized search limits #106

Dekker1 opened this issue Jul 8, 2024 · 1 comment

Comments

@Dekker1
Copy link

Dekker1 commented Jul 8, 2024

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

@m-fleury
Copy link
Collaborator

m-fleury commented Jul 8, 2024

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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants