Skip to content

Commit d0f1945

Browse files
committed
Add CaDiCaL make instructions
This commit adds the first instructions for building cbmc with CaDiCaL 1.4.0 using the IPASIR interface in cbmc.
1 parent 4889328 commit d0f1945

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

COMPILING.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,47 @@ 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
384+
385+
The [CaDiCaL](https://github.com/arminbiere/cadical) solver supports the
386+
[IPASIR](https://github.com/biotomas/ipasir) C interface to incremental SAT
387+
solvers, which is also supported by CBMC. So the process for producing a CBMC
388+
with CaDiCaL build is to build CaDiCaL as a static library then compile CBMC
389+
with the IPASIR build options and link to the CaDiCaL static library.
390+
391+
Note that at the time of writing this has been tested to work with the CaDiCaL
392+
1.4.0 on Ubuntu 18.04 & 20.04.
393+
394+
1. Download CaDiCaL:
395+
```
396+
git clone --branch rel-1.4.0 https://github.com/arminbiere/cadical.git
397+
```
398+
This will clone the CaDiCaL repository into a `cadical` subdirectory and
399+
checkout release 1.4.0, which has been checked for compatibility with CBMC at
400+
the time these instructions were written.
401+
402+
2. Build CaDiCaL:
403+
```
404+
cd cadical
405+
./configure
406+
make cadical
407+
cd ..
408+
```
409+
This will create a build directory called `build` inside the clone of the
410+
CaDiCaL repository. The `cadical` make target is specified in this example in
411+
order to avoid building targets which are not required by CBMC. The built
412+
static library will be placed in `cadical/build/libcadical.a`.
413+
414+
3. Build CBMC:
415+
```
416+
make -C src LIBS="$PWD/cadical/build/libcadical.a" IPASIR=$PWD/cadical/src
417+
```
418+
This links the CaDiCaL library as part of the build. Passing the IPASIR
419+
parameter tells the build system to build for the IPASIR interface. The
420+
argument for the IPASIR parameter gives the build system the location for
421+
the IPASIR headers, which is needed for the cbmc includes of `ipasir.h`. The
422+
compiled binary will be placed in `cbmc/src/cbmc/cbmc`.
423+
383424
### Compiling with Riss
384425
385426
The [Riss](https://github.com/conp-solutions/riss) solver supports the

0 commit comments

Comments
 (0)