summaryrefslogtreecommitdiff
path: root/src/theory/arith/arith_rewriter.cpp
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2011-03-30 15:07:02 +0000
committerTim King <taking@cs.nyu.edu>2011-03-30 15:07:02 +0000
commit6495988f28ad6c9b318fc506e5d85d8613b03640 (patch)
treef8679ffdf53b9d38f307e03b34aed251ba37bfbd /src/theory/arith/arith_rewriter.cpp
parent10cabf82a20258da80be53eb6d23b1a536e82eb5 (diff)
Added the command line flag --rewrite-arithmetic-equalities. This sets a static flag in Options that the ArithRewriter uses to determine the equality rewriting policy.
Diffstat (limited to 'src/theory/arith/arith_rewriter.cpp')
-rw-r--r--src/theory/arith/arith_rewriter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/theory/arith/arith_rewriter.cpp b/src/theory/arith/arith_rewriter.cpp
index 941394138..cecbefdee 100644
--- a/src/theory/arith/arith_rewriter.cpp
+++ b/src/theory/arith/arith_rewriter.cpp
@@ -261,8 +261,13 @@ RewriteResponse ArithRewriter::preRewriteAtom(TNode atom){
}else if(reduction.getKind() == kind::LT){
Node geq = currNM->mkNode(kind::GEQ, reduction[0], reduction[1]);
reduction = currNM->mkNode(kind::NOT, geq);
+ }else if( Options::rewriteArithEqualities && reduction.getKind() == kind::EQUAL){
+ Node geq = currNM->mkNode(kind::GEQ, reduction[0], reduction[1]);
+ Node leq = currNM->mkNode(kind::LEQ, reduction[0], reduction[1]);
+ reduction = currNM->mkNode(kind::AND, geq, leq);
}
+
return RewriteResponse(REWRITE_DONE, reduction);
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback