summaryrefslogtreecommitdiff
path: root/src/smt_util
diff options
context:
space:
mode:
authorAina Niemetz <aina.niemetz@gmail.com>2021-03-10 13:28:58 -0800
committerGitHub <noreply@github.com>2021-03-10 21:28:58 +0000
commitc81140e9ab5db8bc95eb15145641be9d909d0618 (patch)
tree991c424872f4b23a06b81dab9db7b8bf8aa30a7b /src/smt_util
parentbd52deb7434b1b08a122db4513972644c11fc4aa (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/smt_util')
-rw-r--r--src/smt_util/nary_builder.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/smt_util/nary_builder.cpp b/src/smt_util/nary_builder.cpp
index 0f30b803a..fa154c245 100644
--- a/src/smt_util/nary_builder.cpp
+++ b/src/smt_util/nary_builder.cpp
@@ -23,14 +23,20 @@ using namespace std;
namespace CVC4 {
namespace util {
-Node NaryBuilder::mkAssoc(Kind kind, const std::vector<Node>& children){
- if(children.size() == 0){
+Node NaryBuilder::mkAssoc(Kind kind, const std::vector<Node>& children)
+{
+ if (children.size() == 0)
+ {
return zeroArity(kind);
- }else if(children.size() == 1){
+ }
+ else if (children.size() == 1)
+ {
return children[0];
- }else{
- const unsigned int max = kind::metakind::getUpperBoundForKind(kind);
- const unsigned int min = kind::metakind::getLowerBoundForKind(kind);
+ }
+ else
+ {
+ const uint32_t max = kind::metakind::getMaxArityForKind(kind);
+ const uint32_t min = kind::metakind::getMinArityForKind(kind);
Assert(min <= children.size());
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback