Skip to content

Allow to use SAT Solvers with IPASIR interface #552

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

Closed
wants to merge 4 commits into from

Conversation

nmanthey
Copy link
Contributor

Modern SAT solvers implement an interface for incremental SAT solving, IPASIR. To allow CPROVER tools to use more recent SAT solvers than Minisat or the installed Glucose, SAT solvers can be linked to CBMC by specifying the introduced "LIBSOLVER" make variable during build, which needs to point to a library of such a SAT solver.

@nmanthey nmanthey force-pushed the ipasir branch 2 times, most recently from 1881203 to ac2ea5c Compare February 17, 2017 06:34
@peterschrammel
Copy link
Member

@nmanthey, this does not compile at the moment: https://travis-ci.org/diffblue/cbmc/jobs/202519720
Also, please rebase.

@martin-cs
Copy link
Collaborator

@nmanthey could you have a look at the merge conflicts on this? It looks to be mostly Makefiles so should be pretty straight forward.

Norbert Manthey added 4 commits March 22, 2017 21:45
When building solvers.a while aiming at building CBMC with support for
IPASIR solvers, all projects that need SAT checkers would require to
link against the provided libipasir.a library. To make this library
visible for all subprojects at the same time, but furthermore allow the
user to choose which library to pick, the variable LIBSOLVER was
introduced, which is set to an empty value by default.

To compile while using IPASIR solvers, use for example:

IPASIR=../../ipasir LIBSOLVER=$(pwd)/ipasir/libipasir.a \
    CFLAGS="-DSATCHECK_IPSAIR" make -j 7 -C src
Add the necessary source changes to allow CBMC to use IPASIR solvers.
Add necessary steps to set variables for IPASIR

Furthermore, allow to select SAT solver from make command line,
for example by calling

IPASIR=../../ipasir LIBSOLVER=$(pwd)/ipasir/libipasir.a make

Not, to compile with a different SAT solver, e.g.

GLUCOSE=../../glucose-syrup make

it has to be ensured, that the solvers.a library is rebuild, and all
components that link against this library are renewed as well. This
can be achieved by touching the satcheck.h flie, i.e.:

touch src/solvers/sat/satcheck.h
Besides the usual test with Minisat, also compile with glucose,
and test whether compilation with IPASIR works. Perform tests and
regression testing for the two variants as well.

Furthermore, if libzip and zlib and not inizialized properly, any
build will fail. Hence, these targets are added as well.
@nmanthey
Copy link
Contributor Author

at least one of the checks fails because the glucose variant of CBMC does not compile. I believe this should still be in the CI checks. I will not fix the glucose based build.

@mgudemann mgudemann mentioned this pull request Mar 23, 2017
@mgudemann
Copy link
Contributor

mgudemann commented Mar 24, 2017

@nmanthey I started fixing the bugs, there's a bit more to do, the glucose bug was due to us using Alpine Linux with musl, while fpu_control.h is glibc. I adapted some parts of your script, current problem is picosat, feel free to cheery pick my commits if you are interested

@tautschnig tautschnig changed the base branch from master to develop August 22, 2017 12:33
@nmanthey nmanthey closed this Nov 13, 2017
@nmanthey
Copy link
Contributor Author

Closed as PR 884 has been accepted.

NathanJPhillips pushed a commit to NathanJPhillips/cbmc that referenced this pull request Aug 22, 2018
…goat-use-xxe-library

SEC-633: Make WebGoat.sh run XXE lessons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants