summaryrefslogtreecommitdiff
path: root/src/expr/mkkind
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2010-02-04 03:31:38 +0000
committerMorgan Deters <mdeters@gmail.com>2010-02-04 03:31:38 +0000
commitfc14c009e8e9d2274368b54c12f3580a9ec8f718 (patch)
tree853fdc64b8f6f29dc106e581dfe8ed8e4c569778 /src/expr/mkkind
parent33988bd64b92960f7bed5c68d1266adc4183454b (diff)
src/expr/kind.h is now automatically generated.
Build src/expr before src/util. Moved CVC4::Command to the expr package. Re-quieted the "result is sat/invalid" etc. from PropEngine (this is now done at the main driver level). Added file-level documentation to Antlr sources When built for debug, spin on SEGV instead of aborting. Really useful for debugging problems that crop up only on long runs. Added '--segv-nospin' to override this spinning so that "make check," nightly regressions, etc. don't hang when built with debug. Updated src/main/about.h for 2010.
Diffstat (limited to 'src/expr/mkkind')
-rwxr-xr-xsrc/expr/mkkind54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/expr/mkkind b/src/expr/mkkind
new file mode 100755
index 000000000..c8ad61571
--- /dev/null
+++ b/src/expr/mkkind
@@ -0,0 +1,54 @@
+#!/bin/bash
+#
+# mkkind
+# Morgan Deters <mdeters@cs.nyu.edu> for CVC4
+#
+# The purpose of this script is to create kind.h from a prologue,
+# middle, epilogue, and a list of theory kinds.
+#
+# Invocation:
+#
+# mkkind prologue-file middle-file epilogue-file theory-kind-files...
+#
+# Output is to standard out.
+#
+
+cat <<EOF
+/********************* -*- C++ -*- */
+/** kind.h
+ **
+ ** Copyright 2009, 2010 The AcSys Group, New York University, and as below.
+ **
+ ** This header file automatically generated by:
+ **
+ ** $0 $@
+ **
+ ** for the CVC4 project.
+ **
+ **/
+
+EOF
+
+prologue=$1; shift
+middle=$1; shift
+epilogue=$1; shift
+
+cases=
+cat "$prologue"
+while [ $# -gt 0 ]; do
+ b=$(basename $(dirname "$1"))
+ echo
+ echo " /* from $b */"
+ cases="$cases
+ /* from $b */
+"
+ for r in `cat "$1"`; do
+ echo " $r,"
+ cases="$cases case $r: out << \"$r\"; break;
+"
+ done
+ shift
+done
+cat "$middle"
+echo "$cases"
+cat "$epilogue"
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback