diff options
author | Aina Niemetz <aina.niemetz@gmail.com> | 2021-03-10 13:28:58 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-10 21:28:58 +0000 |
commit | c81140e9ab5db8bc95eb15145641be9d909d0618 (patch) | |
tree | 991c424872f4b23a06b81dab9db7b8bf8aa30a7b /src/expr/node_builder.h | |
parent | bd52deb7434b1b08a122db4513972644c11fc4aa (diff) |
Move ExprManager::isNAryKind to NodeManager. (#6107)
This also renames metakind::getLowerBoundForKind and
metakind::getUpperBoundForKind for consistency.
Note that the NodeManager class needs to be reordered to comply to our
style guidelines. This PR does not reorder but introduces a public block
at the top (where the rest of the public interface of the class should
go eventually).
Diffstat (limited to 'src/expr/node_builder.h')
-rw-r--r-- | src/expr/node_builder.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/expr/node_builder.h b/src/expr/node_builder.h index 2f4640668..91b378c5f 100644 --- a/src/expr/node_builder.h +++ b/src/expr/node_builder.h @@ -957,15 +957,15 @@ expr::NodeValue* NodeBuilder<nchild_thresh>::constructNV() { // check that there are the right # of children for this kind Assert(getMetaKind() != kind::metakind::CONSTANT) << "Cannot make Nodes with NodeBuilder that have CONSTANT-kinded kinds"; - Assert(getNumChildren() >= kind::metakind::getLowerBoundForKind(getKind())) + Assert(getNumChildren() >= kind::metakind::getMinArityForKind(getKind())) << "Nodes with kind " << getKind() << " must have at least " - << kind::metakind::getLowerBoundForKind(getKind()) + << kind::metakind::getMinArityForKind(getKind()) << " children (the one under " "construction has " << getNumChildren() << ")"; - Assert(getNumChildren() <= kind::metakind::getUpperBoundForKind(getKind())) + Assert(getNumChildren() <= kind::metakind::getMaxArityForKind(getKind())) << "Nodes with kind " << getKind() << " must have at most " - << kind::metakind::getUpperBoundForKind(getKind()) + << kind::metakind::getMaxArityForKind(getKind()) << " children (the one under " "construction has " << getNumChildren() << ")"; @@ -1132,15 +1132,15 @@ expr::NodeValue* NodeBuilder<nchild_thresh>::constructNV() const { // check that there are the right # of children for this kind Assert(getMetaKind() != kind::metakind::CONSTANT) << "Cannot make Nodes with NodeBuilder that have CONSTANT-kinded kinds"; - Assert(getNumChildren() >= kind::metakind::getLowerBoundForKind(getKind())) + Assert(getNumChildren() >= kind::metakind::getMinArityForKind(getKind())) << "Nodes with kind " << getKind() << " must have at least " - << kind::metakind::getLowerBoundForKind(getKind()) + << kind::metakind::getMinArityForKind(getKind()) << " children (the one under " "construction has " << getNumChildren() << ")"; - Assert(getNumChildren() <= kind::metakind::getUpperBoundForKind(getKind())) + Assert(getNumChildren() <= kind::metakind::getMaxArityForKind(getKind())) << "Nodes with kind " << getKind() << " must have at most " - << kind::metakind::getUpperBoundForKind(getKind()) + << kind::metakind::getMaxArityForKind(getKind()) << " children (the one under " "construction has " << getNumChildren() << ")"; |