blob: 2183df8ce3922508d038073a0490a3730373f25d (
plain)
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
|
#!/bin/bash
cat >bench-$$.smt2
trap 'rm bench-$$.smt2' EXIT
logic=$(expr "$(head -n 1 bench-$$.smt2)" : '^ *(set-logic *\([A-Z_]*\) *) *$')
# use: trywith [params..]
# to attempt a run. Only thing printed on stdout is "sat" or "unsat", in
# which case this run script terminates immediately. Otherwise, this
# function returns normally.
function trywith {
result="$(./cvc4 -L smt2 --no-checking --no-interactive "$@" bench-$$.smt2)"
case "$result" in
sat|unsat) echo "$result"; exit 0;;
esac
}
# use: finishwith [params..]
# to run cvc4 and let it output whatever it will to stdout.
function finishwith {
./cvc4 -L smt2 --no-checking --no-interactive "$@" bench-$$.smt2
}
case "$logic" in
QF_LRA)
# 10 minutes with default decision heuristic
trywith --tlimit-per=300000
# switch to internal decision heuristic
finishwith --decision=internal
;;
AUFLIA)
# 60 seconds with default decision heuristic
trywith --tlimit-per=60000
# try simplification for 60 seconds, default decision heuristic
trywith --simplification=batch --tlimit-per=60000
# switch to internal decision heuristic
finishwith --decision=internal
;;
QF_AUFBV)
trywith --tlimit-per=600000
finishwith --decision=justification-stoponly
;;
*)
# just run the default
finishwith
;;
esac
|