The statistic in `smt_solver.cpp` was not accurate.
#include "base/output.h"
#include "expr/node.h"
#include "options/bv_options.h"
+#include "printer/printer.h"
#include "proof/clause_id.h"
#include "prop/minisat/minisat.h"
#include "prop/prop_engine.h"
#include "prop/theory_proxy.h"
#include "smt/dump.h"
#include "smt/smt_engine.h"
-#include "printer/printer.h"
#include "smt/smt_engine_scope.h"
+#include "smt/smt_statistics_registry.h"
#include "theory/theory.h"
#include "theory/theory_engine.h"
d_registrar(registrar),
d_name(name),
d_removable(false),
- d_resourceManager(rm)
+ d_resourceManager(rm),
+ d_stats(name)
{
}
n.toString().c_str(),
n.getType().toString().c_str());
Trace("cnf") << "ensureLiteral(" << n << ")\n";
+ TimerStat::CodeTimer codeTimer(d_stats.d_cnfConversionTime, true);
if (hasLiteral(n))
{
ensureMappingForLiteral(n);
<< ", negated = " << (negated ? "true" : "false")
<< ", removable = " << (removable ? "true" : "false") << ")\n";
d_removable = removable;
+ TimerStat::CodeTimer codeTimer(d_stats.d_cnfConversionTime, true);
convertAndAssert(node, negated);
}
}
}
+CnfStream::Statistics::Statistics(const std::string& name)
+ : d_cnfConversionTime(smtStatisticsRegistry().registerTimer(
+ name + "::CnfStream::cnfConversionTime"))
+{
+}
+
} // namespace prop
} // namespace cvc5
/** Pointer to resource manager for associated SmtEngine */
ResourceManager* d_resourceManager;
+
+ private:
+ struct Statistics
+ {
+ Statistics(const std::string& name);
+ TimerStat d_cnfConversionTime;
+ } d_stats;
+
}; /* class CnfStream */
} // namespace prop
userContext,
&d_outMgr,
rm,
- FormulaLitPolicy::TRACK);
+ FormulaLitPolicy::TRACK,
+ "prop");
// connect theory proxy
d_theoryProxy->finishInit(d_cnfStream);
name + "definitionExpansionTime")),
d_numConstantProps(
smtStatisticsRegistry().registerInt(name + "numConstantProps")),
- d_cnfConversionTime(
- smtStatisticsRegistry().registerTimer(name + "cnfConversionTime")),
d_numAssertionsPre(smtStatisticsRegistry().registerInt(
name + "numAssertionsPreITERemoval")),
d_numAssertionsPost(smtStatisticsRegistry().registerInt(
TimerStat d_definitionExpansionTime;
/** number of constant propagations found during nonclausal simp */
IntStat d_numConstantProps;
- /** time spent converting to CNF */
- TimerStat d_cnfConversionTime;
/** Number of assertions before ite removal */
IntStat d_numAssertionsPre;
/** Number of assertions after ite removal */
// Push the formula to SAT
{
Chat() << "converting to CNF..." << endl;
- TimerStat::CodeTimer codeTimer(d_stats.d_cnfConversionTime);
const std::vector<Node>& assertions = ap.ref();
// It is important to distinguish the input assertions from the skolem
// definitions, as the decision justification heuristic treates the latter
{
case options::SatSolverMode::CRYPTOMINISAT:
d_satSolver.reset(prop::SatSolverFactory::createCryptoMinisat(
- smtStatisticsRegistry(), "theory::bv::BVSolverBitblast"));
+ smtStatisticsRegistry(), "theory::bv::BVSolverBitblast::"));
break;
default:
d_satSolver.reset(prop::SatSolverFactory::createCadical(
- smtStatisticsRegistry(), "theory::bv::BVSolverBitblast"));
+ smtStatisticsRegistry(), "theory::bv::BVSolverBitblast::"));
}
d_cnfStream.reset(new prop::CnfStream(d_satSolver.get(),
d_bbRegistrar.get(),
d_nullContext.get(),
nullptr,
- smt::currentResourceManager()));
+ smt::currentResourceManager(),
+ prop::FormulaLitPolicy::INTERNAL,
+ "theory::bv::BVSolverBitblast"));
}
void BVSolverBitblast::postCheck(Theory::Effort level)