-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
166 lines (134 loc) · 4.71 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# if downloading things via apt-get fail, check http://stackoverflow.com/a/24991137
# or just add --dns 8.8.8.8
# TODO merge all the apt-gets
FROM ubuntu:16.04
# Configure basic utilities for apt-get
RUN apt-get update && \
apt-get -y install software-properties-common python python-dev build-essential \
autoconf make gcc mercurial g++ git cmake libgmp-dev
RUN apt-get update && \
apt-get -y install wget zlib1g-dev csh perl
# Define working directory.
WORKDIR /tools
# install Minisat
RUN wget http://minisat.se/downloads/minisat-2.2.0.tar.gz && \
tar -xf minisat-2.2.0.tar.gz && \
cd minisat && \
export MROOT=$PWD && \
cd simp && \
make rs && \
cp minisat_static /bin/minisat && \
make libr
# install dsharp (with projection)
# Had to clone the dsharp-p repo to change the makefile to use minisat (faster)
RUN hg clone https://[email protected]/MateusAraujoBorges/dsharp && \
cd dsharp && \
make
# install sharpSAT (with projection)
RUN git clone https://github.com/MateusAraujoBorges/sharpSAT.git && \
cd sharpSAT/Release && \
make
# install samplecount (plus approxcount and cachet)
RUN wget http://www.cs.cornell.edu/~sabhar/software/samplecount/samplecount-1.0-04092007.tgz && \
tar -xf samplecount-1.0-04092007.tgz && \
mv samplecount-1.0-04092007 samplecount && \
cd samplecount && \
make
# install mbound (just a bunch of scripts to add xor constraints)
RUN wget http://www.cs.cornell.edu/~sabhar/software/xor-scripts/xor-scripts.tgz && \
tar -xf xor-scripts.tgz
# install ApproxMC
RUN wget http://www.cs.rice.edu/CS/Verification/Projects/ApproxMC/SourceCode/ApproxMC/ApproxMC.tgz && \
tar -xf ApproxMC.tgz && \
cd ApproxMC && \
rm cryptominisat doalarm && \
cd doalarm-0.1.7 && \
make && \
cd .. && \
tar -xf cryptominisat-2.9.4.tar.gz && \
cd cryptominisat-2.9.4 && \
./configure && \
make && \
cd .. && \
cp cryptominisat-2.9.4/cryptominisat . && \
cp doalarm-0.1.7/doalarm .
# install CryptoMinisat4 with projection support (approxMC-p dep.)
RUN git clone --depth 1 https://gitlab.com/QIF/cryptominisat4.git && \
cd cryptominisat4 && \
apt-get update && \
apt-get install -y libm4ri-dev vim-common libboost-program-options-dev && \
mkdir build && \
cd build && \
cmake -DUSE_GAUSS=ON -DCMAKE_BUILD_TYPE=Release -DONLY_SIMPLE=OFF -DUSE_PTHREADS=ON .. && \
make -j4 && \
make install && \
ldconfig # && \
# mv /usr/local/bin/cryptominisat4_simple /usr/local/bin/cryptominisat4
# install xorblast (xor constraint preprocessor; approxmc-p dep.)
RUN git clone https://gitlab.com/QIF/xorblast.git && \
cd xorblast && \
ln -s "$PWD/xorblast.py" /bin/xorblast.py
# install approxMC-p[y]
RUN wget http://formal.iti.kit.edu/approxmc-py/approxmc-py-4.tar.gz && \
mkdir approxmc-py && \
cd approxmc-py && \
tar -xf ../approxmc-py-4.tar.gz && \
apt-get update && \
apt-get install -y python3-pip python-pip && \
pip3 install scipy numpy && \
python3 setup.py build && \
sed -i -e 's/--verb=0/--verb=0 --autodisablegauss=0 /g' adapters/cryptominisat4.sh
# install samplesearch
RUN wget http://www.hlt.utdallas.edu/~vgogate/satss
# install searchtreesampler
RUN wget https://cs.stanford.edu/~ermon/code/STS.zip && \
apt-get update && \
apt-get install -y unzip && \
unzip STS.zip && \
cd STS && \
export MROOT="$PWD" && \
cd simp && \
make -j4
# install smtapprox
RUN git clone https://[email protected]/kuldeepmeel/smtapproxmc.git && \
cd smtapproxmc && \
cd boolector-mc && \
make && \
cp /tools/ApproxMC/doalarm-0.1.7/doalarm /bin/
#get satcomp benchmarks (application track)
#RUN wget http://baldur.iti.kit.edu/sat-competition-2016/downloads/app16.zip && \
# mkdir benchmarks && \
# unzip app16.zip -d benchmarks
# install sharpcdcl
RUN wget http://tools.computational-logic.org/content/sharpCDCL/sharpCDCL.tar.gz && \
mkdir sharpCDCL && \
cd sharpCDCL && \
tar -xf ../sharpCDCL.tar.gz && \
make config && \
make install
ENV LD_LIBRARY_PATH="/tools/sharpCDCL/build/dynamic/lib/"
RUN wget https://github.com/Z3Prover/z3/archive/z3-4.5.0.tar.gz && \
tar -xf z3-4.5.0.tar.gz && \
mv z3-z3-4.5.0 z3 && \
cd z3 && \
python scripts/mk_make.py --python && \
cd build && \
make -j4 && \
make install
#install allsat
RUN apt-get update && apt-get -y install gcc-multilib g++-multilib
ADD All_SAT allsat
RUN cd allsat && make
RUN apt-get update && \
apt-get -y install time
ENV PYTHONPATH="/tools/z3/build/python/"
ADD benchmarks/ benchmarks/
ADD blockCounter.py blockCounter.py
ADD mappedBitblaster.py mappedBitblaster.py
ADD renamer.py renamer.py
RUN pip3 install tqdm
ADD run_experiments.sh run_experiments.sh
RUN chmod +x run_experiments.sh
RUN rm *.tar.gz *.zip *.tgz
RUN ln -s $PWD/cryptominisat4/build/cryptominisat5 /usr/bin/cryptominisat4
CMD ["bash"]