[path to top level of cryptominisat source tree]
),
CRYPTOMINISAT_HOME="$withval",
- [ if test -z "$CRYPTOMINISAT_HOME" && ! test -e "$ac_abs_confdir/cryptominisat4/install/bin/cryptominisat"; then
- AC_MSG_FAILURE([must give --with-cryptominisat-dir=PATH, define environment variable CRYPTOMINISAT_HOME, or use contrib/get-cryptominisat4 to setup Cryptominisat4 for CVC4!])
+ [ if test -z "$CRYPTOMINISAT_HOME" && ! test -e "$ac_abs_confdir/cryptominisat5/install/bin/cryptominisat5"; then
+ AC_MSG_FAILURE([must give --with-cryptominisat-dir=PATH, define environment variable CRYPTOMINISAT_HOME, or use contrib/get-cryptominisat to setup cryptominisat5 for CVC4!])
fi
]
)
- # Check if cryptominisat4 was installed via contrib/get-cryptominisat4
- AC_MSG_CHECKING([whether Cryptominisat4 was already installed via contrib/get-cryptominisat4])
- if test -z "$CRYPTOMINISAT_HOME" && test -e "$ac_abs_confdir/cryptominisat4/install/bin/cryptominisat"; then
- CRYPTOMINISAT_HOME="$ac_abs_confdir/cryptominisat4"
+ # Check if cryptominisat5 was installed via contrib/get-cryptominisat
+ AC_MSG_CHECKING([whether cryptominisat5 was already installed via contrib/get-cryptominisat])
+ if test -z "$CRYPTOMINISAT_HOME" && test -e "$ac_abs_confdir/cryptominisat5/install/bin/cryptominisat5"; then
+ CRYPTOMINISAT_HOME="$ac_abs_confdir/cryptominisat5"
AC_MSG_RESULT([yes, $CRYPTOMINISAT_HOME])
else
AC_MSG_RESULT([no])
fi
- if ! test -d "$CRYPTOMINISAT_HOME" || ! test -x "$CRYPTOMINISAT_HOME/install/bin/cryptominisat" ; then
+ if ! test -d "$CRYPTOMINISAT_HOME" || ! test -x "$CRYPTOMINISAT_HOME/install/bin/cryptominisat5" ; then
AC_MSG_FAILURE([either $CRYPTOMINISAT_HOME is not an cryptominisat install tree or it's not yet built])
fi
cvc4_save_CPPFLAGS="$CPPFLAGS"
LDFLAGS="-L$CRYPTOMINISAT_HOME/install/lib"
- LIBS="-lcryptominisat4 $1"
+ LIBS="-lcryptominisat5 $1"
AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([[#include <cryptominisat4/cryptominisat.h>]],
- [[CMSat::SATSolver test()]])], [CRYPTOMINISAT_LIBS="-lcryptominisat4 $1"],
+ [AC_LANG_PROGRAM([[#include <cryptominisat5/cryptominisat.h>]],
+ [[CMSat::SATSolver test()]])], [CRYPTOMINISAT_LIBS="-lcryptominisat5 $1"],
[CRYPTOMINISAT_LIBS=])
LDFLAGS="$cvc4_save_LDFLAGS"
addsourcedir \
new-theory \
configure-in-place \
- cryptominisat-4.2.0.patch \
- cryptominisat-4.2.0.second.patch \
depgraph \
get-antlr-3.4 \
- get-cryptominisat4 \
+ get-cryptominisat \
get-win-dependencies \
mac-build \
run-script-smtcomp2014 \
+++ /dev/null
-diff -ruN orig/CMakeLists.txt new/CMakeLists.txt
---- CMakeLists.txt 2016-05-24 22:05:50.702570824 -0700
-+++ patched.txt 2016-05-24 22:05:57.778570529 -0700
-@@ -132,7 +132,7 @@
- set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
- SET(Boost_USE_STATIC_LIBS ON)
- set(CMAKE_EXE_LINKER_FLAGS "-static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive")
--
-+ add_cxx_flag_if_supported("-fPIC")
- set(NOMYSQL ON)
- else()
- add_definitions(-DBOOST_TEST_DYN_LINK)
+++ /dev/null
---- python/CMakeLists.txt 2016-05-24 22:05:50.698570824 -0700
-+++ ../new/python/CMakeLists.txt 2016-05-24 22:05:57.774570529 -0700
-@@ -12,7 +12,7 @@
-
- add_custom_target(pytarget ALL DEPENDS ${OUTPUT}/timestamp)
-
--install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} install --record files.txt)")
-+#install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} install --record files.txt)")
-
- if (ENABLE_TESTING)
- #add_test (pytest ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/test_pycryptosat.py")
--- /dev/null
+#!/bin/bash
+#
+source "$(dirname "$0")/get-script-header.sh"
+
+if [ -e cryptominisat5 ]; then
+ echo 'error: file or directory "cryptominisat5" exists; please move it out of the way.' >&2
+ exit 1
+fi
+
+version="5.0.2"
+
+mkdir cryptominisat5
+cd cryptominisat5
+CRYPTOMINISAT_PATH=`pwd`
+
+webget https://github.com/msoos/cryptominisat/archive/$version.tar.gz cryptominisat-$version.tar.gz
+gunzip -f cryptominisat-$version.tar.gz
+tar xfv cryptominisat-$version.tar
+cd cryptominisat-$version
+
+mkdir ../build
+cd ../build
+
+cmake -DENABLE_PYTHON_INTERFACE=OFF \
+ -DCMAKE_INSTALL_PREFIX:PATH=$CRYPTOMINISAT_PATH/install \
+ -DSTATICCOMPILE=ON \
+ -DNOM4RI=ON \
+ ../cryptominisat-$version
+
+make install -j$(nproc)
+
+cd ../
+
+echo
+echo ===================== Now configure CVC4 with =====================
+echo ./configure --with-cryptominisat
+++ /dev/null
-#!/bin/bash
-#
-source "$(dirname "$0")/get-script-header.sh"
-
-if [ -e cryptominisat4 ]; then
- echo 'error: file or directory "cryptominisat4" exists; please move it out of the way.' >&2
- exit 1
-fi
-
-version="4.2.0"
-
-mkdir cryptominisat4
-cd cryptominisat4
-CRYPTOMINISAT_PATH=`pwd`
-
-webget https://github.com/msoos/cryptominisat/archive/$version.tar.gz cryptominisat-$version.tar.gz
-gunzip -f cryptominisat-$version.tar.gz
-tar xfv cryptominisat-$version.tar
-cd cryptominisat-$version
-
-patch -p0 < ../../contrib/cryptominisat-4.2.0.patch
-patch -p0 < ../../contrib/cryptominisat-4.2.0.second.patch
-
-mkdir ../build
-cd ../build
-
-cmake -DCMAKE_INSTALL_PREFIX:PATH=$CRYPTOMINISAT_PATH/install -DSTATICCOMPILE="ON" -DNOM4RI="ON" ../cryptominisat-$version
-make install -j$(nproc)
-
-cd ../
-
-echo
-echo ===================== Now configure CVC4 with =====================
-echo ./configure --with-cryptominisat
#include "proof/clause_id.h"
#include "proof/sat_proof.h"
-#include <cryptominisat4/cryptominisat.h>
+#include <cryptominisat5/cryptominisat.h>
namespace CVC4 {
namespace prop {
+using CMSatVar = unsigned;
+
// helper functions
namespace {
// ensure all sat literals have positive polarity by pushing
// the negation on the result
- std::vector<CMSat::Var> xor_clause;
+ std::vector<CMSatVar> xor_clause;
for (unsigned i = 0; i < clause.size(); ++i) {
xor_clause.push_back(toInternalLit(clause[i]).var());
rhs ^= clause[i].isNegated();
SatValue CryptoMinisatSolver::value(SatLiteral l){
const std::vector<CMSat::lbool> model = d_solver->get_model();
- CMSat::Var var = l.getSatVariable();
+ CMSatVar var = l.getSatVariable();
Assert (var < model.size());
CMSat::lbool value = model[var];
return toSatLiteralValue(value);