SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
FMQEStatistics.h
Go to the documentation of this file.
1 #pragma once
2 
5 #ifdef SMTRAT_DEVOPTION_Statistics
6 
7 namespace smtrat::qe {
8 
9 class FMQEStatistics : public Statistics
10 {
11 private:
12  std::size_t m_input_constraints = 0;
13  std::size_t m_eliminated_vars = 0;
14  std::size_t m_eliminated_by_eq = 0;
15  std::size_t m_output_constraints = 0;
16  std::size_t m_total_constraints = 0;
17  bool m_eq_conflict = false;
18  carl::statistics::timer m_qe_timer;
19 
20 
21 public:
22  void collect() {
23  addKeyValuePair("input-constraints", m_input_constraints);
24  addKeyValuePair("eliminated-vars", m_eliminated_vars);
25  addKeyValuePair("eliminated-by-eq", m_eliminated_by_eq);
26  addKeyValuePair("output-constraints", m_output_constraints);
27  addKeyValuePair("total-constraints", m_total_constraints);
28  addKeyValuePair("qe-called", m_qe_timer);
29  addKeyValuePair("eq-conflict", m_eq_conflict);
30  }
31 
32  auto& timer() { return m_qe_timer; }
33 
34  void input(std::size_t n) { m_input_constraints = n; }
35  void vars(std::size_t n) { m_eliminated_vars = n; }
36  void elim_eq(std::size_t n) { m_eliminated_by_eq = m_eliminated_vars - n; }
37  void output(std::size_t n) { m_output_constraints = n; }
38  void node(std::size_t n) { ++m_visited_nodes; m_total_constraints += n; }
39 
40  void eq_conflict() { m_eq_conflict = true; }
41 
42 
43  static FMplexQEStatistics& get_instance() {
44  static FMplexQEStatistics & statistics = statistics_get<FMplexQEStatistics>("fm-qe");
45  return statistics;
46  }
47 };
48 
49 }
50 
51 #endif
Definition: CAD.h:9
std::vector< carl::Variable > vars(const std::pair< QuantifierType, std::vector< carl::Variable >> &p)
Definition: QEQuery.h:43
carl::statistics::Statistics Statistics
Definition: Statistics.h:7