Skip to content

Commit a89fc93

Browse files
committed
Add documentation on alternative SAT solvers
This adds documentation on alternativer SAT solvers and how to compile them using different builds processed and linking methods. In particular this not documents the make and cmake build processes for CaDiCaL and glucose, as well as general IPASIR linking.
1 parent fc7e5b5 commit a89fc93

File tree

1 file changed

+39
-2
lines changed

1 file changed

+39
-2
lines changed

COMPILING.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,44 @@ For the packaged builds of CBMC on our release page we currently build CBMC
380380
with the MiniSat2 SAT solver statically linked at compile time. However it is
381381
also possible to build CBMC using alternative SAT solvers.
382382
383-
### Compiling with CaDiCaL
383+
### Compiling with CBMC Wrapper
384+
385+
The following solvers are supported by CBMC using custom interfaces and can
386+
by downloaded and compiled by the build process: MiniSAT2, CaDiCaL, and Glucose.
387+
388+
For `make` alternatives to the default (i.e. not MiniSAT) can be built with the
389+
following commands for CaDiCaL:
390+
```
391+
make -C src cadical-download
392+
make -C src CADICAL=../../cadical
393+
```
394+
and for glucose
395+
```
396+
make -C src glucose-download
397+
make -C src GLUCOSE=../../glucose-syrup
398+
```
399+
400+
For `cmake` the alternatives can be built with the following arguments to `cmake`
401+
for CaDiCaL `-Dsat_impl=cadical` and for glucose `-Dsat_impl=glucose`.
402+
403+
404+
### Compiling with IPASIR Interface
405+
406+
The below compiling instructions allow linking of an arbitrary IPASIR
407+
compatible SAT solver when compiling CBMC.
408+
409+
The general command using `make` is to compile with
410+
```
411+
make -C src LIBS="$PWD/SATOBJ SATLINKFLAGS" IPASIR=$PWD/SATPATH
412+
```
413+
Where `SATOBJ` is the pre-compiled IPASIR compatible SAT binary,
414+
`SATLINKFLAGS` are any flags required by the SAT object file, and
415+
`SATPATH` is the path to the SAT interface.
416+
417+
The rest of this section provides detailed instructions for some example
418+
SAT solvers.
419+
420+
#### Compiling with CaDiCaL
384421
385422
The [CaDiCaL](https://github.com/arminbiere/cadical) solver supports the
386423
[IPASIR](https://github.com/biotomas/ipasir) C interface to incremental SAT
@@ -421,7 +458,7 @@ Note that at the time of writing this has been tested to work with the CaDiCaL
421458
the IPASIR headers, which is needed for the cbmc includes of `ipasir.h`. The
422459
compiled binary will be placed in `cbmc/src/cbmc/cbmc`.
423460
424-
### Compiling with Riss
461+
#### Compiling with Riss
425462
426463
The [Riss](https://github.com/conp-solutions/riss) solver supports the
427464
[IPASIR](https://github.com/biotomas/ipasir) C interface to incremental SAT

0 commit comments

Comments
 (0)