diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2019-10-30 15:27:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-30 15:27:10 -0700 |
commit | 43ab3f4cd1aa5549cb1aa3c20a2d589614bcb8fc (patch) | |
tree | cf7b5d7f73a4d4ddc34492334a7d0eb90b57b77b /src/expr/metakind_template.cpp | |
parent | 8dda9531995953c3cec094339002f2ee7cadae08 (diff) |
Unify CVC4_CHECK/CVC4_DCHECK/AlwaysAssert/Assert. (#3366)
Diffstat (limited to 'src/expr/metakind_template.cpp')
-rw-r--r-- | src/expr/metakind_template.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/expr/metakind_template.cpp b/src/expr/metakind_template.cpp index 5116392cb..83c7e6e2c 100644 --- a/src/expr/metakind_template.cpp +++ b/src/expr/metakind_template.cpp @@ -52,13 +52,14 @@ ${metakind_constantMaps} namespace kind { namespace metakind { -size_t NodeValueCompare::constHash(const ::CVC4::expr::NodeValue* nv) { +size_t NodeValueCompare::constHash(const ::CVC4::expr::NodeValue* nv) +{ Assert(nv->getMetaKind() == kind::metakind::CONSTANT); - switch(nv->d_kind) { + switch (nv->d_kind) + { ${metakind_constHashes} - default: - Unhandled(::CVC4::expr::NodeValue::dKindToKind(nv->d_kind)); + default: Unhandled() << ::CVC4::expr::NodeValue::dKindToKind(nv->d_kind); } } @@ -69,11 +70,12 @@ bool NodeValueCompare::compare(const ::CVC4::expr::NodeValue* nv1, return false; } - if(nv1->getMetaKind() == kind::metakind::CONSTANT) { - switch(nv1->d_kind) { + if (nv1->getMetaKind() == kind::metakind::CONSTANT) + { + switch (nv1->d_kind) + { ${metakind_compares} - default: - Unhandled(::CVC4::expr::NodeValue::dKindToKind(nv1->d_kind)); + default: Unhandled() << ::CVC4::expr::NodeValue::dKindToKind(nv1->d_kind); } } @@ -105,10 +107,10 @@ void NodeValueConstPrinter::toStream(std::ostream& out, const ::CVC4::expr::NodeValue* nv) { Assert(nv->getMetaKind() == kind::metakind::CONSTANT); - switch(nv->d_kind) { + switch (nv->d_kind) + { ${metakind_constPrinters} - default: - Unhandled(::CVC4::expr::NodeValue::dKindToKind(nv->d_kind)); + default: Unhandled() << ::CVC4::expr::NodeValue::dKindToKind(nv->d_kind); } } @@ -135,10 +137,10 @@ void NodeValueConstPrinter::toStream(std::ostream& out, TNode n) { void deleteNodeValueConstant(::CVC4::expr::NodeValue* nv) { Assert(nv->getMetaKind() == kind::metakind::CONSTANT); - switch(nv->d_kind) { + switch (nv->d_kind) + { ${metakind_constDeleters} - default: - Unhandled(::CVC4::expr::NodeValue::dKindToKind(nv->d_kind)); + default: Unhandled() << ::CVC4::expr::NodeValue::dKindToKind(nv->d_kind); } } |