diff options
author | Morgan Deters <mdeters@gmail.com> | 2010-02-25 18:26:22 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2010-02-25 18:26:22 +0000 |
commit | 374e28dcc625f1694cfc87f7b4c376dc329694c4 (patch) | |
tree | 0f65baaf336a8033617dd2c1cdaa1ffccc10d3f7 /src/expr/node.h | |
parent | 826f583ee14b922f39666dc827a5624fff753724 (diff) |
* src/expr/node_builder.h: fixed some overly-aggressive refcount decrementing.
There remain memory leaks (and some over-decrementing of refcounts) that
I've identified; another commit forthcoming.
* src/expr/attribute.h: keys are now NodeValue* instead of TNode
* src/theory/output_channel.h: change OutputChannel::conflict() to the
negation of what we had before: it now takes an AND of TRUE literals
as a conflict clause rather than an OR of FALSE ones.
* src/expr/node.cpp: (non-template) CVC4::expr::debugPrint() routine
for use inside gdb
* src/expr/node.h: remove Node::debugPrint() member (now a function
instead of a member function, since Node is now a template it wasn't
being properly instantiated(?) and couldn't be called from gdb)
* src/expr/Makefile.am: add node.cpp
* src/expr/node_manager.h: code formatting
Diffstat (limited to 'src/expr/node.h')
-rw-r--r-- | src/expr/node.h | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/src/expr/node.h b/src/expr/node.h index 19e50c5c2..474a175b1 100644 --- a/src/expr/node.h +++ b/src/expr/node.h @@ -36,7 +36,6 @@ class Type; class NodeManager; template<bool ref_count> class NodeTemplate; - /** * The Node class encapsulates the NodeValue with reference counting. */ @@ -48,7 +47,11 @@ typedef NodeTemplate<true> Node; typedef NodeTemplate<false> TNode; namespace expr { -class NodeValue; + class NodeValue; + + namespace attr { + class AttributeManager; + }/* CVC4::expr::attr namespace */ }/* CVC4::expr namespace */ using CVC4::expr::NodeValue; @@ -93,6 +96,7 @@ template<bool ref_count> friend class NodeManager; template<unsigned> friend class NodeBuilder; + friend class ::CVC4::expr::attr::AttributeManager; /** * Assigns the expression value and does reference counting. No assumptions @@ -355,20 +359,9 @@ template<bool ref_count> NodeTemplate impNode(const NodeTemplate& right) const; NodeTemplate xorNode(const NodeTemplate& right) const; - NodeTemplate plusNode(const NodeTemplate& right) const; - NodeTemplate uMinusNode() const; - NodeTemplate multNode(const NodeTemplate& right) const; - private: /** - * Pretty printer for use within gdb. This is not intended to be used - * outside of gdb. This writes to the Warning() stream and immediately - * flushes the stream. - */ - void debugPrint(); - - /** * Indents the given stream a given amount of spaces. * @param out the stream to indent * @param indent the numer of spaces @@ -607,12 +600,6 @@ template<bool ref_count> } template<bool ref_count> - void NodeTemplate<ref_count>::debugPrint() { - printAst(Warning(), 0); - Warning().flush(); - } - -template<bool ref_count> const Type* NodeTemplate<ref_count>::getType() const { Assert( NodeManager::currentNM() != NULL, "There is no current CVC4::NodeManager associated to this thread.\n" |