summaryrefslogtreecommitdiff
path: root/src/theory/substitutions.cpp
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/theory/substitutions.cpp
parent4e62cdade61514f268b96e78e2f82ad12dfcad07 (diff)
Move node algorithms to separate file (#2311)
Diffstat (limited to 'src/theory/substitutions.cpp')
-rw-r--r--src/theory/substitutions.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/theory/substitutions.cpp b/src/theory/substitutions.cpp
index 2585d1ee3..036bb4ada 100644
--- a/src/theory/substitutions.cpp
+++ b/src/theory/substitutions.cpp
@@ -15,6 +15,7 @@
**/
#include "theory/substitutions.h"
+#include "expr/node_algorithm.h"
#include "theory/rewriter.h"
using namespace std;
@@ -209,15 +210,18 @@ void SubstitutionMap::addSubstitutions(SubstitutionMap& subMap, bool invalidateC
}
}
-
-static bool check(TNode node, const SubstitutionMap::NodeMap& substitutions) CVC4_UNUSED;
-static bool check(TNode node, const SubstitutionMap::NodeMap& substitutions) {
+static bool check(TNode node,
+ const SubstitutionMap::NodeMap& substitutions) CVC4_UNUSED;
+static bool check(TNode node, const SubstitutionMap::NodeMap& substitutions)
+{
SubstitutionMap::NodeMap::const_iterator it = substitutions.begin();
SubstitutionMap::NodeMap::const_iterator it_end = substitutions.end();
Debug("substitution") << "checking " << node << endl;
- for (; it != it_end; ++ it) {
+ for (; it != it_end; ++it)
+ {
Debug("substitution") << "-- hasSubterm( " << (*it).first << " ) ?" << endl;
- if (node.hasSubterm((*it).first)) {
+ if (expr::hasSubterm(node, (*it).first))
+ {
Debug("substitution") << "-- FAIL" << endl;
return false;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback