summaryrefslogtreecommitdiff
path: root/src/expr
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2010-10-09 09:49:35 +0000
committerMorgan Deters <mdeters@gmail.com>2010-10-09 09:49:35 +0000
commit0131e18b811bdf2825a1cde5a6d68d523b19aacc (patch)
tree9c4dcb4c1bf355b943926a5df85d3c3446750878 /src/expr
parentec86769172d29ff7f5ed959866ecef339264552b (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')
-rw-r--r--src/expr/command.cpp4
-rwxr-xr-xsrc/expr/mkmetakind16
2 files changed, 14 insertions, 6 deletions
diff --git a/src/expr/command.cpp b/src/expr/command.cpp
index 8c90f337e..15fea22da 100644
--- a/src/expr/command.cpp
+++ b/src/expr/command.cpp
@@ -352,7 +352,9 @@ GetInfoCommand::GetInfoCommand(std::string flag) :
void GetInfoCommand::invoke(SmtEngine* smtEngine) {
try {
- d_result = smtEngine->getInfo(d_flag).getValue();
+ stringstream ss;
+ ss << smtEngine->getInfo(d_flag);
+ d_result = ss.str();
} catch(BadOptionException& bo) {
d_result = "unsupported";
}
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
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback