summaryrefslogtreecommitdiff
path: root/src/expr/node.h
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2018-08-16 16:46:05 -0700
committerAndrew Reynolds <andrew.j.reynolds@gmail.com>2018-08-16 18:46:05 -0500
commit7fc04bf78c6c20f3711d14425469eef2e0c2cd60 (patch)
treed9f2e91a52406edf66967faccad550631cd9e4a5 /src/expr/node.h
parent4e62cdade61514f268b96e78e2f82ad12dfcad07 (diff)
Move node algorithms to separate file (#2311)
Diffstat (limited to 'src/expr/node.h')
-rw-r--r--src/expr/node.h53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/expr/node.h b/src/expr/node.h
index 92794ffe2..4b12c7ece 100644
--- a/src/expr/node.h
+++ b/src/expr/node.h
@@ -428,18 +428,6 @@ public:
// bool containsDecision(); // is "atomic"
// bool properlyContainsDecision(); // maybe not atomic but all children are
- /**
- * Returns true iff this node contains a bound variable. This bound
- * variable may or may not be free.
- * @return true iff this node contains a bound variable.
- */
- bool hasBoundVar();
-
- /**
- * Returns true iff this node contains a free variable.
- * @return true iff this node contains a free variable.
- */
- bool hasFreeVar();
/**
* Convert this Node into an Expr using the currently-in-scope
@@ -889,11 +877,6 @@ public:
*/
inline void printAst(std::ostream& out, int indent = 0) const;
- /**
- * Check if the node has a subterm t.
- */
- inline bool hasSubterm(NodeTemplate<false> t, bool strict = false) const;
-
template <bool ref_count2>
NodeTemplate<true> eqNode(const NodeTemplate<ref_count2>& right) const;
@@ -1524,42 +1507,6 @@ inline Node NodeTemplate<true>::fromExpr(const Expr& e) {
return NodeManager::fromExpr(e);
}
-template<bool ref_count>
-bool NodeTemplate<ref_count>::hasSubterm(NodeTemplate<false> t, bool strict) const {
- typedef std::unordered_set<TNode, TNodeHashFunction> node_set;
-
- if (!strict && *this == t) {
- return true;
- }
-
- node_set visited;
- std::vector<TNode> toProcess;
-
- toProcess.push_back(*this);
-
- for (unsigned i = 0; i < toProcess.size(); ++ i) {
- TNode current = toProcess[i];
- if (current.hasOperator() && current.getOperator() == t)
- {
- return true;
- }
- for(unsigned j = 0, j_end = current.getNumChildren(); j < j_end; ++ j) {
- TNode child = current[j];
- if (child == t) {
- return true;
- }
- if (visited.find(child) != visited.end()) {
- continue;
- } else {
- visited.insert(child);
- toProcess.push_back(child);
- }
- }
- }
-
- return false;
-}
-
#ifdef CVC4_DEBUG
/**
* Pretty printer for use within gdb. This is not intended to be used
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback