-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.sh
More file actions
56 lines (45 loc) · 1.33 KB
/
demo.sh
File metadata and controls
56 lines (45 loc) · 1.33 KB
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
#!/usr/bin/env bash
build_all=
usage() {
cat << EOF
usage: $0 [-h|-a]
-h print this message and exit
-a build models and generate data for BV, NRA, QF_UFBV, QF_LIA, and QF_BVFPLRA
By default $0 builds the model and generates the data for BV only.
EOF
exit 0
}
while [ $# -gt 0 ]
do
opt=$1
case $opt in
-h|--help) usage;;
-a) build_all=yes;;
esac
shift
done
files="smt-comp-data/bv.csv"
if [ -n "$build_all" ]; then
files="smt-comp-data/bv.csv smt-comp-data/nra.csv smt-comp-data/qf_bvfplra.csv smt-comp-data/qf_lia.csv smt-comp-data/qf_ufbv.csv"
fi
# 1) Build and evaluate learned models.
#
# The build process creates the lib directory which contains
# final learnt models for machsmt. This process also performs
# all preprocessing steps for evaluation
machsmt_build -f $files -l lib
# 2) Evaluate MachSMT
# This process evaluates machsmt under kfold cross validation
# based the preprocessing of the previous step.
machsmt_eval -l lib
# 3) Example MachSMT Usage
# This process evaluates machsmt under kfold cross validation
# based the preprocessing of the previous step.
i=1
num_benchmarks=10
for benchmark in $(find benchmarks/smt-lib/non-incremental/BV -name "*.smt2" | shuf | head -n $num_benchmarks)
do
echo -n "$i/$num_benchmarks Select solver on $benchmark: "
machsmt -l lib "$benchmark"
((i++))
done