-
Notifications
You must be signed in to change notification settings - Fork 3
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
coprocessor produces empty CNF #13
Comments
Hi, a produced empty formula means that Coprocessor was able to show that the formula was satisfiable. With the help of the undo information (see e.g. the scripts/cp.sh script), a model can be constructed. Best, PS: I moved the source here: https://github.com/conp-solutions/riss and will likely remove this repository soonish. |
I see, thanks -- the empty CNF has a single empty model, which is translated back into a model of the original input. So this means that the undo process is not just a matter of variable substitution. In order to translate a preprocessed model, coprocessor must solve another CNF, right? |
An empty CNF might have multiple solutions (depending on the "p cnf" line). The undo information is used to transform the model for the simplified formula back into a model for the original formula. This process is polynomial, basically equivalent to
As this stack is constructed such that the above algorithm results in a model of the simplified formula, this procedure is polynomial. Note, two different models for the simplified formula might result in the same for the original one. That heavily depends on the simplification techniques that have been applied. While all techniques preserve satisfiability, some of them do not preserve equivalence (ignoring renaming for simplicity), so the number of models for the simplified and original formula might differ a lot. |
That's interesting. When I run minisat over an empty CNF, it always returns an empty answer |
Yeah, that's a problem with MiniSat handling input formulas. It only treats variables it spots in the formula during parsing. I just fixed my MiniSat fork wrt this behaviour: |
Variables are dropped from the mapping, if they do not occur in the formula any more (except the variables of the whileList file). A variable is also dropped in case Coprocessor was able to find a unique mapping for a variable (resolved it as unit clause). To keep those variables, another flag has to be set. The following combination worked for me during experiments with a small example formula: -dense -cp3_keep_set To be honest, the implementation details of most CNF simplifications are not really documented. There are papers about the technique, but that's about it (sorry for that. Running with the -*-debug options with coprocessor should help a lot). BTW: please make sure you use the more recent variant of Coprocessor. I fix bugs only in the other repository. Best, |
Sometimes the simplified CNF produced by coprocessor is empty. I don't know how to interpret this result.
For example, here's a very simple CNF:
Run the command:
The contents of the file
preprocessed
is simply:Is it an error? Or does it imply that
input
cannot be simplified?The text was updated successfully, but these errors were encountered: