diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2018-06-26 18:59:28 -0500 |
---|---|---|
committer | Andres Noetzli <andres.noetzli@gmail.com> | 2018-06-26 16:59:28 -0700 |
commit | a236ade3242599d4916fd9ee676c2c68c7c004b1 (patch) | |
tree | 8e3061156672bd19fe1386e7ccc7924c553ecc76 /contrib/run-script-sygusComp2018-INV | |
parent | 81bb4147ad681641dc99a62fc1a8605f99c05f2d (diff) |
sygusComp2018: add scripts. (#2103)
Diffstat (limited to 'contrib/run-script-sygusComp2018-INV')
-rw-r--r-- | contrib/run-script-sygusComp2018-INV | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/contrib/run-script-sygusComp2018-INV b/contrib/run-script-sygusComp2018-INV new file mode 100644 index 000000000..57870a5af --- /dev/null +++ b/contrib/run-script-sygusComp2018-INV @@ -0,0 +1,37 @@ +#!/bin/bash + +cvc4=./cvc4 +bench="$1" + +function runl { + limit=$1; shift; + ulimit -S -t "$limit";$cvc4 --lang=sygus --no-checking --no-interactive --default-dag-thresh=0 "$@" $bench 2>/dev/null +} + +function trywith { + sol=$(runl $@) + status=$? + if [ $status -ne 134 ]; then + echo $sol |& + (read result w1 w2; + case "$result" in + unsat) + case "$w1" in + "(define-fun") echo "$w1 $w2";cat;exit 0;; + esac; exit 1;; + esac; exit 1) + if [ ${PIPESTATUS[1]} -eq 0 ]; then exit 0; fi + fi +} + +function finishwith { + $cvc4 --lang=sygus --no-checking --no-interactive --default-dag-thresh=0 "$@" $bench 2>/dev/null | + (read result w1; + case "$result" in + unsat) echo "$w1";cat;exit 0;; + esac) +} + +trywith 10 +trywith 120 --sygus-unif +finishwith --no-sygus-repair-const |