Debian Codegraph @

contrib/competitions/smt-comp/run-script-smtcomp2015-application

raw
1 #!/bin/bash
2
3 cvc4=./cvc4-application
4
5 read line
6 if [ "$line" != '(set-option :print-success true)' ]; then
7 echo 'ERROR: first line supposed to be set-option :print-success, but got: "'"$line"'"' >&2
8 exit 1
9 fi
10 echo success
11 read line
12 logic=$(expr "$line" : ' *(set-logic *\([A-Z_]*\) *) *$')
13 if [ -z "$logic" ]; then
14 echo 'ERROR: second line supposed to be set-logic, but got: "'"$line"'"' >&2
15 exit 1
16 fi
17 echo success
18
19 function runcvc4 {
20 # we run in this way for line-buffered input, otherwise memory's a
21 # concern (plus it mimics what we'll end up getting from an
22 # application-track trace runner?)
23 $cvc4 --force-logic="$logic" -L smt2 --print-success --no-checking --no-interactive "$@" <&0-
24 }
25
26 case "$logic" in
27
28 QF_LRA)
29 runcvc4 --tear-down-incremental --unconstrained-simp
30 ;;
31 QF_LIA)
32 # same as QF_LRA but add --pb-rewrites
33 runcvc4 --tear-down-incremental --unconstrained-simp
34 ;;
35 ALIA|AUFLIA|AUFLIRA|AUFNIRA|BV|UF|UFBV|UFIDL|UFLIA|UFLRA|UFNIA)
36 runcvc4 --tear-down-incremental
37 ;;
38 LIA|LRA|NIA|NRA)
39 runcvc4 --tear-down-incremental --cbqi --no-cbqi-sat
40 ;;
41 QF_BV)
42 runcvc4 --tear-down-incremental --unconstrained-simp --bv-eq-slicer=auto --bv-div-zero-const --bv-intro-pow2
43 ;;
44 QF_AUFLIA|QF_AX)
45 runcvc4 --tear-down-incremental --no-arrays-eager-index --arrays-eager-lemmas
46 ;;
47 *)
48 # just run the default
49 runcvc4 --tear-down-incremental
50 ;;
51
52 esac