3 #include <carl-arith/core/Variable.h>
8 #ifdef SMTRAT_DEVOPTION_Statistics
13 class QeCoveringsStatistics :
public Statistics {
15 size_t parameter_true_cell = 0;
16 size_t parameter_false_cell = 0 ;
17 size_t output_amount_atoms = 0 ;
18 size_t output_amount_or = 0 ;
19 size_t output_amount_and = 0 ;
20 size_t output_max_var_degree = 0 ;
21 size_t output_amount_ire = 0 ;
22 std::string mVariableOrderingHeuristic;
23 std::vector<carl::Variable> mVariableOrdering;
26 void collect()
override {
27 Statistics::addKeyValuePair(
"parameter_amount_true_cells", parameter_true_cell);
28 Statistics::addKeyValuePair(
"parameter_amount_false_cells", parameter_false_cell);
29 Statistics::addKeyValuePair(
"output_amount_atoms", output_amount_atoms);
30 Statistics::addKeyValuePair(
"output_amount_or", output_amount_or);
31 Statistics::addKeyValuePair(
"output_amount_and", output_amount_and);
32 Statistics::addKeyValuePair(
"output_max_var_degree", output_max_var_degree);
33 Statistics::addKeyValuePair(
"output_amount_ire", output_amount_ire);
40 ++parameter_true_cell;
43 ++parameter_false_cell;
46 void process_output_formula(
const FormulaT& output_formula) {
47 carl::visit(output_formula, [&](
const FormulaT& f){
48 if(f.is_atom() && f.type() != carl::FormulaType::FALSE && f.type() != carl::FormulaType::TRUE){
49 ++output_amount_atoms;
50 if(f.type() == carl::FormulaType::VARCOMPARE && std::holds_alternative<typename VariableComparisonT::MR>(f.variable_comparison().value())){
52 output_max_var_degree = std::max(output_max_var_degree, std::get<typename VariableComparisonT::MR>(f.variable_comparison().value()).poly().total_degree());
54 }
else if(f.type() == carl::FormulaType::CONSTRAINT){
55 output_max_var_degree = std::max(output_max_var_degree, f.constraint().lhs().total_degree());
58 output_amount_or += f.subformulas().size() - 1;
60 output_amount_and += f.subformulas().size() - 1;
66 mVariableOrderingHeuristic =
get_name(vo);
69 void set_variable_ordering(
const std::vector<carl::Variable>& vo) {
70 mVariableOrdering = vo;
73 static QeCoveringsStatistics& get_instance() {
74 static QeCoveringsStatistics& statistics = statistics_get<QeCoveringsStatistics>(
"qe_coverings");
VariableOrderingHeuristics
Possible heuristics for variable ordering.
Class to create the formulas for axioms.
carl::Formula< Poly > FormulaT
std::string get_name(SamplingAlgorithm samplingAlgorithm)
carl::statistics::Statistics Statistics