# > for options where we don't need to detect if set by user (default: OFF)
option(USE_CADICAL "Use CaDiCaL SAT solver")
option(USE_CRYPTOMINISAT "Use CryptoMiniSat SAT solver")
+option(USE_DRAT2ER "Include drat2er for making eager BV proofs")
option(USE_LFSC "Use LFSC proof checker")
option(USE_SYMFPU "Use SymFPU for floating point support")
option(USE_PYTHON2 "Prefer using Python 2 (for Python bindings)")
set(CADICAL_DIR "" CACHE STRING "Set CaDiCaL install directory")
set(CRYPTOMINISAT_DIR "" CACHE STRING "Set CryptoMiniSat install directory")
set(CXXTEST_DIR "" CACHE STRING "Set CxxTest install directory")
+set(DRAT2ER_DIR "" CACHE STRING "Set drat2er install directory")
set(GLPK_DIR "" CACHE STRING "Set GLPK install directory")
set(GMP_DIR "" CACHE STRING "Set GMP install directory")
set(LFSC_DIR "" CACHE STRING "Set LFSC install directory")
add_definitions(-DCVC4_USE_CRYPTOMINISAT)
endif()
+if(USE_DRAT2ER)
+ set(Drat2Er_HOME ${DRAT2ER_DIR})
+ find_package(Drat2Er REQUIRED)
+ add_definitions(-DCVC4_USE_DRAT2ER)
+endif()
+
if(USE_GLPK)
set(GPL_LIBS "${GPL_LIBS} glpk")
set(GLPK_HOME ${GLPK_DIR})
print_config("ABC :" USE_ABC)
print_config("CaDiCaL :" USE_CADICAL)
print_config("CryptoMiniSat :" USE_CRYPTOMINISAT)
+print_config("drat2er :" USE_DRAT2ER)
print_config("GLPK :" USE_GLPK)
print_config("LFSC :" USE_LFSC)
if(CRYPTOMINISAT_DIR)
message("CRYPTOMINISAT dir : ${CRYPTOMINISAT_DIR}")
endif()
+if(DRAT2ER_DIR)
+ message("DRAT2ER dir : ${DRAT2ER_DIR}")
+endif()
if(GLPK_DIR)
message("GLPK dir : ${GLPK_DIR}")
endif()
--- /dev/null
+# Find drat2er
+# Drat2Er_FOUND - system has Drat2Er lib
+# Drat2Er_INCLUDE_DIR - the Drat2Er include directory
+# Drat2Er_LIBRARIES - Libraries needed to use Drat2Er
+
+
+# Check default location of Drat2Er built with contrib/get-drat2er.
+# If the user provides a directory we will not search the default paths and
+# fail if Drat2Er was not found in the specified directory.
+if(NOT Drat2Er_HOME)
+ set(Drat2Er_HOME ${PROJECT_SOURCE_DIR}/drat2er/build/install)
+endif()
+
+find_path(Drat2Er_INCLUDE_DIR
+ NAMES drat2er.h
+ PATHS ${Drat2Er_HOME}/include
+ NO_DEFAULT_PATH)
+find_library(Drat2Er_LIBRARIES
+ NAMES libdrat2er.a
+ PATHS ${Drat2Er_HOME}/lib
+ NO_DEFAULT_PATH)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Drat2Er
+ DEFAULT_MSG
+ Drat2Er_INCLUDE_DIR Drat2Er_LIBRARIES)
+
+mark_as_advanced(Drat2Er_INCLUDE_DIR Drat2Er_LIBRARIES)
+if(Drat2Er_LIBRARIES)
+ message(STATUS "Found Drat2Er libs: ${Drat2Er_LIBRARIES}")
+endif()
--abc use the ABC AIG library
--cadical use the CaDiCaL SAT solver
--cryptominisat use the CryptoMiniSat SAT solver
+ --drat2er use drat2er (required for eager BV proofs)
--lfsc use the LFSC proof checker
--symfpu use SymFPU for floating point solver
--portfolio build the multithreaded portfolio version of CVC4
--antlr-dir=PATH path to ANTLR C headers and libraries
--cadical-dir=PATH path to top level of CaDiCaL source tree
--cryptominisat-dir=PATH path to top level of CryptoMiniSat source tree
+ --drat2er-dir=PATH path to the top level of the drat2er installation
--cxxtest-dir=PATH path to CxxTest installation
--glpk-dir=PATH path to top level of GLPK installation
--gmp-dir=PATH path to top level of GMP installation
cryptominisat=default
debug_symbols=default
debug_context_mm=default
+drat2er=default
dumping=default
gpl=default
win64=default
antlr_dir=default
cadical_dir=default
cryptominisat_dir=default
+drat2er_dir=default
cxxtest_dir=default
glpk_dir=default
gmp_dir=default
--debug-context-mm) debug_context_mm=ON;;
--no-debug-context-mm) debug_context_mm=OFF;;
+ --drat2er) drat2er=ON;;
+ --no-drat2er) drat2er=OFF;;
+
--dumping) dumping=ON;;
--no-dumping) dumping=OFF;;
--cxxtest-dir) die "missing argument to $1 (try -h)" ;;
--cxxtest-dir=*) cxxtest_dir=${1##*=} ;;
+ --drat2er-dir) die "missing argument to $1 (try -h)" ;;
+ --drat2er-dir=*) drat2er_dir=${1##*=} ;;
+
--glpk-dir) die "missing argument to $1 (try -h)" ;;
--glpk-dir=*) glpk_dir=${1##*=} ;;
&& cmake_opts="$cmake_opts -DUSE_CLN=$cln"
[ $cryptominisat != default ] \
&& cmake_opts="$cmake_opts -DUSE_CRYPTOMINISAT=$cryptominisat"
+[ $drat2er != default ] \
+ && cmake_opts="$cmake_opts -DUSE_DRAT2ER=$drat2er"
[ $glpk != default ] \
&& cmake_opts="$cmake_opts -DUSE_GLPK=$glpk"
[ $lfsc != default ] \
&& cmake_opts="$cmake_opts -DCRYPTOMINISAT_DIR=$cryptominisat_dir"
[ "$cxxtest_dir" != default ] \
&& cmake_opts="$cmake_opts -DCXXTEST_DIR=$cxxtest_dir"
+[ "$drat2er_dir" != default ] \
+ && cmake_opts="$cmake_opts -DDRAT2ER_DIR=$drat2er_dir"
[ "$glpk_dir" != default ] \
&& cmake_opts="$cmake_opts -DGLPK_DIR=$glpk_dir"
[ "$gmp_dir" != default ] \
--- /dev/null
+#!/bin/bash
+#
+source "$(dirname "$0")/get-script-header.sh"
+if [ -e drat2er ]; then
+ echo 'error: file or directory "drat2er" exists; please move it out of the way.' >&2
+ exit 1
+fi
+
+git clone https://github.com/alex-ozdemir/drat2er.git
+
+cd drat2er
+
+git checkout api
+
+mkdir build
+
+cd build
+
+cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)/install
+
+make install
+
+echo
+echo ===================== Now configure CVC4 with =====================
+echo ./configure.sh --drat2er
target_link_libraries(cvc4 ${CryptoMiniSat_LIBRARIES})
target_include_directories(cvc4 PUBLIC ${CryptoMiniSat_INCLUDE_DIR})
endif()
+if(USE_DRAT2ER)
+ target_link_libraries(cvc4 ${Drat2Er_LIBRARIES})
+ target_include_directories(cvc4 PUBLIC ${Drat2Er_INCLUDE_DIR})
+endif()
if(USE_GLPK)
target_link_libraries(cvc4 ${GLPK_LIBRARIES})
target_include_directories(cvc4 PUBLIC ${GLPK_INCLUDE_DIR})
# define IS_CRYPTOMINISAT_BUILD false
#endif /* CVC4_USE_CRYPTOMINISAT */
+#if CVC4_USE_DRAT2ER
+# define IS_DRAT2ER_BUILD true
+#else /* CVC4_USE_DRAT2ER */
+# define IS_DRAT2ER_BUILD false
+#endif /* CVC4_USE_DRAT2ER */
+
#if CVC4_USE_LFSC
#define IS_LFSC_BUILD true
#else /* CVC4_USE_LFSC */