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_manager.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_manager.h')
-rw-r--r-- | src/expr/node_manager.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/expr/node_manager.h b/src/expr/node_manager.h index 7eba1b2ea..fc58410d1 100644 --- a/src/expr/node_manager.h +++ b/src/expr/node_manager.h @@ -98,6 +98,15 @@ class NodeManager friend class NodeBuilder; friend class NodeManagerScope; + public: + /** + * Return true if given kind is n-ary. The test is based on n-ary kinds + * having their maximal arity as the maximal possible number of children + * of a node. + */ + static bool isNAryKind(Kind k); + + private: /** Predicate for use with STL algorithms */ struct NodeValueReferenceCountNonZero { bool operator()(expr::NodeValue* nv) { return nv->d_rc > 0; } |