Adjust release Makefile rules, new run script
authorMorgan Deters <mdeters@cs.nyu.edu>
Tue, 2 Apr 2013 03:26:46 +0000 (23:26 -0400)
committerMorgan Deters <mdeters@cs.nyu.edu>
Tue, 2 Apr 2013 03:29:13 +0000 (23:29 -0400)
Makefile
contrib/run-script-smteval2013 [new file with mode: 0755]

index 667bb3f23aab7783834061be2a6009ba00400a44..2d1d86ce3062bf667a297f6f2144f8504aae945e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -53,11 +53,11 @@ submission submission-main:
        $(MAKE) check
        $(MAKE) -C test/regress/regress1 check
        # main track
-       mkdir -p cvc4-smtcomp-$(YEAR)
-       cp -p builds/bin/cvc4 cvc4-smtcomp-$(YEAR)/cvc4
-       cp contrib/run-script-smtcomp2012 cvc4-smtcomp-$(YEAR)/run
-       chmod 755 cvc4-smtcomp-$(YEAR)/run
-       tar cf cvc4-smtcomp-$(YEAR).tar cvc4-smtcomp-$(YEAR)
+       mkdir -p cvc4-smteval-$(YEAR)
+       cp -p builds/bin/cvc4 cvc4-smteval-$(YEAR)/cvc4
+       cp contrib/run-script-smteval2013 cvc4-smtcomp-$(YEAR)/run
+       chmod 755 cvc4-smteval-$(YEAR)/run
+       tar cf cvc4-smteval-$(YEAR).tar cvc4-smtcomp-$(YEAR)
 submission-application:
        # application track is a separate build because it has different preprocessor #defines
        @if [ -n "`ls src/parser/*/generated 2>/dev/null`" ]; then \
@@ -73,12 +73,12 @@ submission-application:
        $(MAKE) check
        $(MAKE) -C test/regress/regress1 check
        # package the application track tarball
-       mkdir -p cvc4-application-smtcomp-$(YEAR)
-       cp -p builds/bin/cvc4 cvc4-application-smtcomp-$(YEAR)/cvc4
+       mkdir -p cvc4-application-smteval-$(YEAR)
+       cp -p builds/bin/cvc4 cvc4-application-smteval-$(YEAR)/cvc4
        ( echo '#!/bin/sh'; \
-         echo 'exec ./cvc4 -L smt2 --no-checking --no-interactive --incremental' ) > cvc4-application-smtcomp-$(YEAR)/run
-       chmod 755 cvc4-application-smtcomp-$(YEAR)/run
-       tar cf cvc4-application-smtcomp-$(YEAR).tar cvc4-application-smtcomp-$(YEAR)
+         echo 'exec ./cvc4 -L smt2 --no-checking --no-interactive --incremental' ) > cvc4-application-smteval-$(YEAR)/run
+       chmod 755 cvc4-application-smteval-$(YEAR)/run
+       tar cf cvc4-application-smteval-$(YEAR).tar cvc4-application-smtcomp-$(YEAR)
 submission-parallel:
        # parallel track can't be built with -cln, so it's a separate build
        @if [ -n "`ls src/parser/*/generated 2>/dev/null`" ]; then \
@@ -95,9 +95,9 @@ submission-parallel:
        -$(MAKE) check BINARY=pcvc4
        $(MAKE) -C test/regress/regress1 check BINARY=pcvc4
        # package the parallel track tarball
-       mkdir -p cvc4-parallel-smtcomp-$(YEAR)
-       cp -p builds/bin/pcvc4 cvc4-parallel-smtcomp-$(YEAR)/pcvc4
+       mkdir -p cvc4-parallel-smteval-$(YEAR)
+       cp -p builds/bin/pcvc4 cvc4-parallel-smteval-$(YEAR)/pcvc4
        ( echo '#!/bin/sh'; \
-         echo 'exec ./pcvc4 --threads 2 -L smt2 --no-checking --no-interactive' ) > cvc4-parallel-smtcomp-$(YEAR)/run
-       chmod 755 cvc4-parallel-smtcomp-$(YEAR)/run
-       tar cf cvc4-parallel-smtcomp-$(YEAR).tar cvc4-parallel-smtcomp-$(YEAR)
+         echo 'exec ./pcvc4 --threads 2 -L smt2 --no-checking --no-interactive' ) > cvc4-parallel-smteval-$(YEAR)/run
+       chmod 755 cvc4-parallel-smteval-$(YEAR)/run
+       tar cf cvc4-parallel-smteval-$(YEAR).tar cvc4-parallel-smtcomp-$(YEAR)
diff --git a/contrib/run-script-smteval2013 b/contrib/run-script-smteval2013
new file mode 100755 (executable)
index 0000000..3c71b28
--- /dev/null
@@ -0,0 +1,55 @@
+#!/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)
+  # 3 minutes with default decision heuristic
+  trywith --tlimit-per=180000
+  # 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
+  ;;
+QF_AX)
+  trywith --tlimit-per=2000
+  finishwith --no-arrays-model-based
+  ;;
+*)
+  # just run the default
+  finishwith
+  ;;
+
+esac
+