-
Notifications
You must be signed in to change notification settings - Fork 133
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
Retrieve literals fixed under assumptions #24
Comments
This is a common requested feature (for integrating SAT solvers in MaxSAT and SMT solver). For an ASE'16 paper (section 7 - called it 'imply') on combinatorial testing we added something like that to a (separate) Lingeling version. I promised to implement this for MaxSAT users for some time now, but do not have an ETA. It would require to have a separate externally visible state though (maybe call it 'IMPLIED') and changes to the model based tester too. Then 'val' (I would just reuse that instead of 'assumption_fixed') should be allowed to be called in IMPLIED state too ... |
The |
I still did not get around to do this properly. One could in principle also just misuse the decision limit. I know of several users of CaDiCaL who used this approach. |
I would like to use this property in the UWrMaxSat project. Could you explain in more details how to misuse the decision limit. |
Before calling the solver you set the decision limit to zero. You can do this before or after adding assumptions. Then call the solver. It then returns immediately after just propagating the assumptions. If this gives a conflict you can even get failed assumptions (the core). Note, that there are lots of corner cases, that need to be checked by the caller. I also just figured after reviewing the 'failing' code, that failed assumption cores are maybe in general in CaDiCaL too big: for root-level falsified literals the core should be empty while my current code marks them as failed. This is not incorrect though, since cores are not guaranteed to be minimal. Maybe the caller is already checking with 'fixed' whether an assumption is root-level implied. Another issue is, that you might want to be able to obtain implied literals (from the assumptions). This is not doable at the point. Finally, note that, CaDiCaL is optimized for heavy weight assumption usage (at this point), as in bounded model checking, where you usually only have one assumption or in general |assumptions| << |formula|. For the typical usage in MaxSAT with many assumptions there are some expected performance issues. As with most other solvers, completely resetting the solver after each call and reassuming all the assumptions even if only some changed is bad. There are published solutions for that (Randy Hickey with Fahiem Bacchus in SAT'19 and Jean-Marie Lagniez and myself in SAT'13), but this has not been properly integrated yet. Anyhow, for your usage (unless you really need the implied literals from assumptions) you can do the following:
|
Hi Armin, does the separate version of lingeling, the one that implements If not are you aware of any other SAT solvers I could use that allows this functionality? Thanks, |
I would not recommend using that experimental version of Lingeling, but in principle yes, it is possible to add that functionality to CaDiCaL, but it will take some effort, for which at the very moment, right before competition deadline, we do not really have any cycles left. |
Ok, I think in principle Katalins' (@kfazekas) new user propagator code allows to do at least a partial version of this now. What I mean with partial is that you get the literals implied by the assumed literals out of the solver. This might be different though what the original intention was, which could be interpreted to retrieve the backbones under assumptions. This is a totally different game though. If it is the former we can try to give an example for this. |
Hi,
I am using CaDiCaL to solve an application problem. I use the
fixed ()
function to extract literals that the solver fixes. However, I would be even more interested in literals that are fixed under the current set of assumptions. (Use case: in case the solver yields an indetermine answer due to hitting a conflict limit, these literals further restrict the solution of my application problem and allow application-specific simplication.)Can I simply add a modified version of
fixed ()
toInternal
that also considers decision levels above zero and wire it up via anExternal::assumption_fixed ()
toSolver::assumption_fixed ()
?Questions:
solve ()
call and whether the internal/external interface complicates this issue.)Best,
Alexander
The text was updated successfully, but these errors were encountered: