Refactor / reimplement statistics (#6162)
authorGereon Kremer <gereon.kremer@cs.rwth-aachen.de>
Wed, 14 Apr 2021 19:37:12 +0000 (21:37 +0200)
committerGitHub <noreply@github.com>
Wed, 14 Apr 2021 19:37:12 +0000 (19:37 +0000)
commit9f14a0d6feca8d8ba727f88ef7dda5268183bb56
tree54d1500f368312ade8abb1fb9962976ae61bedfc
parente5c26181dab76704ad9a47126585fe2ec9d6cac2
Refactor / reimplement statistics (#6162)

This PR refactors how we collect statistics.
It splits the current statistic values into the values and a proxy object. The actual values now live inside the registry (making the ownership model way easier) while the proxy object are handed to whoever wants to collect a new statistic.
It also extends the C++ API to obtain and inspect the statistics.
To change the ownership, this PR needs to touch every single statistic in the whole codebase and change how it is registered.
185 files changed:
src/api/cpp/cvc5.cpp
src/api/cpp/cvc5.h
src/decision/justification_heuristic.cpp
src/decision/justification_heuristic.h
src/expr/proof_checker.cpp
src/expr/proof_checker.h
src/main/command_executor.cpp
src/main/command_executor.h
src/options/base_options.toml
src/options/options.h
src/options/options_public_functions.cpp
src/preprocessing/passes/bool_to_bv.cpp
src/preprocessing/passes/bool_to_bv.h
src/preprocessing/passes/bv_to_bool.cpp
src/preprocessing/passes/bv_to_bool.h
src/preprocessing/passes/ite_simp.cpp
src/preprocessing/passes/ite_simp.h
src/preprocessing/passes/miplib_trick.cpp
src/preprocessing/passes/miplib_trick.h
src/preprocessing/passes/non_clausal_simp.cpp
src/preprocessing/passes/non_clausal_simp.h
src/preprocessing/passes/unconstrained_simplifier.cpp
src/preprocessing/passes/unconstrained_simplifier.h
src/preprocessing/preprocessing_pass.cpp
src/preprocessing/preprocessing_pass.h
src/preprocessing/util/ite_utilities.cpp
src/preprocessing/util/ite_utilities.h
src/proof/proof_manager.cpp
src/proof/sat_proof.h
src/proof/sat_proof_implementation.h
src/prop/bvminisat/bvminisat.cpp
src/prop/bvminisat/bvminisat.h
src/prop/cadical.cpp
src/prop/cadical.h
src/prop/cryptominisat.cpp
src/prop/cryptominisat.h
src/prop/kissat.cpp
src/prop/kissat.h
src/prop/minisat/minisat.cpp
src/prop/minisat/minisat.h
src/prop/sat_solver.h
src/prop/sat_solver_factory.cpp
src/prop/sat_solver_factory.h
src/prop/theory_proxy.cpp
src/smt/env.cpp
src/smt/env.h
src/smt/proof_post_processor.cpp
src/smt/proof_post_processor.h
src/smt/smt_engine.cpp
src/smt/smt_engine.h
src/smt/smt_engine_scope.cpp
src/smt/smt_engine_scope.h
src/smt/smt_engine_stats.cpp
src/smt/smt_engine_stats.h
src/smt/smt_statistics_registry.cpp
src/smt/smt_statistics_registry.h
src/theory/arith/approx_simplex.cpp
src/theory/arith/approx_simplex.h
src/theory/arith/arith_static_learner.cpp
src/theory/arith/arith_static_learner.h
src/theory/arith/attempt_solution_simplex.cpp
src/theory/arith/attempt_solution_simplex.h
src/theory/arith/congruence_manager.cpp
src/theory/arith/congruence_manager.h
src/theory/arith/constraint.cpp
src/theory/arith/constraint.h
src/theory/arith/dio_solver.cpp
src/theory/arith/dio_solver.h
src/theory/arith/dual_simplex.cpp
src/theory/arith/dual_simplex.h
src/theory/arith/error_set.cpp
src/theory/arith/error_set.h
src/theory/arith/fc_simplex.cpp
src/theory/arith/fc_simplex.h
src/theory/arith/inference_manager.cpp
src/theory/arith/linear_equality.cpp
src/theory/arith/linear_equality.h
src/theory/arith/nl/stats.cpp
src/theory/arith/nl/stats.h
src/theory/arith/simplex.cpp
src/theory/arith/simplex.h
src/theory/arith/soi_simplex.cpp
src/theory/arith/soi_simplex.h
src/theory/arith/theory_arith.cpp
src/theory/arith/theory_arith_private.cpp
src/theory/arith/theory_arith_private.h
src/theory/arrays/array_info.cpp
src/theory/arrays/array_info.h
src/theory/arrays/inference_manager.cpp
src/theory/arrays/theory_arrays.cpp
src/theory/arrays/theory_arrays.h
src/theory/bags/bags_rewriter.cpp
src/theory/bags/bags_rewriter.h
src/theory/bags/bags_statistics.cpp
src/theory/bags/bags_statistics.h
src/theory/bags/inference_manager.cpp
src/theory/bv/abstraction.cpp
src/theory/bv/abstraction.h
src/theory/bv/bitblast/aig_bitblaster.cpp
src/theory/bv/bitblast/eager_bitblaster.cpp
src/theory/bv/bitblast/lazy_bitblaster.cpp
src/theory/bv/bitblast/lazy_bitblaster.h
src/theory/bv/bv_quick_check.cpp
src/theory/bv/bv_quick_check.h
src/theory/bv/bv_solver_bitblast.cpp
src/theory/bv/bv_solver_lazy.cpp
src/theory/bv/bv_solver_lazy.h
src/theory/bv/bv_subtheory_algebraic.cpp
src/theory/bv/bv_subtheory_algebraic.h
src/theory/bv/bv_subtheory_bitblast.cpp
src/theory/bv/bv_subtheory_bitblast.h
src/theory/bv/bv_subtheory_core.cpp
src/theory/bv/bv_subtheory_core.h
src/theory/bv/bv_subtheory_inequality.cpp
src/theory/bv/bv_subtheory_inequality.h
src/theory/bv/theory_bv.cpp
src/theory/bv/theory_bv_rewrite_rules.h
src/theory/datatypes/inference_manager.cpp
src/theory/engine_output_channel.cpp
src/theory/engine_output_channel.h
src/theory/fp/theory_fp.cpp
src/theory/inference_manager_buffered.cpp
src/theory/inference_manager_buffered.h
src/theory/quantifiers/cegqi/ceg_instantiator.h
src/theory/quantifiers/cegqi/inst_strategy_cegqi.h
src/theory/quantifiers/instantiate.cpp
src/theory/quantifiers/instantiate.h
src/theory/quantifiers/quant_conflict_find.cpp
src/theory/quantifiers/quant_conflict_find.h
src/theory/quantifiers/quantifiers_inference_manager.cpp
src/theory/quantifiers/quantifiers_statistics.cpp
src/theory/quantifiers/quantifiers_statistics.h
src/theory/quantifiers/sygus/sygus_stats.cpp
src/theory/quantifiers/sygus/sygus_stats.h
src/theory/quantifiers/term_tuple_enumerator.cpp
src/theory/sep/theory_sep.cpp
src/theory/sep/theory_sep.h
src/theory/sets/inference_manager.cpp
src/theory/shared_terms_database.cpp
src/theory/shared_terms_database.h
src/theory/strings/extf_solver.cpp
src/theory/strings/infer_proof_cons.cpp
src/theory/strings/inference_manager.cpp
src/theory/strings/regexp_solver.cpp
src/theory/strings/sequences_rewriter.cpp
src/theory/strings/sequences_rewriter.h
src/theory/strings/sequences_stats.cpp
src/theory/strings/sequences_stats.h
src/theory/strings/strings_rewriter.cpp
src/theory/strings/strings_rewriter.h
src/theory/strings/theory_strings_preprocess.cpp
src/theory/strings/theory_strings_preprocess.h
src/theory/theory.cpp
src/theory/theory.h
src/theory/theory_engine.cpp
src/theory/theory_engine.h
src/theory/theory_id.cpp
src/theory/theory_inference_manager.cpp
src/theory/theory_inference_manager.h
src/theory/uf/cardinality_extension.cpp
src/theory/uf/cardinality_extension.h
src/theory/uf/equality_engine.cpp
src/theory/uf/equality_engine.h
src/theory/uf/symmetry_breaker.cpp
src/theory/uf/symmetry_breaker.h
src/theory/uf/theory_uf.cpp
src/util/CMakeLists.txt
src/util/resource_manager.cpp
src/util/statistics.cpp [deleted file]
src/util/statistics.h [deleted file]
src/util/statistics_public.cpp
src/util/statistics_reg.cpp [deleted file]
src/util/statistics_reg.h [deleted file]
src/util/statistics_registry.cpp
src/util/statistics_registry.h
src/util/statistics_value.cpp
src/util/statistics_value.h
src/util/stats_base.cpp [deleted file]
src/util/stats_base.h [deleted file]
src/util/stats_histogram.h [deleted file]
src/util/stats_timer.cpp [deleted file]
src/util/stats_timer.h [deleted file]
src/util/stats_utils.cpp [deleted file]
src/util/stats_utils.h [deleted file]
test/unit/util/stats_black.cpp