/** Has something simplified to false? */
IntStat d_simplifiedToFalse;
+ /** Number of resource units spent. */
+ ReferenceStat<uint64_t> d_resourceUnitsUsed;
SmtEngineStatistics() :
d_definitionExpansionTime("smt::SmtEngine::definitionExpansionTime"),
d_solveTime("smt::SmtEngine::solveTime"),
d_pushPopTime("smt::SmtEngine::pushPopTime"),
d_processAssertionsTime("smt::SmtEngine::processAssertionsTime"),
- d_simplifiedToFalse("smt::SmtEngine::simplifiedToFalse", 0)
+ d_simplifiedToFalse("smt::SmtEngine::simplifiedToFalse", 0),
+ d_resourceUnitsUsed("smt::SmtEngine::resourceUnitsUsed")
{
StatisticsRegistry::registerStat(&d_definitionExpansionTime);
StatisticsRegistry::registerStat(&d_pushPopTime);
StatisticsRegistry::registerStat(&d_processAssertionsTime);
StatisticsRegistry::registerStat(&d_simplifiedToFalse);
+ StatisticsRegistry::registerStat(&d_resourceUnitsUsed);
}
~SmtEngineStatistics() {
StatisticsRegistry::unregisterStat(&d_pushPopTime);
StatisticsRegistry::unregisterStat(&d_processAssertionsTime);
StatisticsRegistry::unregisterStat(&d_simplifiedToFalse);
+ StatisticsRegistry::unregisterStat(&d_resourceUnitsUsed);
}
};/* struct SmtEngineStatistics */
d_private = new smt::SmtEnginePrivate(*this);
d_statisticsRegistry = new StatisticsRegistry();
d_stats = new SmtEngineStatistics();
-
+ d_stats->d_resourceUnitsUsed.setData(d_private->getResourceManager()->d_cumulativeResourceUsed);
// We have mutual dependency here, so we add the prop engine to the theory
// engine later (it is non-essential there)
d_theoryEngine = new TheoryEngine(d_context, d_userContext, d_private->d_iteRemover, const_cast<const LogicInfo&>(d_logic));
void ResourceManager::spendResource() throw (UnsafeInterruptException) {
++d_spendResourceCalls;
+ ++d_cumulativeResourceUsed;
if (!d_on) return;
Debug("limit") << "ResourceManager::spendResource()" << std::endl;
- ++d_cumulativeResourceUsed;
++d_thisCallResourceUsed;
if(out()) {
Trace("limit") << "ResourceManager::spendResource: interrupt!" << std::endl;