SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
FMplexQEStatistics.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 FMplexQEStatistics : 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  std::size_t m_visited_nodes = 0;
18  std::size_t m_split_tried = 0;
19  std::size_t m_split_done = 0;
20  bool m_eq_conflict = false;
21  carl::statistics::timer m_qe_timer;
22 
23 
24 public:
25  void collect() {
26  addKeyValuePair("input-constraints", m_input_constraints);
27  addKeyValuePair("eliminated-vars", m_eliminated_vars);
28  addKeyValuePair("eliminated-by-eq", m_eliminated_by_eq);
29  addKeyValuePair("output-constraints", m_output_constraints);
30  addKeyValuePair("total-constraints", m_total_constraints);
31  addKeyValuePair("visited-nodes", m_visited_nodes);
32  addKeyValuePair("qe-called", m_qe_timer);
33  addKeyValuePair("eq-conflict", m_eq_conflict);
34  addKeyValuePair("split-tried", m_split_tried);
35  addKeyValuePair("split-done", m_split_done);
36  }
37 
38  auto& timer() { return m_qe_timer; }
39 
40  void input(std::size_t n) { m_input_constraints = n; }
41  void vars(std::size_t n) { m_eliminated_vars = n; }
42  void elim_eq(std::size_t n) { m_eliminated_by_eq = m_eliminated_vars - n; }
43  void output(std::size_t n) { m_output_constraints = n; }
44  void node(std::size_t n) { ++m_visited_nodes; m_total_constraints += n; }
45  void split_tried() { ++m_split_tried; }
46  void split_done() { ++m_split_done; }
47 
48  void eq_conflict() { m_eq_conflict = true; }
49 
50 
51  static FMplexQEStatistics& get_instance() {
52  static FMplexQEStatistics & statistics = statistics_get<FMplexQEStatistics>("fmplex-qe");
53  return statistics;
54  }
55 };
56 
57 }
58 
59 #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