bv: Remove dump=bv-rewrites. (#7099)
authorAina Niemetz <aina.niemetz@gmail.com>
Tue, 31 Aug 2021 22:26:25 +0000 (15:26 -0700)
committerGitHub <noreply@github.com>
Tue, 31 Aug 2021 22:26:25 +0000 (22:26 +0000)
This is work towards eliminating calls to currentSmtEngine.
This dump mode will become obsolete with the DSL, and is thus now
removed.

src/smt/dump.cpp
src/theory/bv/theory_bv_rewrite_rules.h

index 9dbbba7d3835f8877d2725f1cf500afe57bbe2ab..630a91288fc140ed90d5ab6debcf01b417a66f5c 100644 (file)
@@ -134,7 +134,6 @@ void DumpC::setDumpFromString(const std::string& optarg) {
       else if (!strcmp(optargPtr, "t-conflicts")
                || !strcmp(optargPtr, "t-lemmas")
                || !strcmp(optargPtr, "t-explanations")
-               || !strcmp(optargPtr, "bv-rewrites")
                || !strcmp(optargPtr, "theory::fullcheck"))
       {
       }
@@ -225,9 +224,6 @@ t-lemmas\n\
 t-explanations\n\
 + Output correctness queries for all theory explanations\n\
 \n\
-bv-rewrites\n\
-+ Output correctness queries for all bitvector rewrites\n\
-\n\
 theory::fullcheck\n\
 + Output completeness queries for all full-check effort-level theory checks\n\
 \n\
index 040d2c53f970717e5577f8f9879405aa2c7552a0..fb80d43d0ed339e173d1874b17905932832ae15b 100644 (file)
@@ -445,32 +445,21 @@ public:
     SuppressWrongNoReturnWarning;
   }
 
-  template<bool checkApplies>
-  static inline Node run(TNode node) {
-    if (!checkApplies || applies(node)) {
-      Debug("theory::bv::rewrite") << "RewriteRule<" << rule << ">(" << node << ")" << std::endl;
+  template <bool checkApplies>
+  static inline Node run(TNode node)
+  {
+    if (!checkApplies || applies(node))
+    {
+      Debug("theory::bv::rewrite")
+          << "RewriteRule<" << rule << ">(" << node << ")" << std::endl;
       Assert(checkApplies || applies(node));
-      //++ s_statistics->d_ruleApplications;
       Node result = apply(node);
-      if (result != node) {
-        if(Dump.isOn("bv-rewrites")) {
-          std::ostringstream os;
-          os << "RewriteRule <"<<rule<<">; expect unsat";
-
-          Node condition = node.eqNode(result).notNode();
-
-          const Printer& printer =
-              smt::currentSmtEngine()->getOutputManager().getPrinter();
-          std::ostream& out =
-              smt::currentSmtEngine()->getOutputManager().getDumpOut();
-
-          printer.toStreamCmdComment(out, os.str());
-          printer.toStreamCmdCheckSat(out, condition);
-        }
-      }
-      Debug("theory::bv::rewrite") << "RewriteRule<" << rule << ">(" << node << ") => " << result << std::endl;
+      Debug("theory::bv::rewrite") << "RewriteRule<" << rule << ">(" << node
+                                   << ") => " << result << std::endl;
       return result;
-    } else {
+    }
+    else
+    {
       return node;
     }
   }