}
Result asSatResult = lastResult.asSatisfiabilityResult();
-
-
int returnValue;
switch(asSatResult.isSAT()) {
// Remove the parser
delete parser;
-ReferenceStat< Result > s_statSatResult("sat/unsat", asSatResult);
+
+ ReferenceStat< Result > s_statSatResult("sat/unsat", asSatResult);
StatisticsRegistry::registerStat(&s_statSatResult);
if(options.statistics){
StatisticsRegistry::flushStatistics(cerr);
}
- return returnValue;
+ StatisticsRegistry::unregisterStat(&s_statSatResult);
+ StatisticsRegistry::unregisterStat(&s_statFilename);
+ return returnValue;
}
void doCommand(SmtEngine& smt, Command* cmd) {
/** Remember the options */
Options* d_options;
-
+
/* Pointer to the concrete SAT solver. Including this via the
preprocessor saves us a level of indirection vs, e.g., defining a
sub-class for each solver. */
StatisticsRegistry::registerStat(&d_statMaxLiterals);
StatisticsRegistry::registerStat(&d_statTotLiterals);
}
+ ~Statistics() {
+ StatisticsRegistry::unregisterStat(&d_statStarts);
+ StatisticsRegistry::unregisterStat(&d_statDecisions);
+ StatisticsRegistry::unregisterStat(&d_statRndDecisions);
+ StatisticsRegistry::unregisterStat(&d_statPropagations);
+ StatisticsRegistry::unregisterStat(&d_statConflicts);
+ StatisticsRegistry::unregisterStat(&d_statClausesLiterals);
+ StatisticsRegistry::unregisterStat(&d_statLearntsLiterals);
+ StatisticsRegistry::unregisterStat(&d_statMaxLiterals);
+ StatisticsRegistry::unregisterStat(&d_statTotLiterals);
+ }
void init(Minisat::SimpSolver* d_minisat){
d_statStarts.setData(d_minisat->starts);
d_statDecisions.setData(d_minisat->decisions);