diff options
author | Morgan Deters <mdeters@gmail.com> | 2010-10-09 09:49:35 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2010-10-09 09:49:35 +0000 |
commit | 0131e18b811bdf2825a1cde5a6d68d523b19aacc (patch) | |
tree | 9c4dcb4c1bf355b943926a5df85d3c3446750878 /src/expr/mkmetakind | |
parent | ec86769172d29ff7f5ed959866ecef339264552b (diff) |
support for SMT-LIBv2 :named attributes, and attributes in general; zero-ary define-fun; several set-info, set-option, get-option, get-info improvementss
Diffstat (limited to 'src/expr/mkmetakind')
-rwxr-xr-x | src/expr/mkmetakind | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/expr/mkmetakind b/src/expr/mkmetakind index c4968af26..351893feb 100755 --- a/src/expr/mkmetakind +++ b/src/expr/mkmetakind @@ -195,9 +195,9 @@ struct ConstantMapReverse< ::CVC4::kind::$1 > { } function registerOperatorToKind { - operatorKind=$1 - applyKind=$2 - metakind_operatorKinds="${metakind_operatorKinds} case kind::$applyKind: return kind::$operatorKind; + operatorKind=$1 + applyKind=$2 + metakind_operatorKinds="${metakind_operatorKinds} case kind::$applyKind: return kind::$operatorKind; "; } @@ -227,8 +227,14 @@ function register_metakind { exit 1 fi - if [ $mk = OPERATOR ] || [ $mk = PARAMETERIZED -a "$k" != SORT_TYPE ]; then - if [ $lb = 0 ]; then + if [ $mk = OPERATOR -o $mk = PARAMETERIZED ]; then + if [ $mk = PARAMETERIZED -a "$k" = SORT_TYPE ]; then + # exception: zero-ary SORT_TYPE is permitted for sort constructors + : + elif [ $mk = PARAMETERIZED -a "$k" = APPLY ]; then + # exception: zero-ary APPLY is permitted for defined zero-ary functions + : + elif [ $lb = 0 ]; then echo "$kf:$lineno: error in range \`$nc' for \`$k': $mk-kinded kinds must always take at least one child" >&2 exit 1 fi |