Fixed one more bug in rewriter
authorClark Barrett <barrett@cs.nyu.edu>
Sun, 10 Jun 2012 15:55:31 +0000 (15:55 +0000)
committerClark Barrett <barrett@cs.nyu.edu>
Sun, 10 Jun 2012 15:55:31 +0000 (15:55 +0000)
src/theory/bv/theory_bv_rewrite_rules_normalization.h

index 4fa96c231b295406616533780a489e0a93cd2340..f5577e2ed908dea4b3cc45daa8e761c9342773b7 100644 (file)
@@ -429,8 +429,8 @@ Node RewriteRule<SolveEq>::apply(TNode node) {
 
   // If both constants are nonzero, combine on right, otherwise leave them where they are
   if (rightConst != zero) {
-    leftConst = zero;
     rightConst = rightConst - leftConst;
+    leftConst = zero;
     if (rightConst != zero) {
       childrenRight.push_back(utils::mkConst(rightConst));
     }