-
Notifications
You must be signed in to change notification settings - Fork 274
Build cbmc with cadical using make and IPASIR #6047
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -380,6 +380,47 @@ For the packaged builds of CBMC on our release page we currently build CBMC | |
with the MiniSat2 SAT solver statically linked at compile time. However it is | ||
also possible to build CBMC using alternative SAT solvers. | ||
|
||
### Compiling with CaDiCaL | ||
|
||
The [CaDiCaL](https://github.com/arminbiere/cadical) solver supports the | ||
[IPASIR](https://github.com/biotomas/ipasir) C interface to incremental SAT | ||
solvers, which is also supported by CBMC. So the process for producing a CBMC | ||
with CaDiCaL build is to build CaDiCaL as a static library then compile CBMC | ||
with the IPASIR build options and link to the CaDiCaL static library. | ||
Comment on lines
+426
to
+430
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While that is one way of doing it, it's also possible to use the simpler approach using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. This was to document how to do it with the IPASIR interface. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I figured as much from the commit message, but could you perhaps also include a few words on those simpler approaches? I don't think the remainder of the section makes clear that this is only needed when choosing the IPASIR approach. (That said, it may be worth pondering long term whether we should stop supporting interfaces other than IPASIR to simplify maintenance.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pushed a change now that I believe clarifies how to build and link different SAT solvers and makes clear the differences. |
||
|
||
Note that at the time of writing this has been tested to work with the CaDiCaL | ||
1.4.0 on Ubuntu 18.04 & 20.04. | ||
|
||
1. Download CaDiCaL: | ||
``` | ||
git clone --branch rel-1.4.0 https://github.com/arminbiere/cadical.git | ||
``` | ||
This will clone the CaDiCaL repository into a `cadical` subdirectory and | ||
checkout release 1.4.0, which has been checked for compatibility with CBMC at | ||
the time these instructions were written. | ||
|
||
2. Build CaDiCaL: | ||
``` | ||
cd cadical | ||
./configure | ||
make cadical | ||
cd .. | ||
``` | ||
This will create a build directory called `build` inside the clone of the | ||
CaDiCaL repository. The `cadical` make target is specified in this example in | ||
order to avoid building targets which are not required by CBMC. The built | ||
static library will be placed in `cadical/build/libcadical.a`. | ||
|
||
3. Build CBMC: | ||
``` | ||
make -C src LIBS="$PWD/cadical/build/libcadical.a" IPASIR=$PWD/cadical/src | ||
``` | ||
This links the CaDiCaL library as part of the build. Passing the IPASIR | ||
parameter tells the build system to build for the IPASIR interface. The | ||
argument for the IPASIR parameter gives the build system the location for | ||
the IPASIR headers, which is needed for the cbmc includes of `ipasir.h`. The | ||
compiled binary will be placed in `cbmc/src/cbmc/cbmc`. | ||
|
||
### Compiling with Riss | ||
|
||
The [Riss](https://github.com/conp-solutions/riss) solver supports the | ||
|
Uh oh!
There was an error while loading. Please reload this page.