added back BitwiseEq rule
authorlianah <lianahady@gmail.com>
Wed, 1 May 2013 17:22:29 +0000 (13:22 -0400)
committerlianah <lianahady@gmail.com>
Wed, 1 May 2013 17:22:29 +0000 (13:22 -0400)
src/smt/smt_engine.cpp
src/theory/bv/theory_bv.cpp
src/theory/bv/theory_bv_rewrite_rules_operator_elimination.h

index bc89e8d44eb8103ad6a8021bd9a081042d8acf1a..78f6e3dae6cec7d3f5e99ab5de96287f367ab85d 100644 (file)
@@ -1822,11 +1822,15 @@ bool SmtEnginePrivate::nonClausalSimplify() {
   }
 
   hash_set<TNode, TNodeHashFunction> s;
+  Trace("debugging") << "NonClausal simplify pre-preprocess\n"; 
   for (unsigned i = 0; i < d_assertionsToPreprocess.size(); ++ i) {
     Node assertion = d_assertionsToPreprocess[i];
     Node assertionNew = d_topLevelSubstitutions.apply(assertion);
+    Trace("debugging") << "assertion = " << assertion << endl;
+    Trace("debugging") << "assertionNew = " << assertionNew << endl; 
     if (assertion != assertionNew) {
       assertion = Rewriter::rewrite(assertionNew);
+      Trace("debugging") << "rewrite(assertion) = " << assertion << endl; 
     }
     Assert(Rewriter::rewrite(assertion) == assertion);
     for (;;) {
@@ -1835,8 +1839,11 @@ bool SmtEnginePrivate::nonClausalSimplify() {
         break;
       }
       ++d_smt.d_stats->d_numConstantProps;
+      Trace("debugging") << "assertionNew = " << assertionNew << endl; 
       assertion = Rewriter::rewrite(assertionNew);
+      Trace("debugging") << "assertionNew = " << assertionNew << endl; 
     }
+    Trace("debugging") << "\n"; 
     s.insert(assertion);
     d_assertionsToCheck.push_back(assertion);
     Trace("simplify") << "SmtEnginePrivate::nonClausalSimplify(): "
index b2f91e07054d19d93ef545240ac9ceb3cda9444d..6f450d08ec23dd095ff91ea6ea2cc61a3888d14f 100644 (file)
@@ -284,12 +284,12 @@ Theory::PPAssertStatus TheoryBV::ppAssert(TNode in, SubstitutionMap& outSubstitu
 
 Node TheoryBV::ppRewrite(TNode t)
 {
-  // if (RewriteRule<BitwiseEq>::applies(t)) {
-  //   Node result = RewriteRule<BitwiseEq>::run<false>(t);
-  //   return Rewriter::rewrite(result);
-  // }
+  if (RewriteRule<BitwiseEq>::applies(t)) {
+       Node result = RewriteRule<BitwiseEq>::run<false>(t);
+    return Rewriter::rewrite(result);
+  }
 
-  if (/*options::bitvectorCoreSolver() && */t.getKind() == kind::EQUAL) {
+  if (options::bitvectorCoreSolver() && t.getKind() == kind::EQUAL) {
     std::vector<Node> equalities;
     Slicer::splitEqualities(t, equalities);
     return utils::mkAnd(equalities); 
index a63721de12196a30cfe55a764f2a8eb575835eec..626116453c90b64e17433857564e6ee110535a61 100644 (file)
@@ -85,7 +85,6 @@ Node RewriteRule<SgeEliminate>::apply(TNode node) {
   return result;
 }
 
-
 template <>
 bool RewriteRule<SltEliminate>::applies(TNode node) {
   return (node.getKind() == kind::BITVECTOR_SLT);