Go to the documentation of this file.
9 #ifndef CPROVER_SOLVERS_SOLVER_HARDNESS_H
10 #define CPROVER_SOLVERS_SOLVER_HARDNESS_H
17 #include <unordered_map>
18 #include <unordered_set>
75 std::vector<goto_programt::const_targett>
pcs;
87 std::size_t ssa_index,
88 const exprt ssa_expression,
101 const exprt ssa_expression,
102 const std::vector<goto_programt::const_targett> &pcs);
114 const size_t cnf_clause_index,
139 std::vector<std::unordered_map<hardness_ssa_keyt, sat_hardnesst>>
157 return std::hash<std::string>{}(
159 hashed_stats.
pc->source_location().as_string());
171 auto prop_conv_solver =
174 if(
auto hardness_collector = prop_conv_solver->get_hardness_collector())
176 if(hardness_collector->solver_hardness)
179 *(hardness_collector->solver_hardness));
180 handler(solver_hardness);
186 #endif // CPROVER_SOLVERS_SOLVER_HARDNESS_H
void register_ssa_size(std::size_t size)
static void with_solver_hardness(decision_proceduret &maybe_hardness_collector, std::function< void(solver_hardnesst &hardness)> handler)
std::size_t operator()(const solver_hardnesst::hardness_ssa_keyt &hashed_stats) const
std::vector< literalt > bvt
static std::string expr2string(const exprt expr)
static std::string goto_instruction2string(goto_programt::const_targett pc)
Base class for all expressions.
void register_clause(const bvt &bv, const bvt &cnf, const size_t cnf_clause_index, bool register_cnf)
Called e.g.
assertion_statst assertion_stats
hardness_ssa_keyt current_ssa_key
std::string ssa_expression
std::vector< goto_programt::const_targett > pcs
std::unordered_set< size_t > variables
std::vector< size_t > clause_set
sat_hardnesst sat_hardness
solver_hardnesst & operator=(const solver_hardnesst &)=delete
std::vector< std::unordered_map< hardness_ssa_keyt, sat_hardnesst > > hardness_stats
void register_ssa(std::size_t ssa_index, const exprt ssa_expression, goto_programt::const_targett pc)
Called from the symtex_target_equationt::convert_*, this function associates an SSA step to all the s...
void register_assertion_ssas(const exprt ssa_expression, const std::vector< goto_programt::const_targett > &pcs)
Called from the symtex_target_equationt::convert_assertions, this function associates the disjunction...
void set_outfile(const std::string &file_name)
A structure that facilitates collecting the complexity statistics from a decision procedure.
solver_hardnesst()=default
std::size_t max_ssa_set_size
bool operator==(const hardness_ssa_keyt &other) const
instructionst::const_iterator const_targett
goto_programt::const_targett pc
void produce_report()
Print the statistics to a JSON file (specified via command-line option).
sat_hardnesst current_hardness
sat_hardnesst & operator+=(const sat_hardnesst &other)
std::string ssa_expression