From e461f722ff0888165e63916ee4be8502bd0b657c Mon Sep 17 00:00:00 2001 From: Aina Niemetz Date: Tue, 31 Aug 2021 15:26:25 -0700 Subject: [PATCH] bv: Remove dump=bv-rewrites. (#7099) 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 | 4 --- src/theory/bv/theory_bv_rewrite_rules.h | 35 +++++++++---------------- 2 files changed, 12 insertions(+), 27 deletions(-) diff --git a/src/smt/dump.cpp b/src/smt/dump.cpp index 9dbbba7d3..630a91288 100644 --- a/src/smt/dump.cpp +++ b/src/smt/dump.cpp @@ -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\ diff --git a/src/theory/bv/theory_bv_rewrite_rules.h b/src/theory/bv/theory_bv_rewrite_rules.h index 040d2c53f..fb80d43d0 100644 --- a/src/theory/bv/theory_bv_rewrite_rules.h +++ b/src/theory/bv/theory_bv_rewrite_rules.h @@ -445,32 +445,21 @@ public: SuppressWrongNoReturnWarning; } - template - static inline Node run(TNode node) { - if (!checkApplies || applies(node)) { - Debug("theory::bv::rewrite") << "RewriteRule<" << rule << ">(" << node << ")" << std::endl; + template + 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 <"<; 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; } } -- 2.30.2