summaryrefslogtreecommitdiff
path: root/src/theory/rewriter.cpp
diff options
context:
space:
mode:
authorDejan Jovanović <dejan.jovanovic@gmail.com>2012-06-12 19:09:39 +0000
committerDejan Jovanović <dejan.jovanovic@gmail.com>2012-06-12 19:09:39 +0000
commitc58fa3ff70a1bb6b13ef9489159a899c4f49b004 (patch)
tree3c968ad91a35371fdd8bc77c47bc2094b017b284 /src/theory/rewriter.cpp
parentc5cdb4202b65d59aafa4156664400338958a3aa1 (diff)
bufixes and the bugs
* array now only propagates thropugh the equality engine * assertions in the equality rewriting to ensure eq -> { eq, T, F }
Diffstat (limited to 'src/theory/rewriter.cpp')
-rw-r--r--src/theory/rewriter.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/theory/rewriter.cpp b/src/theory/rewriter.cpp
index 0c5cada09..2e8acfa89 100644
--- a/src/theory/rewriter.cpp
+++ b/src/theory/rewriter.cpp
@@ -63,12 +63,20 @@ Node Rewriter::rewrite(TNode node) {
}
Node Rewriter::rewriteEquality(theory::TheoryId theoryId, TNode node) {
+ Assert(node.getKind() == kind::EQUAL);
Trace("rewriter") << "Rewriter::rewriteEquality(" << theoryId << "," << node << ")"<< std::endl;
- return Rewriter::callRewriteEquality(theoryId, node);
+ Node result = Rewriter::callRewriteEquality(theoryId, node);
+ Trace("rewriter") << "Rewriter::rewriteEquality(" << theoryId << "," << node << ") => " << result << std::endl;
+ Assert(result.getKind() == kind::EQUAL || result.isConst());
+ return result;
}
Node Rewriter::rewriteTo(theory::TheoryId theoryId, Node node) {
+#ifdef CVC4_ASSERTIONS
+ bool isEquality = node.getKind() == kind::EQUAL;
+#endif
+
Trace("rewriter") << "Rewriter::rewriteTo(" << theoryId << "," << node << ")"<< std::endl;
// Check if it's been cached already
@@ -190,6 +198,7 @@ Node Rewriter::rewriteTo(theory::TheoryId theoryId, Node node) {
// If this is the last node, just return
if (rewriteStack.size() == 1) {
+ Assert(!isEquality || rewriteStackTop.node.getKind() == kind::EQUAL || rewriteStackTop.node.isConst());
return rewriteStackTop.node;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback