Skip to content

Commit

Permalink
Remove empty leaf destructors. (#6211)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys committed Jul 30, 2022
1 parent f7fbb78 commit 5d0dea0
Show file tree
Hide file tree
Showing 134 changed files with 10 additions and 322 deletions.
2 changes: 0 additions & 2 deletions src/ackermannization/ackermannize_bv_tactic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ class ackermannize_bv_tactic : public tactic {
updt_params(p);
}

~ackermannize_bv_tactic() override { }

char const* name() const override { return "ackermannize_bv"; }

void operator()(goal_ref const & g, goal_ref_buffer & result) override {
Expand Down
2 changes: 0 additions & 2 deletions src/ackermannization/ackr_model_converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ class ackr_model_converter : public model_converter {
fixed_model(false)
{ }

~ackr_model_converter() override { }

void get_units(obj_map<expr, bool>& units) override { units.reset(); }

void operator()(model_ref & md) override {
Expand Down
2 changes: 0 additions & 2 deletions src/ackermannization/lackr_model_converter_lazy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ class lackr_model_converter_lazy : public model_converter {
, model_constructor(lmc)
{ }

~lackr_model_converter_lazy() override { }

void operator()(model_ref & md) override {
SASSERT(md.get() == 0 || (!md->get_num_constants() && !md->get_num_functions()));
SASSERT(model_constructor.get());
Expand Down
1 change: 0 additions & 1 deletion src/api/api_algebraic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ extern "C" {
scoped_anum_vector const & m_as;
public:
vector_var2anum(scoped_anum_vector & as):m_as(as) {}
~vector_var2anum() override {}
algebraic_numbers::manager & m() const override { return m_as.m(); }
bool contains(polynomial::var x) const override { return static_cast<unsigned>(x) < m_as.size(); }
algebraic_numbers::anum const & operator()(polynomial::var x) const override { return m_as.get(x); }
Expand Down
1 change: 0 additions & 1 deletion src/api/api_ast_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ namespace api {
struct Z3_ast_vector_ref : public api::object {
ast_ref_vector m_ast_vector;
Z3_ast_vector_ref(api::context& c, ast_manager & m): api::object(c), m_ast_vector(m) {}
~Z3_ast_vector_ref() override {}
};

inline Z3_ast_vector_ref * to_ast_vector(Z3_ast_vector v) { return reinterpret_cast<Z3_ast_vector_ref *>(v); }
Expand Down
1 change: 0 additions & 1 deletion src/api/api_datalog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ namespace api {
m_context(m, m_register_engine, p),
m_trail(m) {}

~fixedpoint_context() override {}
family_id get_family_id() const override { return const_cast<datalog::context&>(m_context).get_decl_util().get_family_id(); }
void set_state(void* state) {
SASSERT(!m_state);
Expand Down
1 change: 0 additions & 1 deletion src/api/api_goal.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Revision History:
struct Z3_goal_ref : public api::object {
goal_ref m_goal;
Z3_goal_ref(api::context& c) : api::object(c) {}
~Z3_goal_ref() override {}
};

inline Z3_goal_ref * to_goal(Z3_goal g) { return reinterpret_cast<Z3_goal_ref *>(g); }
Expand Down
3 changes: 0 additions & 3 deletions src/api/api_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Revision History:
struct Z3_model_ref : public api::object {
model_ref m_model;
Z3_model_ref(api::context& c): api::object(c) {}
~Z3_model_ref() override {}
};

inline Z3_model_ref * to_model(Z3_model s) { return reinterpret_cast<Z3_model_ref *>(s); }
Expand All @@ -34,7 +33,6 @@ struct Z3_func_interp_ref : public api::object {
model_ref m_model; // must have it to prevent reference to m_func_interp to be killed.
func_interp * m_func_interp;
Z3_func_interp_ref(api::context& c, model * m): api::object(c), m_model(m), m_func_interp(nullptr) {}
~Z3_func_interp_ref() override {}
};

inline Z3_func_interp_ref * to_func_interp(Z3_func_interp s) { return reinterpret_cast<Z3_func_interp_ref *>(s); }
Expand All @@ -46,7 +44,6 @@ struct Z3_func_entry_ref : public api::object {
func_interp * m_func_interp;
func_entry const * m_func_entry;
Z3_func_entry_ref(api::context& c, model * m):api::object(c), m_model(m), m_func_interp(nullptr), m_func_entry(nullptr) {}
~Z3_func_entry_ref() override {}
};

inline Z3_func_entry_ref * to_func_entry(Z3_func_entry s) { return reinterpret_cast<Z3_func_entry_ref *>(s); }
Expand Down
2 changes: 0 additions & 2 deletions src/api/api_parsers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ extern "C" {
ctx->register_plist();
ctx->set_ignore_check(true);
}

~Z3_parser_context_ref() override {}
};

inline Z3_parser_context_ref * to_parser_context(Z3_parser_context pc) { return reinterpret_cast<Z3_parser_context_ref*>(pc); }
Expand Down
1 change: 0 additions & 1 deletion src/api/api_solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ struct Z3_solver_ref : public api::object {

Z3_solver_ref(api::context& c, solver_factory * f):
api::object(c), m_solver_factory(f), m_solver(nullptr), m_logic(symbol::null), m_eh(nullptr) {}
~Z3_solver_ref() override {}

void assert_expr(expr* e);
void assert_expr(expr* e, expr* t);
Expand Down
1 change: 0 additions & 1 deletion src/api/api_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Revision History:
struct Z3_stats_ref : public api::object {
statistics m_stats;
Z3_stats_ref(api::context& c): api::object(c) {}
~Z3_stats_ref() override {}
};

inline Z3_stats_ref * to_stats(Z3_stats s) { return reinterpret_cast<Z3_stats_ref *>(s); }
Expand Down
3 changes: 0 additions & 3 deletions src/api/api_tactic.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ namespace api {
struct Z3_tactic_ref : public api::object {
tactic_ref m_tactic;
Z3_tactic_ref(api::context& c): api::object(c) {}
~Z3_tactic_ref() override {}
};

struct Z3_probe_ref : public api::object {
probe_ref m_probe;
Z3_probe_ref(api::context& c):api::object(c) {}
~Z3_probe_ref() override {}
};

inline Z3_tactic_ref * to_tactic(Z3_tactic g) { return reinterpret_cast<Z3_tactic_ref *>(g); }
Expand All @@ -50,7 +48,6 @@ struct Z3_apply_result_ref : public api::object {
model_converter_ref m_mc;
proof_converter_ref m_pc;
Z3_apply_result_ref(api::context& c, ast_manager & m);
~Z3_apply_result_ref() override {}
};

inline Z3_apply_result_ref * to_apply_result(Z3_apply_result g) { return reinterpret_cast<Z3_apply_result_ref *>(g); }
Expand Down
1 change: 0 additions & 1 deletion src/ast/array_decl_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ class array_decl_plugin : public decl_plugin {
bool is_array_sort(sort* s) const;
public:
array_decl_plugin();
~array_decl_plugin() override {}

decl_plugin * mk_fresh() override {
return alloc(array_decl_plugin);
Expand Down
1 change: 0 additions & 1 deletion src/ast/ast_printer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class simple_ast_printer_context : public ast_printer_context {
smt2_pp_environment_dbg & env() const { return *(m_env.get()); }
public:
simple_ast_printer_context(ast_manager & m):m_manager(m) { m_env = alloc(smt2_pp_environment_dbg, m); }
~simple_ast_printer_context() override {}
ast_manager & m() const { return m_manager; }
ast_manager & get_ast_manager() override { return m_manager; }
void display(std::ostream & out, sort * s, unsigned indent = 0) const override { out << mk_ismt2_pp(s, m(), indent); }
Expand Down
1 change: 0 additions & 1 deletion src/ast/ast_printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class ast_printer {

class ast_printer_context : public ast_printer {
public:
~ast_printer_context() override {}
virtual ast_manager & get_ast_manager() = 0;
virtual std::ostream & regular_stream();
virtual std::ostream & diagnostic_stream();
Expand Down
1 change: 0 additions & 1 deletion src/ast/bv_decl_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ class bv_decl_plugin : public decl_plugin {
public:
bv_decl_plugin();

~bv_decl_plugin() override {}
void finalize() override;

decl_plugin * mk_fresh() override { return alloc(bv_decl_plugin); }
Expand Down
1 change: 0 additions & 1 deletion src/ast/dl_decl_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ namespace datalog {
public:

dl_decl_plugin();
~dl_decl_plugin() override {}

decl_plugin * mk_fresh() override { return alloc(dl_decl_plugin); }

Expand Down
2 changes: 0 additions & 2 deletions src/ast/format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ namespace format_ns {
m_line_break_ext("cr++") {
}

~format_decl_plugin() override {}

void finalize() override {
if (m_format_sort)
m_manager->dec_ref(m_format_sort);
Expand Down
1 change: 0 additions & 1 deletion src/ast/fpa/fpa2bv_converter.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ class fpa2bv_converter_wrapped : public fpa2bv_converter {
fpa2bv_converter_wrapped(ast_manager & m, th_rewriter& rw) :
fpa2bv_converter(m),
m_rw(rw) {}
~fpa2bv_converter_wrapped() override {}
void mk_const(func_decl * f, expr_ref & result) override;
void mk_rm_const(func_decl * f, expr_ref & result) override;
app_ref wrap(expr * e);
Expand Down
9 changes: 0 additions & 9 deletions src/ast/normal_forms/name_exprs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ class name_exprs_core : public name_exprs {
m_rw(m, m.proofs_enabled(), m_cfg) {
}

~name_exprs_core() override {
}

void operator()(expr * n, expr_ref_vector & new_defs, proof_ref_vector & new_def_proofs, expr_ref & r, proof_ref & p) override {
m_cfg.m_def_exprs = &new_defs;
m_cfg.m_def_proofs = &new_def_proofs;
Expand Down Expand Up @@ -113,9 +110,6 @@ class name_quantifier_labels : public name_exprs_core {
name_exprs_core(m, n, m_pred),
m_pred(m) {
}

~name_quantifier_labels() override {
}
};

name_exprs * mk_quantifier_label_namer(ast_manager & m, defined_names & n) {
Expand Down Expand Up @@ -145,9 +139,6 @@ class name_nested_formulas : public name_exprs_core {
m_pred(m) {
}

~name_nested_formulas() override {
}

void operator()(expr * n, expr_ref_vector & new_defs, proof_ref_vector & new_def_proofs, expr_ref & r, proof_ref & p) override {
m_pred.m_root = n;
TRACE("name_exprs", tout << "operator()\n";);
Expand Down
1 change: 0 additions & 1 deletion src/ast/pb_decl_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class pb_decl_plugin : public decl_plugin {
func_decl * mk_eq(unsigned arity, rational const* coeffs, int k);
public:
pb_decl_plugin();
~pb_decl_plugin() override {}

sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) override {
UNREACHABLE();
Expand Down
2 changes: 0 additions & 2 deletions src/ast/proofs/proof_checker.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ class proof_checker {
public:
hyp_decl_plugin();

~hyp_decl_plugin() override {}

void finalize() override;

decl_plugin * mk_fresh() override { return alloc(hyp_decl_plugin); }
Expand Down
2 changes: 0 additions & 2 deletions src/ast/rewriter/elim_bounds.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ class elim_bounds_rw : public rewriter_tpl<elim_bounds_cfg> {
rewriter_tpl<elim_bounds_cfg>(m, m.proofs_enabled(), m_cfg),
m_cfg(m)
{}

~elim_bounds_rw() override {}
};


2 changes: 0 additions & 2 deletions src/ast/rewriter/expr_replacer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ class th_rewriter2expr_replacer : public expr_replacer {
m_r(m, p) {
}

~th_rewriter2expr_replacer() override {}

ast_manager & m() const override { return m_r.m(); }

void set_substitution(expr_substitution * s) override { m_r.set_substitution(s); }
Expand Down
1 change: 0 additions & 1 deletion src/ast/rewriter/push_app_ite.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class ng_push_app_ite_cfg : public push_app_ite_cfg {
bool is_target(func_decl * decl, unsigned num_args, expr * const * args) override;
public:
ng_push_app_ite_cfg(ast_manager& m): push_app_ite_cfg(m) {}
~ng_push_app_ite_cfg() override {}
};

struct push_app_ite_rw : public rewriter_tpl<push_app_ite_cfg> {
Expand Down
1 change: 0 additions & 1 deletion src/ast/rewriter/recfun_replace.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class recfun_replace : public recfun::replace {
expr_safe_replace m_replace;
public:
recfun_replace(ast_manager& m): m(m), m_replace(m) {}
~recfun_replace() override {}
void reset() override { m_replace.reset(); }
void insert(expr* s, expr* t) override { m_replace.insert(s, t); }
expr_ref operator()(expr* e) override { expr_ref r(m); m_replace(e, r); return r; }
Expand Down
2 changes: 0 additions & 2 deletions src/ast/special_relations_decl_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ class special_relations_decl_plugin : public decl_plugin {
public:
special_relations_decl_plugin();

~special_relations_decl_plugin() override {}

decl_plugin * mk_fresh() override {
return alloc(special_relations_decl_plugin);
}
Expand Down
2 changes: 0 additions & 2 deletions src/cmd_context/basic_cmds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,6 @@ class set_get_option_cmd : public cmd {
m_int_real_coercions(":int-real-coercions"),
m_reproducible_resource_limit(":reproducible-resource-limit") {
}
~set_get_option_cmd() override {}

};

class set_option_cmd : public set_get_option_cmd {
Expand Down
1 change: 0 additions & 1 deletion src/cmd_context/cmd_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,6 @@ class cmd_context::pp_env : public smt2_pp_environment {

public:
pp_env(cmd_context & o):m_owner(o), m_autil(o.m()), m_bvutil(o.m()), m_arutil(o.m()), m_futil(o.m()), m_sutil(o.m()), m_dtutil(o.m()), m_dlutil(o.m()) {}
~pp_env() override {}
ast_manager & get_manager() const override { return m_owner.m(); }
arith_util & get_autil() override { return m_autil; }
bv_util & get_bvutil() override { return m_bvutil; }
Expand Down
7 changes: 0 additions & 7 deletions src/cmd_context/pdecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ class psort_sort : public psort {
sort * get_sort() const { return m_sort; }
sort * instantiate(pdecl_manager & m, unsigned n, sort * const * s) override { return m_sort; }
public:
~psort_sort() override {}
bool is_sort_wrapper() const override { return true; }
char const * hcons_kind() const override { return "psort_sort"; }
unsigned hcons_hash() const override { return m_sort->get_id(); }
Expand All @@ -171,7 +170,6 @@ class psort_var : public psort {
}
size_t obj_size() const override { return sizeof(psort_var); }
public:
~psort_var() override {}
char const * hcons_kind() const override { return "psort_var"; }
unsigned hcons_hash() const override { return hash_u_u(m_num_params, m_idx); }
bool hcons_eq(psort const * other) const override {
Expand Down Expand Up @@ -233,7 +231,6 @@ class psort_app : public psort {
}

public:
~psort_app() override {}
char const * hcons_kind() const override { return "psort_app"; }
unsigned hcons_hash() const override {
return get_composite_hash<psort_app*, khasher, chasher>(const_cast<psort_app*>(this), m_args.size());
Expand Down Expand Up @@ -800,8 +797,6 @@ struct pdecl_manager::app_sort_info : public pdecl_manager::sort_info {
m.m().inc_array_ref(n, s);
}

~app_sort_info() override {}

unsigned obj_size() const override { return sizeof(app_sort_info); }

void finalize(pdecl_manager & m) override {
Expand Down Expand Up @@ -843,8 +838,6 @@ struct pdecl_manager::indexed_sort_info : public pdecl_manager::sort_info {
m_indices(n, s) {
}

~indexed_sort_info() override {}

unsigned obj_size() const override { return sizeof(indexed_sort_info); }

void display(std::ostream & out, pdecl_manager const & m) const override {
Expand Down
Loading

0 comments on commit 5d0dea0

Please sign in to comment.