summaryrefslogtreecommitdiff
path: root/src/expr/node_builder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr/node_builder.h')
-rw-r--r--src/expr/node_builder.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/expr/node_builder.h b/src/expr/node_builder.h
index 252cba43e..156d14299 100644
--- a/src/expr/node_builder.h
+++ b/src/expr/node_builder.h
@@ -946,6 +946,16 @@ expr::NodeValue* NodeBuilder<nchild_thresh>::constructNV() {
kind::metakind::getUpperBoundForKind(getKind()),
getNumChildren());
+#if 0
+ // if the kind is PARAMETERIZED, check that the operator is correctly-kinded
+ Assert(kind::metaKindOf(getKind()) != kind::metakind::PARAMETERIZED ||
+ kind::operatorKindToKind(getOperator().getKind()) == getKind(),
+ "Attempted to construct a parameterized kind `%s' with "
+ "incorrectly-kinded operator `%s'",
+ kind::kindToString(getKind()).c_str(),
+ kind::kindToString(getOperator().getKind()).c_str());
+#endif /* 0 */
+
// Implementation differs depending on whether the NodeValue was
// malloc'ed or not and whether or not it's in the already-been-seen
// NodeManager pool of Nodes. See implementation notes at the top
@@ -1121,6 +1131,16 @@ expr::NodeValue* NodeBuilder<nchild_thresh>::constructNV() const {
kind::metakind::getUpperBoundForKind(getKind()),
getNumChildren());
+#if 0
+ // if the kind is PARAMETERIZED, check that the operator is correctly-kinded
+ Assert(kind::metaKindOf(getKind()) != kind::metakind::PARAMETERIZED ||
+ kind::operatorKindToKind(getOperator().getKind()) == getKind(),
+ "Attempted to construct a parameterized kind `%s' with "
+ "incorrectly-kinded operator `%s'",
+ kind::kindToString(getKind()).c_str(),
+ kind::kindToString(getOperator().getKind()).c_str());
+#endif /* 0 */
+
// Implementation differs depending on whether the NodeValue was
// malloc'ed or not and whether or not it's in the already-been-seen
// NodeManager pool of Nodes. See implementation notes at the top
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback