SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
OCStatistics.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #ifdef SMTRAT_DEVOPTION_Statistics
6 
7 namespace smtrat {
8 namespace mcsat {
9 namespace onecellcad {
10 
11 class OCStatistics : public Statistics {
12 private:
13  std::size_t mExplanationCalled = 0;
14  std::size_t mExplanationSuccess = 0;
15  // counts the number of "resultant-barriers" created in the third (smart Heuristic)
16  std::size_t mResultantBarriersH3 = 0;
17  // saves the maximal degree a polynomial has during calculations
18  std::size_t mMaxDegree = 0;
19 public:
20  bool enabled() const {
21  return true;
22  }
23 
24  void collect() {
25  Statistics::addKeyValuePair("explanation_called", mExplanationCalled);
26  Statistics::addKeyValuePair("explanation_success", mExplanationSuccess);
27  Statistics::addKeyValuePair("resultant_barriers", mResultantBarriersH3);
28  Statistics::addKeyValuePair("max_degree", mMaxDegree);
29  }
30 
31  void explanationCalled() {
32  ++mExplanationCalled;
33  }
34 
35  void explanationSuccess() {
36  ++mExplanationSuccess;
37  }
38 
39  void resultantBarrierCreated(){
40  ++mResultantBarriersH3;
41  }
42 
43  // To disable this statistics, set variable in appendOnCorrectLevel() in utils.h
44  void updateMaxDegree(std::size_t NewDeg){
45  mMaxDegree = NewDeg;
46  }
47 
48  std::size_t getCurrentMaxDegree(){
49  return mMaxDegree;
50  }
51 };
52 
53 }
54 }
55 }
56 
57 #endif
Class to create the formulas for axioms.
carl::statistics::Statistics Statistics
Definition: Statistics.h:7