diff options
Diffstat (limited to 'src/expr/node_builder.h')
-rw-r--r-- | src/expr/node_builder.h | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/src/expr/node_builder.h b/src/expr/node_builder.h index 299960c1d..d07790f92 100644 --- a/src/expr/node_builder.h +++ b/src/expr/node_builder.h @@ -152,8 +152,8 @@ #include "expr/node.h" #include "expr/type_node.h" -#ifndef __CVC4__NODE_BUILDER_H -#define __CVC4__NODE_BUILDER_H +#ifndef CVC4__NODE_BUILDER_H +#define CVC4__NODE_BUILDER_H #include <cstdlib> #include <iostream> @@ -274,7 +274,7 @@ class NodeBuilder { */ inline void realloc() { size_t newSize = 2 * size_t(d_nvMaxChildren); - size_t hardLimit = (1lu << __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN) - 1; + size_t hardLimit = (1lu << CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN) - 1; realloc(__builtin_expect( ( newSize > hardLimit ), false ) ? hardLimit : newSize); } @@ -772,11 +772,11 @@ void NodeBuilder<nchild_thresh>::clear(Kind k) { template <unsigned nchild_thresh> void NodeBuilder<nchild_thresh>::realloc(size_t toSize) { - Assert( toSize > d_nvMaxChildren, - "attempt to realloc() a NodeBuilder to a smaller/equal size!" ); - Assert( toSize < (1lu << __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN), + AlwaysAssert(toSize > d_nvMaxChildren, + "attempt to realloc() a NodeBuilder to a smaller/equal size!"); + Assert( toSize < (1lu << CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN), "attempt to realloc() a NodeBuilder to size %u (beyond hard limit of %u)", - toSize, (1lu << __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN) - 1 ); + toSize, (1lu << CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN) - 1 ); if(__builtin_expect( ( nvIsAllocated() ), false )) { // Ensure d_nv is not modified on allocation failure @@ -974,16 +974,6 @@ 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 || - NodeManager::operatorToKind(getOperator()) == 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 @@ -1342,4 +1332,4 @@ std::ostream& operator<<(std::ostream& out, const NodeBuilder<nchild_thresh>& nb }/* CVC4 namespace */ -#endif /* __CVC4__NODE_BUILDER_H */ +#endif /* CVC4__NODE_BUILDER_H */ |