Add Exact Qrisp SAT Solver Variant #113
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
exact_sat.py
and the correspondingExactQrispSatSolver
classThis variant utilizes (almost) the same logic as the default
QrispSatSolver
. The key difference is that this version (in theory) avoids considering impossible variable assignments. For this, the Oracle needs to know the size of the solution space.sharp-sat-solver
As mentioned above,
exact_sat.py
requires the size of the solution space to function correctly. To address this, I have added a Linux binary that, given a.cnf
file, approximates the number of solutions. Unfortunately, this approximation fails in trivial cases where the.cnf
file is unsatisfiable, such as:This case should obviously return
0
, but the solver instead returns1
or2
(if pre-processing is disabled). The issue arises because the solver simplifies contradictory clauses, and once removed, the remaining formula is interpreted as having no constraints, allowingx
to take any value (both true and false).Additionally, I attempted to compile this program for Windows, but to no avail. Both cross-compiling and building it on my Windows machine failed. This led me down a long rabbit hole where I replaced platform-dependent code iteratively. While I eventually managed to build an
.exe
, it still produced errors when running. I have yet to find another SharpSAT solver that works on Windows. Some alternatives I considered are: