| 1 |
|
| 2 |
|
| 3 |
cvc4=./cvc4 |
| 4 |
bench="$1" |
| 5 |
|
| 6 |
function runl { |
| 7 |
limit=$1; shift; |
| 8 |
ulimit -S -t "$limit";$cvc4 --lang=sygus2 --no-checking --no-interactive --default-dag-thresh=0 "$@" $bench 2>/dev/null |
| 9 |
} |
| 10 |
|
| 11 |
function trywith { |
| 12 |
sol=$(runl $@) |
| 13 |
status=$? |
| 14 |
if [ $status -ne 134 ]; then |
| 15 |
echo $sol |& |
| 16 |
(read result w1 w2; |
| 17 |
case "$result" in |
| 18 |
unsat) |
| 19 |
case "$w1" in |
| 20 |
"(define-fun") echo "$w1 $w2";cat;exit 0;; |
| 21 |
esac; exit 1;; |
| 22 |
esac; exit 1) |
| 23 |
if [ ${PIPESTATUS[1]} -eq 0 ]; then exit 0; fi |
| 24 |
fi |
| 25 |
} |
| 26 |
|
| 27 |
function finishwith { |
| 28 |
$cvc4 --lang=sygus2 --no-checking --no-interactive --default-dag-thresh=0 "$@" $bench 2>/dev/null | |
| 29 |
(read result w1; |
| 30 |
case "$result" in |
| 31 |
unsat) echo "$w1";cat;exit 0;; |
| 32 |
esac) |
| 33 |
} |
| 34 |
|
| 35 |
trywith 120 --cegqi-si=all --cegqi-si-abort --cbqi --cbqi-prereg-inst |
| 36 |
trywith 5 --cegqi-si=none --sygus-crepair-abort --sygus-repair-const |
| 37 |
finishwith --cegqi-si=none |