Textbooksat is an interactive SAT solver that implements the model of CDCL described in Trade-offs Between Time and Memory in a Tighter Model of CDCL SAT Solvers. Its primary use case is to run interactively to help finding proofs in that model, and it can also be used to verify such proofs.
make sat
Dependencies:
- boost
Optional dependencies (disable with $ NO_VIZ=NO_VIZ make sat
):
- >=graphviz-2.30
- cimg
Use sat < input.cnf
to run with default settings (which are not what
you would expect from a standard implementation). Use sat -d vsids -r luby -w 2wl -v 0 < input.cnf
to run with a more usual set of
heuristics. Use sat --help
for information about command line flags.
Use sat -i input.cnf -d ask
to run textbooksat in interactive
mode. In this mode, the solver will output the steps it takes, stop
every time it reaches the default state, and ask for user input. Type
help
in interactive mode for information about the available
interactive commands.
To save and resume a session:
$ ./sat -d ask
...
> save <filename>
> ^D
$ cat <filename> - | ./sat -d ask
To have a history of commands:
$ rlwrap ./sat -d ask
It can be convenient to work with human-readable variable names instead of DIMACS literals. If the CNF input contains a map from DIMACS variable numbers to variable names of the form
c varname <dimacs> <name>
then textbooksat will use these names for input/output. There is a CNFgen patch to generate such a mapping.
Use sat -i input.cnf -p proof.ext
to obtain a representation of the proof in some other format, which gets chosen from the extension.
.rup
: Verifiable with DRAT-trim.
This is only intended for small proofs (at most tens of conflicts); otherwise the picture will be too large to handle.
.tex
: Standalone tikz. Compile withpdflatex proof.tex
..beamer.tex
: Beamer slides. Compile withpdflatex proof.tex
..asy
: Asymptote. Compile withasy -f pdf proof.asy
. Requires node.asy version 4.0, not tested with 5.0..dot
: Graphviz. Compile withdot -O -Tpdf out2.dot
.