summaryrefslogtreecommitdiff
path: root/src/theory/arith/arith_rewriter.cpp
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2012-03-02 23:37:06 +0000
committerTim King <taking@cs.nyu.edu>2012-03-02 23:37:06 +0000
commit98b2fe2c6fefb15b57d2eae6bda505e1f41da451 (patch)
tree4124caa3d7f94aec78ff735fa766149aee86e842 /src/theory/arith/arith_rewriter.cpp
parent068107e1d1f705eb9054b4309a26236230687d80 (diff)
This commit merges in the changes from branches/arithmetic/refactor0
- Improved the checks in AssertLower and AssertUpper so that redundant bounds cause less work. - Because of the above change, d_constantIntegerVariables now cannot have duplicate elements enqueued. This allows removing d_varsInDioSolver. - Fix to an assertion in CDQueue. - Implements a CDArithVarSet using a vector of booleans and CDList. - Refactored ArithVar out of arith_utilities.h. Miscellaneous cleanup of arithmetic.
Diffstat (limited to 'src/theory/arith/arith_rewriter.cpp')
-rw-r--r--src/theory/arith/arith_rewriter.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/theory/arith/arith_rewriter.cpp b/src/theory/arith/arith_rewriter.cpp
index c0ef02ec4..ca0aa4d14 100644
--- a/src/theory/arith/arith_rewriter.cpp
+++ b/src/theory/arith/arith_rewriter.cpp
@@ -26,14 +26,18 @@
#include <set>
#include <stack>
-using namespace CVC4;
-using namespace CVC4::theory;
-using namespace CVC4::theory::arith;
+namespace CVC4 {
+namespace theory {
+namespace arith {
bool isVariable(TNode t){
return t.getMetaKind() == kind::metakind::VARIABLE;
}
+bool ArithRewriter::isAtom(TNode n) {
+ return arith::isRelationOperator(n.getKind());
+}
+
RewriteResponse ArithRewriter::rewriteConstant(TNode t){
Assert(t.getMetaKind() == kind::metakind::CONSTANT);
Node val = coerceToRationalNode(t);
@@ -364,3 +368,7 @@ RewriteResponse ArithRewriter::rewriteDivByConstant(TNode t, bool pre){
return RewriteResponse(REWRITE_AGAIN, mult);
}
}
+
+}/* CVC4::theory::arith namespace */
+}/* CVC4::theory namespace */
+}/* CVC4 namespace */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback