Debian Codegraph @

contrib/competitions/smt-comp/run-script-smtcomp2016

raw
1 #!/bin/bash
2
3 cvc4=./cvc4
4 bench="$1"
5
6 logic=$(expr "$(grep -m1 '^[^;]*set-logic' "$bench")" : ' *(set-logic *\([A-Z_]*\) *) *$')
7
8 # use: trywith [params..]
9 # to attempt a run. Only thing printed on stdout is "sat" or "unsat", in
10 # which case this run script terminates immediately. Otherwise, this
11 # function returns normally.
12 function trywith {
13 limit=$1; shift;
14 result="$(ulimit -S -t "$limit";$cvc4 -L smt2 --no-incremental --no-checking --no-interactive "$@" $bench)"
15 case "$result" in
16 sat|unsat) echo "$result"; exit 0;;
17 esac
18 }
19
20 # use: finishwith [params..]
21 # to run cvc4 and let it output whatever it will to stdout.
22 function finishwith {
23 $cvc4 -L smt2 --no-incremental --no-checking --no-interactive "$@" $bench
24 }
25
26 case "$logic" in
27
28 QF_LRA)
29 trywith 200 --enable-miplib-trick --miplib-trick-subs=4 --use-approx --lemmas-on-replay-failure --replay-early-close-depth=4 --replay-lemma-reject-cut=128 --replay-reject-cut=512 --unconstrained-simp --use-soi
30 finishwith --no-restrict-pivots --use-soi --new-prop --unconstrained-simp
31 ;;
32 QF_LIA)
33 # same as QF_LRA but add --pb-rewrites
34 finishwith --enable-miplib-trick --miplib-trick-subs=4 --use-approx --lemmas-on-replay-failure --replay-early-close-depth=4 --replay-lemma-reject-cut=128 --replay-reject-cut=512 --unconstrained-simp --use-soi --pb-rewrites
35 ;;
36 QF_NIA)
37 trywith 20
38 trywith 1800 --solve-int-as-bv=2 --bitblast=eager --bv-sat-solver=cryptominisat
39 trywith 1800 --solve-int-as-bv=4 --bitblast=eager --bv-sat-solver=cryptominisat
40 trywith 1800 --solve-int-as-bv=8 --bitblast=eager --bv-sat-solver=cryptominisat
41 trywith 1800 --solve-int-as-bv=16 --bitblast=eager --bv-sat-solver=cryptominisat
42 finishwith --solve-int-as-bv=32 --bitblast=eager --bv-sat-solver=cryptominisat
43 ;;
44 ALIA|AUFLIA|AUFLIRA|AUFNIRA|UF|UFIDL|UFLIA|UFLRA|UFNIA)
45 # the following is designed for a run time of 2400s (40 min).
46 # initial runs 1min
47 trywith 20 --simplification=none --full-saturate-quant
48 trywith 20 --no-e-matching --full-saturate-quant
49 trywith 20 --fs-inst --decision=internal --full-saturate-quant
50 # trigger selections 2min
51 trywith 30 --relevant-triggers --full-saturate-quant
52 trywith 30 --trigger-sel=max --full-saturate-quant
53 trywith 30 --multi-trigger-when-single --full-saturate-quant
54 trywith 30 --multi-trigger-when-single --multi-trigger-priority --full-saturate-quant
55 # other 2min
56 trywith 30 --pre-skolem-quant --full-saturate-quant
57 trywith 30 --inst-when=full --full-saturate-quant
58 trywith 30 --decision=internal --simplification=none --no-inst-no-entail --no-quant-cf --full-saturate-quant
59 trywith 30 --no-e-matching --no-quant-cf --full-saturate-quant
60 # finite model find 2min
61 trywith 30 --finite-model-find
62 trywith 30 --finite-model-find --uf-ss=no-minimal
63 trywith 60 --finite-model-find --decision=internal
64 # long runs 20min
65 trywith 300 --decision=internal --full-saturate-quant
66 trywith 300 --term-db-mode=relevant --full-saturate-quant
67 trywith 300 --fs-inst --full-saturate-quant
68 trywith 300 --finite-model-find --fmf-inst-engine
69 # finite model find 1min
70 trywith 30 --finite-model-find --fmf-bound-int
71 trywith 30 --finite-model-find --sort-inference
72 # finish 12min
73 finishwith --full-saturate-quant
74 ;;
75 UFBV)
76 # many problems in UFBV are essentially BV
77 trywith 300 --full-saturate-quant
78 trywith 300 --finite-model-find
79 finishwith --cbqi-all --full-saturate-quant
80 ;;
81 BV)
82 trywith 300 --finite-model-find
83 finishwith --cbqi-all --full-saturate-quant
84 ;;
85 LIA|LRA|NIA|NRA)
86 trywith 30 --full-saturate-quant
87 trywith 300 --full-saturate-quant --cbqi-min-bounds
88 trywith 300 --full-saturate-quant --decision=internal
89 finishwith --full-saturate-quant --cbqi-midpoint
90 ;;
91 QF_AUFBV)
92 trywith 600
93 finishwith --decision=justification-stoponly
94 ;;
95 QF_ABV)
96 trywith 50 --ite-simp --simp-with-care --repeat-simp --arrays-weak-equiv
97 trywith 500 --arrays-weak-equiv
98 finishwith --ite-simp --simp-with-care --repeat-simp --arrays-weak-equiv
99 ;;
100 QF_UFBV)
101 finishwith --bitblast=eager --bv-sat-solver=cryptominisat
102 ;;
103 QF_BV)
104 exec ./pcvc4 -L smt2 --no-incremental --no-checking --no-interactive --thread-stack=1024 \
105 --threads 2 \
106 --thread0 '--unconstrained-simp --bv-div-zero-const --bv-intro-pow2 --bitblast=eager --bv-sat-solver=cryptominisat --bitblast-aig --no-bv-abstraction' \
107 --thread1 '--unconstrained-simp --bv-div-zero-const --bv-intro-pow2 --bv-eq-slicer=auto --no-bv-abstraction' \
108 --no-wait-to-join \
109 "$bench"
110 #trywith 10 --bv-eq-slicer=auto --decision=justification
111 #trywith 60 --decision=justification
112 #trywith 600 --decision=internal --bitblast-eager
113 #finishwith --decision=justification --decision-use-weight --decision-weight-internal=usr1
114 ;;
115 QF_AUFLIA)
116 finishwith --no-arrays-eager-index --arrays-eager-lemmas --decision=justification
117 ;;
118 QF_AX)
119 finishwith --no-arrays-eager-index --arrays-eager-lemmas --decision=internal
120 ;;
121 QF_AUFNIA)
122 finishwith --decision=justification --no-arrays-eager-index --arrays-eager-lemmas
123 ;;
124 QF_ALIA)
125 trywith 70 --decision=justification --arrays-weak-equiv
126 finishwith --decision=justification-stoponly --no-arrays-eager-index --arrays-eager-lemmas
127 ;;
128 *)
129 # just run the default
130 finishwith
131 ;;
132
133 esac
134