如何在Linux环境下配置SAT求解器cryptominisat和stp环境

安装执行环境

apt-get install cmake g++ zlib1g-dev libboost-all-dev flex bison

安装minisat

git clone https://github.com/stp/minisat.git
cd minisat && mkdir build && cd build
cmake ..
make
sudo make install
cd ../..

安装cryptominisat:cryptominisat求解器参考网站

sudo apt-get install build-essential cmake libgmp-dev

# not required but very useful
sudo apt-get install zlib1g-dev

git clone https://github.com/meelgroup/cadical
cd cadical
git checkout mate-only-libraries-1.8.0
./configure
make
cd ..

git clone https://github.com/meelgroup/cadiback
cd cadiback
git checkout mate
./configure
make
cd ..

git clone https://github.com/msoos/cryptominisat
cd cryptominisat
mkdir build && cd build
cmake ..
make
sudo make install
sudo ldconfig

安装stp:stp参考网站

在安装stp之前,先保证有安装环境:

sudo apt-get install git cmake bison flex libboost-all-dev libgmp-dev python2 perl

然后再安装stp:

git clone https://github.com/stp/stp.git
cd stp && mkdir build && cd build
cmake ..
make
sudo make install

cadical和cadiback的环境变量配置

打开.bashrc文件

vim ~/.bashrc

添加以下两行:

export LD_LIBRARY_PATH=/home/cadical/build:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/home/cadiback/build:$LD_LIBRARY_PATH

/home/cadical/build为本人的安装cadical和cadiback的目录,要试具体情况修改。

posted @ 2024-09-03 15:54  散落de回忆  阅读(35)  评论(0编辑  收藏  举报