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

Trivial UNSAT instances do not produce 0 models #5

Open
cernoch opened this issue Jul 18, 2018 · 1 comment
Open

Trivial UNSAT instances do not produce 0 models #5

cernoch opened this issue Jul 18, 2018 · 1 comment

Comments

@cernoch
Copy link
Member

cernoch commented Jul 18, 2018

If the input CNF contains a trivial contradiction (say clauses 1 and -1), sharpSAT does not calculate the number of models as 0.

See a provided test case integration/unsat-most-trivial in bbbd0b5 for reproducibility.

What I've noticed:

  • Adding a binary clause on top of the trivial contradiction, the issue remains (see integration/unsat-trivial-redundant).
  • If the contradiction is inferred by unit propagation, the issue is not there (see integration/unsat-by-unit-propagation).
  • If the contradiction is inferred by other means, the issue is not there (see integration/unsat-exhaustive-binary).
@cernoch
Copy link
Member Author

cernoch commented Jul 20, 2018

This causes the problem:

assert(!isUnitClause(literals[0].neg()));

At least, this should be turned into an exception, so that rhe release mode does not (silently) produce wrong results.

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

1 participant