SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
MCSATStatistics.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 
10 class MCSATStatistics: public Statistics {
11 private:
12  std::size_t mInsertedLazyExplanation = 0;
13  std::size_t mUsedLazyExplanation = 0;
14  std::size_t mModelAssignmentCacheHit = 0;
15  std::size_t mBooleanDecision = 0;
16  std::size_t mTheoryDecision = 0;
17  std::size_t mBooleanConflict = 0;
18  std::size_t mTheoryConflict = 0;
19  std::size_t mInconsistentTheoryDecision = 0;
20  std::size_t mBackjumpDecide = 0;
21 
22 public:
23  bool enabled() const {
24  return
25  (mInsertedLazyExplanation > 0) ||
26  (mUsedLazyExplanation > 0) ||
27  (mModelAssignmentCacheHit > 0) ||
28  (mBooleanDecision > 0) ||
29  (mTheoryDecision > 0) ||
30  (mBooleanConflict > 0) ||
31  (mTheoryConflict > 0) ||
32  (mInconsistentTheoryDecision > 0) ||
33  (mBackjumpDecide > 0)
34  ;
35  }
36  void collect() {
37  Statistics::addKeyValuePair("insertedLazyExplanation", mInsertedLazyExplanation);
38  Statistics::addKeyValuePair("usedLazyExplanation", mUsedLazyExplanation);
39  Statistics::addKeyValuePair("modelAssignmentCacheHit", mModelAssignmentCacheHit);
40  Statistics::addKeyValuePair("booleanDecision", mBooleanDecision);
41  Statistics::addKeyValuePair("theoryDecision", mTheoryDecision);
42  Statistics::addKeyValuePair("booleanConflict", mBooleanConflict);
43  Statistics::addKeyValuePair("theoryConflict", mTheoryConflict);
44  Statistics::addKeyValuePair("inconsistentTheoryDecision", mInconsistentTheoryDecision);
45  Statistics::addKeyValuePair("backjumpDecide", mBackjumpDecide);
46  }
47 
48  void insertedLazyExplanation() {
49  ++mInsertedLazyExplanation;
50  }
51 
52  void usedLazyExplanation() {
53  ++mUsedLazyExplanation;
54  }
55 
56  void modelAssignmentCacheHit() {
57  ++mModelAssignmentCacheHit;
58  }
59 
60  void booleanDecision() {
61  ++mBooleanDecision;
62  }
63 
64  void theoryDecision() {
65  ++mTheoryDecision;
66  }
67 
68  void booleanConflict() {
69  ++mBooleanConflict;
70  }
71 
72  void theoryConflict() {
73  ++mTheoryConflict;
74  }
75 
76  void inconsistentTheoryDecision() {
77  ++mInconsistentTheoryDecision;
78  }
79 
80  void backjumpDecide() {
81  ++mBackjumpDecide;
82  }
83 
84 };
85 
86 }
87 }
88 
89 #endif
Class to create the formulas for axioms.
carl::statistics::Statistics Statistics
Definition: Statistics.h:7