Debian Codegraph @

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

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 which
10 # case this run script terminates immediately. Otherwise, this function
11 # returns normally and prints the output of the solver to stderr.
12 function trywith {
13 limit=$1; shift;
14 result="$(ulimit -S -t "$limit";$cvc4 -L smt2.6 --no-incremental --no-checking --no-interactive "$@" $bench)"
15 case "$result" in
16 sat|unsat) echo "$result"; exit 0;;
17 *) echo "$result" >&2;;
18 esac
19 }
20
21 # use: finishwith [params..]
22 # to run cvc4 and let it output whatever it will to stdout.
23 function finishwith {
24 $cvc4 -L smt2.6 --no-incremental --no-checking --no-interactive "$@" $bench
25 }
26
27 case "$logic" in
28
29 QF_LRA)
30 trywith 400 --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
31 finishwith --no-restrict-pivots --use-soi --new-prop --unconstrained-simp
32 ;;
33 QF_LIA)
34 # same as QF_LRA but add --pb-rewrites
35 finishwith --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
36 ;;
37 QF_NIA)
38 trywith 600 --nl-ext-tplanes --decision=internal
39 trywith 60 --nl-ext-tplanes --decision=justification
40 trywith 60 --no-nl-ext-tplanes --decision=internal
41 # this totals up to more than 40 minutes, although notice that smaller bit-widths may quickly fail
42 trywith 600 --solve-int-as-bv=2 --bitblast=eager --bv-sat-solver=cadical --no-bv-abstraction
43 trywith 600 --solve-int-as-bv=4 --bitblast=eager --bv-sat-solver=cadical --no-bv-abstraction
44 trywith 600 --solve-int-as-bv=8 --bitblast=eager --bv-sat-solver=cadical --no-bv-abstraction
45 trywith 600 --solve-int-as-bv=16 --bitblast=eager --bv-sat-solver=cadical --no-bv-abstraction
46 trywith 1200 --solve-int-as-bv=32 --bitblast=eager --bv-sat-solver=cadical --no-bv-abstraction
47 finishwith --nl-ext-tplanes --decision=internal
48 ;;
49 QF_NRA)
50 trywith 600 --nl-ext-tplanes --decision=internal
51 trywith 600 --nl-ext-tplanes --decision=justification --no-nl-ext-factor
52 trywith 60 --nl-ext-tplanes --decision=internal --solve-real-as-int
53 finishwith --nl-ext-tplanes --decision=justification
54 ;;
55 # all logics with UF + quantifiers should either fall under this or special cases below
56 ALIA|AUFLIA|AUFLIRA|AUFNIRA|UF|UFIDL|UFLIA|UFLRA|UFNIA|UFDT|UFDTLIA|AUFDTLIA|AUFBVDTLIA|AUFNIA)
57 # the following is designed for a run time of 20 min.
58 # initial runs 2min
59 trywith 60 --simplification=none --full-saturate-quant
60 trywith 60 --no-e-matching --full-saturate-quant
61 # trigger selections 6min
62 trywith 60 --relevant-triggers --full-saturate-quant
63 trywith 60 --trigger-sel=max --full-saturate-quant
64 trywith 60 --multi-trigger-when-single --full-saturate-quant
65 trywith 60 --multi-trigger-when-single --multi-trigger-priority --full-saturate-quant
66 trywith 60 --multi-trigger-cache --full-saturate-quant
67 trywith 60 --no-multi-trigger-linear --full-saturate-quant
68 # other 8min
69 trywith 60 --pre-skolem-quant --full-saturate-quant
70 trywith 60 --inst-when=full --full-saturate-quant
71 trywith 60 --no-e-matching --no-quant-cf --full-saturate-quant
72 trywith 60 --full-saturate-quant --quant-ind
73 trywith 60 --decision=internal --simplification=none --no-inst-no-entail --no-quant-cf --full-saturate-quant
74 trywith 60 --decision=internal --full-saturate-quant
75 trywith 60 --term-db-mode=relevant --full-saturate-quant
76 trywith 60 --fs-interleave --full-saturate-quant
77 # finite model find 6min
78 trywith 60 --finite-model-find --mbqi=none
79 trywith 60 --finite-model-find --decision=internal
80 trywith 60 --finite-model-find --macros-quant --macros-quant-mode=all
81 trywith 60 --finite-model-find --uf-ss=no-minimal
82 trywith 120 --finite-model-find --fmf-inst-engine
83 # long runs 8min
84 trywith 480 --finite-model-find --decision=internal
85 finishwith --full-saturate-quant
86 ;;
87 ABVFP|BVFP|FP)
88 finishwith --full-saturate-quant --fp-exp
89 ;;
90 UFBV)
91 # most problems in UFBV are essentially BV
92 trywith 600 --full-saturate-quant --decision=internal
93 trywith 600 --full-saturate-quant --cbqi-nested-qe --decision=internal
94 trywith 60 --full-saturate-quant --no-cbqi-innermost --global-negate
95 finishwith --finite-model-find
96 ;;
97 BV)
98 trywith 240 --full-saturate-quant
99 trywith 240 --full-saturate-quant --no-cbqi-innermost
100 trywith 600 --full-saturate-quant --cbqi-nested-qe --decision=internal
101 trywith 60 --full-saturate-quant --no-cbqi-bv
102 trywith 60 --full-saturate-quant --cbqi-bv-ineq=eq-slack
103 # finish 10min
104 finishwith --full-saturate-quant --no-cbqi-innermost --global-negate
105 ;;
106 LIA|LRA|NIA|NRA)
107 trywith 60 --full-saturate-quant --nl-ext-tplanes
108 trywith 600 --full-saturate-quant --no-cbqi-innermost
109 trywith 600 --full-saturate-quant --cbqi-nested-qe
110 finishwith --full-saturate-quant --cbqi-nested-qe --decision=internal
111 ;;
112 QF_AUFBV)
113 trywith 1200
114 finishwith --decision=justification-stoponly
115 ;;
116 QF_ABV)
117 trywith 100 --ite-simp --simp-with-care --repeat-simp --arrays-weak-equiv
118 trywith 1000 --arrays-weak-equiv
119 finishwith --ite-simp --simp-with-care --repeat-simp --arrays-weak-equiv
120 ;;
121 QF_UFBV)
122 # Benchmarks with uninterpreted sorts cannot be solved with eager
123 # bit-blasting currently
124 trywith 2400 --bitblast=eager --bv-sat-solver=cadical
125 finishwith
126 ;;
127 QF_BV)
128 finishwith --bv-div-zero-const --bitblast=eager --bv-sat-solver=cadical --no-bv-abstraction
129 ;;
130 QF_AUFLIA)
131 finishwith --no-arrays-eager-index --arrays-eager-lemmas --decision=justification
132 ;;
133 QF_AX)
134 finishwith --no-arrays-eager-index --arrays-eager-lemmas --decision=internal
135 ;;
136 QF_AUFNIA)
137 finishwith --decision=justification --no-arrays-eager-index --arrays-eager-lemmas
138 ;;
139 QF_ALIA)
140 trywith 140 --decision=justification --arrays-weak-equiv
141 finishwith --decision=justification-stoponly --no-arrays-eager-index --arrays-eager-lemmas
142 ;;
143 QF_S|QF_SLIA)
144 trywith 300 --strings-exp --rewrite-divk --lang=smt2.6.1 --strings-fmf
145 finishwith --strings-exp --rewrite-divk --lang=smt2.6.1
146 ;;
147 QF_ABVFP)
148 finishwith --fp-exp
149 ;;
150 QF_BVFP)
151 finishwith --fp-exp
152 ;;
153 QF_FP)
154 finishwith --fp-exp
155 ;;
156 *)
157 # just run the default
158 finishwith
159 ;;
160
161 esac
162