| 1 |
#!/bin/bash |
| 2 |
|
| 3 |
cvc5=$(dirname "$(readlink -f "$0")")/cvc5 |
| 4 |
|
| 5 |
line="" |
| 6 |
while [[ -z "$line" ]]; do |
| 7 |
read line |
| 8 |
done |
| 9 |
if [ "$line" != '(set-option :print-success true)' ]; then |
| 10 |
echo 'ERROR: first line supposed to be set-option :print-success, but got: "'"$line"'"' >&2 |
| 11 |
exit 1 |
| 12 |
fi |
| 13 |
echo success |
| 14 |
line="" |
| 15 |
while [[ -z "$line" ]]; do |
| 16 |
read line |
| 17 |
done |
| 18 |
logic=$(expr "$line" : ' *(set-logic *\([A-Z_]*\) *) *$') |
| 19 |
if [ -z "$logic" ]; then |
| 20 |
echo 'ERROR: second line supposed to be set-logic, but got: "'"$line"'"' >&2 |
| 21 |
exit 1 |
| 22 |
fi |
| 23 |
echo success |
| 24 |
|
| 25 |
function runcvc5 { |
| 26 |
# we run in this way for line-buffered input, otherwise memory's a |
| 27 |
# concern (plus it mimics what we'll end up getting from an |
| 28 |
# application-track trace runner?) |
| 29 |
$cvc5 --incremental --force-logic="$logic" -L smt2.6 --print-success --no-type-checking --no-interactive "$@" <&0- |
| 30 |
} |
| 31 |
|
| 32 |
case "$logic" in |
| 33 |
|
| 34 |
QF_AUFLIA) |
| 35 |
runcvc5 --no-arrays-eager-index --arrays-eager-lemmas |
| 36 |
;; |
| 37 |
QF_BV) |
| 38 |
runcvc5 --bitblast=eager |
| 39 |
;; |
| 40 |
*) |
| 41 |
# just run the default |
| 42 |
runcvc5 |
| 43 |
;; |
| 44 |
|
| 45 |
esac |