* @return the node representing the i-th child
*/
NodeTemplate operator[](int i) const {
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
return NodeTemplate(d_nv->getChild(i));
}
* @return the ud
*/
unsigned getId() const {
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return d_nv->getId();
}
* @return the kind
*/
inline Kind getKind() const {
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return Kind(d_nv->d_kind);
}
* @return the iterator
*/
inline iterator begin() {
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return d_nv->begin< NodeTemplate<ref_count> >();
}
* @return the end of the children iterator.
*/
inline iterator end() {
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return d_nv->end< NodeTemplate<ref_count> >();
}
* @return the const_iterator
*/
inline const_iterator begin() const {
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return d_nv->begin< NodeTemplate<ref_count> >();
}
* @return the end of the children const_iterator.
*/
inline const_iterator end() const {
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return d_nv->end< NodeTemplate<ref_count> >();
}
* @return the string representation of this node.
*/
inline std::string toString() const {
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return d_nv->toString();
}
* @param out the sream to serialise this node to
*/
inline void toStream(std::ostream& out, int toDepth = -1) const {
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
d_nv->toStream(out, toDepth);
}
Assert( NodeManager::currentNM() != NULL,
"There is no current CVC4::NodeManager associated to this thread.\n"
"Perhaps a public-facing function is missing a NodeManagerScope ?" );
+
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return NodeManager::currentNM()->getAttribute(*this, AttrKind());
}
Assert( NodeManager::currentNM() != NULL,
"There is no current CVC4::NodeManager associated to this thread.\n"
"Perhaps a public-facing function is missing a NodeManagerScope ?" );
+
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return NodeManager::currentNM()->hasAttribute(*this, AttrKind());
}
Assert( NodeManager::currentNM() != NULL,
"There is no current CVC4::NodeManager associated to this thread.\n"
"Perhaps a public-facing function is missing a NodeManagerScope ?" );
+
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return NodeManager::currentNM()->getAttribute(*this, AttrKind(), ret);
}
Assert( NodeManager::currentNM() != NULL,
"There is no current CVC4::NodeManager associated to this thread.\n"
"Perhaps a public-facing function is missing a NodeManagerScope ?" );
+
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
NodeManager::currentNM()->setAttribute(*this, AttrKind(), value);
}
template <bool ref_count>
inline bool NodeTemplate<ref_count>::isAtomic() const {
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return NodeManager::currentNM()->isAtomic(*this);
}
} else {
// shouldn't ever happen
Assert(d_nv->d_rc > 0,
- "INTERNAL ERROR: TNode constructed from Node with rc == 0");
+ "TNode constructed from Node with rc == 0");
}
}
} else {
// shouldn't ever happen
Assert(d_nv->d_rc > 0,
- "INTERNAL ERROR: TNode assigned from Node with rc == 0");
+ "TNode assigned from Node with rc == 0");
}
}
return *this;
template <bool ref_count>
NodeTemplate<true>
NodeTemplate<ref_count>::eqNode(const NodeTemplate<ref_count>& right) const {
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return NodeManager::currentNM()->mkNode(kind::EQUAL, *this, right);
}
template <bool ref_count>
NodeTemplate<true> NodeTemplate<ref_count>::notNode() const {
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return NodeManager::currentNM()->mkNode(kind::NOT, *this);
}
template <bool ref_count>
NodeTemplate<true>
NodeTemplate<ref_count>::andNode(const NodeTemplate<ref_count>& right) const {
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return NodeManager::currentNM()->mkNode(kind::AND, *this, right);
}
template <bool ref_count>
NodeTemplate<true>
NodeTemplate<ref_count>::orNode(const NodeTemplate<ref_count>& right) const {
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return NodeManager::currentNM()->mkNode(kind::OR, *this, right);
}
NodeTemplate<true>
NodeTemplate<ref_count>::iteNode(const NodeTemplate<ref_count>& thenpart,
const NodeTemplate<ref_count>& elsepart) const {
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return NodeManager::currentNM()->mkNode(kind::ITE, *this, thenpart, elsepart);
}
template <bool ref_count>
NodeTemplate<true>
NodeTemplate<ref_count>::iffNode(const NodeTemplate<ref_count>& right) const {
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return NodeManager::currentNM()->mkNode(kind::IFF, *this, right);
}
template <bool ref_count>
NodeTemplate<true>
NodeTemplate<ref_count>::impNode(const NodeTemplate<ref_count>& right) const {
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return NodeManager::currentNM()->mkNode(kind::IMPLIES, *this, right);
}
template <bool ref_count>
NodeTemplate<true>
NodeTemplate<ref_count>::xorNode(const NodeTemplate<ref_count>& right) const {
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return NodeManager::currentNM()->mkNode(kind::XOR, *this, right);
}
"There is no current CVC4::NodeManager associated to this thread.\n"
"Perhaps a public-facing function is missing a NodeManagerScope ?" );
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
switch(kind::MetaKind mk = getMetaKind()) {
case kind::metakind::INVALID:
IllegalArgument(*this, "getOperator() called on Node with INVALID-kinded kind");
Assert( NodeManager::currentNM() != NULL,
"There is no current CVC4::NodeManager associated to this thread.\n"
"Perhaps a public-facing function is missing a NodeManagerScope ?" );
+
+ if(!ref_count) {
+ Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" );
+ }
+
return NodeManager::currentNM()->getType(*this);
}