/*! \file bv_subtheory_algebraic.cpp
** \verbatim
** Top contributors (to current version):
- ** Liana Hadarean, Tim King, Aina Niemetz
+ ** Liana Hadarean, Aina Niemetz, Tim King
** This file is part of the CVC4 project.
** Copyright (c) 2009-2018 by the authors listed in the file AUTHORS
** in the top-level source directory) and their institutional affiliations.
-bool AlgebraicSolver::check(Theory::Effort e) {
+bool AlgebraicSolver::check(Theory::Effort e)
+{
Assert(options::bitblastMode() == theory::bv::BITBLAST_MODE_LAZY);
- if (!Theory::fullEffort(e)) {
- return true;
- }
-
- if (!useHeuristic()) {
- return true;
- }
-
- ++(d_numCalls);
+ if (!Theory::fullEffort(e)) { return true; }
+ if (!useHeuristic()) { return true; }
TimerStat::CodeTimer algebraicTimer(d_statistics.d_solveTime);
Debug("bv-subtheory-algebraic") << "AlgebraicSolver::check (" << e << ")\n";
+ ++(d_numCalls);
++(d_statistics.d_numCallstoCheck);
d_explanations.clear();
bool InequalitySolver::check(Theory::Effort e) {
Debug("bv-subtheory-inequality") << "InequalitySolveR::check("<< e <<")\n";
+ TimerStat::CodeTimer inequalityTimer(d_statistics.d_solveTime);
++(d_statistics.d_numCallstoCheck);
d_bv->spendResource(options::theoryCheckStep());
}
InequalitySolver::Statistics::Statistics()
- : d_numCallstoCheck("theory::bv::InequalitySolver::NumCallsToCheck", 0)
+ : d_numCallstoCheck("theory::bv::inequality::NumCallsToCheck", 0),
+ d_solveTime("theory::bv::inequality::SolveTime")
{
smtStatisticsRegistry()->registerStat(&d_numCallstoCheck);
+ smtStatisticsRegistry()->registerStat(&d_solveTime);
}
-InequalitySolver::Statistics::~Statistics() {
+
+InequalitySolver::Statistics::~Statistics()
+{
smtStatisticsRegistry()->unregisterStat(&d_numCallstoCheck);
+ smtStatisticsRegistry()->unregisterStat(&d_solveTime);
}
struct IneqOnlyComputedAttributeId {};
typedef expr::Attribute<IneqOnlyComputedAttributeId, bool> IneqOnlyComputedAttribute;
-class InequalitySolver: public SubtheorySolver {
- struct Statistics {
+class InequalitySolver : public SubtheorySolver
+{
+ struct Statistics
+ {
IntStat d_numCallstoCheck;
+ TimerStat d_solveTime;
Statistics();
~Statistics();
};