summaryrefslogtreecommitdiff
path: root/src/theory
diff options
context:
space:
mode:
Diffstat (limited to 'src/theory')
-rw-r--r--src/theory/rewriter.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/theory/rewriter.cpp b/src/theory/rewriter.cpp
index fddbbcd13..4f9075f52 100644
--- a/src/theory/rewriter.cpp
+++ b/src/theory/rewriter.cpp
@@ -71,6 +71,12 @@ Node Rewriter::rewriteTo(theory::TheoryId theoryId, Node node) {
Trace("rewriter") << "Rewriter::rewriteTo(" << theoryId << "," << node << ")"<< std::endl;
+ // Check if it's been cached already
+ Node cached = getPostRewriteCache(theoryId, node);
+ if (!cached.isNull()) {
+ return cached;
+ }
+
// Put the node on the stack in order to start the "recursive" rewrite
vector<RewriteStackElement> rewriteStack;
rewriteStack.push_back(RewriteStackElement(node, theoryId));
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback