SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
GBModuleStatistics.cpp
Go to the documentation of this file.
1 #include "GBModuleStatistics.h"
2 #ifdef SMTRAT_DEVOPTION_Statistics
3 
4 #include <algorithm>
5 namespace smtrat
6 {
7 
8 std::map<unsigned,GBModuleStats*> GBModuleStats::instances = std::map<unsigned,GBModuleStats*>();
9 
10 GBModuleStats& GBModuleStats::getInstance(unsigned key)
11 {
12  if( instances[key] == 0 )
13  instances[key] = new GBModuleStats();
14  return *instances[key];
15 }
16 
17 void GBModuleStats::printAll(std::ostream& os) {
18  for(auto stats = instances.begin(); stats != instances.end(); ++stats ) {
19  stats->second->print(os);
20  }
21 }
22 
23 void GBModuleStats::print(std::ostream& os) {
24  os << "Groebner module statistics:\n";
25  os << "Times called:\t\t\t\t\t " << mNrCalls << std::endl;
26  os << "Times constant gb found:\t\t\t " << mNrConstantGBs << std::endl;
27  os << "Times inequality reduced to false:\t\t " << mNrInfeasibleInequalities << std::endl;
28  os << "Number of undetected unsatisfiable instances: \t" << mNrBackendReturnsFalse << std::endl;
29  os << "Equalities added/removed: \t\t\t" << mNrOfEqualitiesAdded << " / " << mNrOfEqualitiesRemoved << std::endl;
30  os << "Strict inequalities added/removed: \t\t" << mNrOfStrictInequalitiesAdded << " / " << mNrOfStrictInequalitiesRemoved << std::endl;
31  os << "Nonstrict inequalities added/removed: \t\t" << mNrOfNonStrictInequalitiesAdded << " / " << mNrOfNonStrictInequalitiesRemoved << std::endl;
32 
33  os << "Maximal number of pop backtracks after one removal: " << *std::max_element( mPopLevel.begin(), mPopLevel.end() ) << std::endl;
34  //os << "Mean value of number of pop backtracks after one removal: " << meanValue(mPopLevel.begin(), mPopLevel.end()) << std::endl;
35  //os << "Median value of number of pop backtracks after one removal: " << medianValue(mPopLevel.begin(), mPopLevel.end()) << std::endl;
36 
37 }
38 
39 
40 }
41 
42 #endif
void print(std::ostream &stream, const FormulaDB &db, const FormulaID id, const std::size_t level)
Class to create the formulas for axioms.