mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 17:44:08 +00:00
remove default destructors & some default constructors
Another ~700 KB reduction in binary size
This commit is contained in:
parent
0837e3b8e8
commit
8061765574
|
@ -41,8 +41,6 @@ public:
|
|||
, m_ackr_helper(m)
|
||||
{}
|
||||
|
||||
~imp() { }
|
||||
|
||||
//
|
||||
// Returns true iff model was successfully constructed.
|
||||
// Conflicts are saved as a side effect.
|
||||
|
|
|
@ -45,8 +45,6 @@ struct ast_pp_dot_st {
|
|||
m_printed(),
|
||||
m_to_print(),
|
||||
m_first(true) {}
|
||||
|
||||
~ast_pp_dot_st() {};
|
||||
|
||||
void push_term(const expr * a) { m_to_print.push_back(a); }
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ namespace euf {
|
|||
unsigned_vector eqs; // equality occurrences
|
||||
|
||||
unsigned root_id() const { return root->n->get_id(); }
|
||||
~node() {}
|
||||
static node* mk(region& r, enode* n);
|
||||
};
|
||||
|
||||
|
@ -270,8 +269,6 @@ namespace euf {
|
|||
ac_plugin(egraph& g, unsigned fid, unsigned op);
|
||||
|
||||
ac_plugin(egraph& g, func_decl* f);
|
||||
|
||||
~ac_plugin() override {}
|
||||
|
||||
theory_id get_id() const override { return m_fid; }
|
||||
|
||||
|
|
|
@ -33,8 +33,6 @@ namespace euf {
|
|||
public:
|
||||
arith_plugin(egraph& g);
|
||||
|
||||
~arith_plugin() override {}
|
||||
|
||||
theory_id get_id() const override { return a.get_family_id(); }
|
||||
|
||||
void register_node(enode* n) override;
|
||||
|
|
|
@ -95,8 +95,6 @@ namespace euf {
|
|||
public:
|
||||
bv_plugin(egraph& g);
|
||||
|
||||
~bv_plugin() override {}
|
||||
|
||||
theory_id get_id() const override { return bv.get_family_id(); }
|
||||
|
||||
void register_node(enode* n) override;
|
||||
|
|
|
@ -34,8 +34,6 @@ namespace euf {
|
|||
public:
|
||||
|
||||
specrel_plugin(egraph& g);
|
||||
|
||||
~specrel_plugin() override {}
|
||||
|
||||
theory_id get_id() const override { return sp.get_family_id(); }
|
||||
|
||||
|
|
|
@ -26,8 +26,6 @@ label_rewriter::label_rewriter(ast_manager & m) :
|
|||
m_label_fid(m.get_label_family_id()),
|
||||
m_rwr(m, false, *this) {}
|
||||
|
||||
label_rewriter::~label_rewriter() {}
|
||||
|
||||
br_status label_rewriter::reduce_app(
|
||||
func_decl * f, unsigned num, expr * const * args, expr_ref & result,
|
||||
proof_ref & result_pr) {
|
||||
|
|
|
@ -27,7 +27,6 @@ class label_rewriter : public default_rewriter_cfg {
|
|||
rewriter_tpl<label_rewriter> m_rwr;
|
||||
public:
|
||||
label_rewriter(ast_manager & m);
|
||||
~label_rewriter();
|
||||
|
||||
br_status reduce_app(func_decl * f, unsigned num, expr * const * args, expr_ref & result,
|
||||
proof_ref & result_pr);
|
||||
|
|
|
@ -346,8 +346,6 @@ public:
|
|||
ast_manager & m() const { return this->m_manager; }
|
||||
Config & cfg() { return m_cfg; }
|
||||
Config const & cfg() const { return m_cfg; }
|
||||
|
||||
~rewriter_tpl() override {};
|
||||
|
||||
void reset();
|
||||
void cleanup();
|
||||
|
|
|
@ -375,8 +375,6 @@ public:
|
|||
m_bv(m)
|
||||
{}
|
||||
|
||||
~reduce_args_simplifier() override {}
|
||||
|
||||
char const* name() const override { return "reduce-args"; }
|
||||
|
||||
void collect_statistics(statistics& st) const override {
|
||||
|
|
|
@ -31,8 +31,6 @@ rule_properties::rule_properties(ast_manager & m, rule_manager& rm, context& ctx
|
|||
m_dt(m), m_dl(m), m_a(m), m_bv(m), m_ar(m), m_rec(m),
|
||||
m_generate_proof(false), m_collected(false), m_is_monotone(true) {}
|
||||
|
||||
rule_properties::~rule_properties() {}
|
||||
|
||||
void rule_properties::collect(rule_set const& rules) {
|
||||
reset();
|
||||
m_collected = true;
|
||||
|
|
|
@ -58,7 +58,6 @@ namespace datalog {
|
|||
bool check_accessor(app* n);
|
||||
public:
|
||||
rule_properties(ast_manager & m, rule_manager& rm, context& ctx, i_expr_pred& is_predicate);
|
||||
~rule_properties();
|
||||
void set_generate_proof(bool generate_proof) { m_generate_proof = generate_proof; }
|
||||
void collect(rule_set const& r);
|
||||
void check_quantifier_free();
|
||||
|
|
|
@ -1443,8 +1443,6 @@ namespace datalog {
|
|||
m_rule_trace(ctx.get_rule_manager()) {
|
||||
}
|
||||
|
||||
bmc::~bmc() {}
|
||||
|
||||
lbool bmc::query(expr* query) {
|
||||
m_solver = nullptr;
|
||||
m_answer = nullptr;
|
||||
|
|
|
@ -51,8 +51,6 @@ namespace datalog {
|
|||
public:
|
||||
bmc(context& ctx);
|
||||
|
||||
~bmc() override;
|
||||
|
||||
lbool query(expr* query) override;
|
||||
|
||||
void display_certificate(std::ostream& out) const override;
|
||||
|
|
|
@ -59,8 +59,6 @@ namespace datalog {
|
|||
m_fparams.m_mbqi = false;
|
||||
}
|
||||
|
||||
~imp() {}
|
||||
|
||||
lbool query(expr* query) {
|
||||
m_ctx.ensure_opened();
|
||||
m_solver.reset();
|
||||
|
|
|
@ -78,8 +78,6 @@ namespace datalog {
|
|||
m_descendants(DEFAULT_HASHTABLE_INITIAL_CAPACITY, m_hash, m_eq) {
|
||||
}
|
||||
|
||||
~ddnf_node() {}
|
||||
|
||||
unsigned inc_ref() {
|
||||
return ++m_refs;
|
||||
}
|
||||
|
@ -429,8 +427,6 @@ namespace datalog {
|
|||
class ddnfs {
|
||||
u_map<ddnf_mgr*> m_mgrs;
|
||||
public:
|
||||
ddnfs() {}
|
||||
|
||||
~ddnfs() {
|
||||
u_map<ddnf_mgr*>::iterator it = m_mgrs.begin(), end = m_mgrs.end();
|
||||
for (; it != end; ++it) {
|
||||
|
@ -503,8 +499,6 @@ namespace datalog {
|
|||
m_inner_ctx.updt_params(params);
|
||||
}
|
||||
|
||||
~imp() {}
|
||||
|
||||
lbool query(expr* query) {
|
||||
m_ctx.ensure_opened();
|
||||
rule_set& old_rules = m_ctx.get_rules();
|
||||
|
|
|
@ -43,7 +43,6 @@ class lemma_expand_bnd_generalizer : public lemma_generalizer {
|
|||
|
||||
public:
|
||||
lemma_expand_bnd_generalizer(context &ctx);
|
||||
~lemma_expand_bnd_generalizer() override {}
|
||||
|
||||
void operator()(lemma_ref &lemma) override;
|
||||
|
||||
|
|
|
@ -161,7 +161,6 @@ class lemma_global_generalizer : public lemma_generalizer {
|
|||
|
||||
public:
|
||||
lemma_global_generalizer(context &ctx);
|
||||
~lemma_global_generalizer() override {}
|
||||
|
||||
void operator()(lemma_ref &lemma) override;
|
||||
|
||||
|
|
|
@ -1354,8 +1354,6 @@ namespace datalog {
|
|||
m_fparams.m_mbqi = false;
|
||||
}
|
||||
|
||||
~imp() {}
|
||||
|
||||
lbool query(expr* query) {
|
||||
m_ctx.ensure_opened();
|
||||
m_index.reset();
|
||||
|
|
|
@ -40,7 +40,6 @@ namespace datalog {
|
|||
public:
|
||||
mk_array_eq_rewrite(context & ctx, unsigned priority);
|
||||
rule_set * operator()(rule_set const & source) override;
|
||||
~mk_array_eq_rewrite() override{}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -112,7 +112,6 @@ namespace datalog {
|
|||
public:
|
||||
mk_array_instantiation(context & ctx, unsigned priority);
|
||||
rule_set * operator()(rule_set const & source) override;
|
||||
~mk_array_instantiation() override{}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -27,8 +27,6 @@ namespace datalog {
|
|||
m(ctx.get_manager()),
|
||||
m_ctx(ctx) {
|
||||
}
|
||||
|
||||
mk_backwards::~mk_backwards() { }
|
||||
|
||||
rule_set * mk_backwards::operator()(rule_set const & source) {
|
||||
context& ctx = source.get_context();
|
||||
|
|
|
@ -27,7 +27,6 @@ namespace datalog {
|
|||
context& m_ctx;
|
||||
public:
|
||||
mk_backwards(context & ctx, unsigned priority = 33000);
|
||||
~mk_backwards() override;
|
||||
rule_set * operator()(rule_set const & source) override;
|
||||
};
|
||||
|
||||
|
|
|
@ -146,8 +146,6 @@ namespace datalog {
|
|||
m_dst(nullptr)
|
||||
{}
|
||||
|
||||
~expand_mkbv_cfg() {}
|
||||
|
||||
void set_src(rule_set const* src) { m_src = src; }
|
||||
void set_dst(rule_set* dst) { m_dst = dst; }
|
||||
func_decl_ref_vector const& old_funcs() const { return m_old_funcs; }
|
||||
|
|
|
@ -80,8 +80,6 @@ namespace datalog {
|
|||
rm(ctx.get_rule_manager()),
|
||||
m_ground(m) {}
|
||||
|
||||
mk_elim_term_ite::~mk_elim_term_ite() {}
|
||||
|
||||
/**
|
||||
\brief map free variables in e to ground, fresh, constants
|
||||
m_ground is reset on every new rule so it is safe to assume
|
||||
|
|
|
@ -35,7 +35,6 @@ namespace datalog {
|
|||
expr_ref ground(expr* e);
|
||||
public:
|
||||
mk_elim_term_ite(context &ctx, unsigned priority);
|
||||
~mk_elim_term_ite() override;
|
||||
rule_set * operator()(const rule_set &source) override;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -58,8 +58,6 @@ namespace datalog {
|
|||
m_inner_ctx.updt_params(params);
|
||||
}
|
||||
|
||||
mk_karr_invariants::~mk_karr_invariants() { }
|
||||
|
||||
void matrix::display_row(
|
||||
std::ostream& out, vector<rational> const& row, rational const& b, bool is_eq) {
|
||||
for (unsigned j = 0; j < row.size(); ++j) {
|
||||
|
|
|
@ -62,8 +62,6 @@ namespace datalog {
|
|||
rule_set* update_rules(rule_set const& src);
|
||||
public:
|
||||
mk_karr_invariants(context & ctx, unsigned priority);
|
||||
|
||||
~mk_karr_invariants() override;
|
||||
|
||||
rule_set * operator()(rule_set const & source) override;
|
||||
|
||||
|
|
|
@ -30,8 +30,6 @@ namespace datalog {
|
|||
m_refs(m) {
|
||||
}
|
||||
|
||||
mk_loop_counter::~mk_loop_counter() { }
|
||||
|
||||
app_ref mk_loop_counter::add_arg(rule_set const& src, rule_set& dst, app* fn, unsigned idx) {
|
||||
expr_ref_vector args(m);
|
||||
func_decl* new_fn, *old_fn = fn->get_decl();
|
||||
|
|
|
@ -35,7 +35,6 @@ namespace datalog {
|
|||
app_ref del_arg(app* fn);
|
||||
public:
|
||||
mk_loop_counter(context & ctx, unsigned priority = 33000);
|
||||
~mk_loop_counter() override;
|
||||
|
||||
rule_set * operator()(rule_set const & source) override;
|
||||
|
||||
|
|
|
@ -63,8 +63,6 @@ namespace datalog {
|
|||
m(ctx.get_manager()),
|
||||
m_ctx(ctx) {
|
||||
}
|
||||
|
||||
mk_magic_symbolic::~mk_magic_symbolic() { }
|
||||
|
||||
rule_set * mk_magic_symbolic::operator()(rule_set const & source) {
|
||||
if (!m_ctx.magic()) {
|
||||
|
|
|
@ -29,7 +29,6 @@ namespace datalog {
|
|||
app_ref mk_query(app* q);
|
||||
public:
|
||||
mk_magic_symbolic(context & ctx, unsigned priority = 33037);
|
||||
~mk_magic_symbolic() override;
|
||||
rule_set * operator()(rule_set const & source) override;
|
||||
};
|
||||
|
||||
|
|
|
@ -43,8 +43,6 @@ namespace mbp {
|
|||
imp(ast_manager& m) :
|
||||
m(m), a(m) {}
|
||||
|
||||
~imp() {}
|
||||
|
||||
void insert_mul(expr* x, rational const& v, obj_map<expr, rational>& ts) {
|
||||
rational w;
|
||||
if (ts.find(x, w))
|
||||
|
|
|
@ -1058,7 +1058,6 @@ namespace mbp {
|
|||
scoped_ptr<contains_app> m_var;
|
||||
|
||||
imp(ast_manager& m): m(m), a(m), m_stores(m) {}
|
||||
~imp() {}
|
||||
|
||||
bool solve(model& model, app_ref_vector& vars, expr_ref_vector& lits) {
|
||||
return false;
|
||||
|
|
|
@ -187,8 +187,6 @@ class term {
|
|||
m_is_peq = is_partial_eq(to_app(m_expr));
|
||||
}
|
||||
|
||||
~term() {}
|
||||
|
||||
class parents {
|
||||
term const &t;
|
||||
|
||||
|
|
|
@ -558,7 +558,6 @@ namespace qe {
|
|||
vector<div> m_divs;
|
||||
public:
|
||||
div_rewriter_cfg(nlqsat& s): m(s.m), a(s.m), m_zero(a.mk_real(0), m) {}
|
||||
~div_rewriter_cfg() {}
|
||||
br_status reduce_app(func_decl* f, unsigned sz, expr* const* args, expr_ref& result, proof_ref& pr) {
|
||||
rational r1, r(1);
|
||||
if (a.is_div(f) && sz == 2 && a.is_numeral(args[0], r1) && a.is_numeral(args[1], r) && !r.is_zero()) {
|
||||
|
|
|
@ -58,7 +58,6 @@ namespace sat {
|
|||
m_stack(std::move(stack)) {
|
||||
m_counter = ++counter;
|
||||
}
|
||||
~elim_stack() { }
|
||||
void inc_ref() { ++m_refcount; }
|
||||
void dec_ref() { if (0 == --m_refcount) { dealloc(this); } }
|
||||
elim_stackv const& stack() const { return m_stack; }
|
||||
|
|
|
@ -24,8 +24,6 @@ Notes:
|
|||
namespace sat {
|
||||
|
||||
mus::mus(solver& s):s(s), m_is_active(false), m_max_num_restarts(UINT_MAX) {}
|
||||
|
||||
mus::~mus() {}
|
||||
|
||||
void mus::reset() {
|
||||
m_core.reset();
|
||||
|
|
|
@ -30,7 +30,6 @@ namespace sat {
|
|||
|
||||
public:
|
||||
mus(solver& s);
|
||||
~mus();
|
||||
lbool operator()();
|
||||
bool is_active() const { return m_is_active; }
|
||||
model const& get_model() const { return m_model; }
|
||||
|
|
|
@ -153,7 +153,6 @@ namespace arith {
|
|||
|
||||
public:
|
||||
sls(solver& s);
|
||||
~sls() override {}
|
||||
void set(sat::ddfw* d);
|
||||
void init_search() override;
|
||||
void finish_search() override;
|
||||
|
|
|
@ -88,8 +88,6 @@ namespace array {
|
|||
m_constraint->initialize(m_constraint.get(), this);
|
||||
}
|
||||
|
||||
solver::~solver() {}
|
||||
|
||||
sat::check_result solver::check() {
|
||||
force_push();
|
||||
// flet<bool> _is_redundant(m_is_redundant, true);
|
||||
|
|
|
@ -268,7 +268,6 @@ namespace array {
|
|||
void validate_extensionality(euf::enode* s, euf::enode* t) const;
|
||||
public:
|
||||
solver(euf::solver& ctx, theory_id id);
|
||||
~solver() override;
|
||||
bool is_external(bool_var v) override { return false; }
|
||||
void get_antecedents(literal l, sat::ext_justification_idx idx, literal_vector& r, bool probing) override {}
|
||||
void asserted(literal l) override {}
|
||||
|
|
|
@ -103,8 +103,6 @@ namespace intblast {
|
|||
|
||||
public:
|
||||
solver(euf::solver& ctx);
|
||||
|
||||
~solver() override {}
|
||||
|
||||
lbool check_axiom(sat::literal_vector const& lits);
|
||||
lbool check_core(sat::literal_vector const& lits, euf::enode_pair_vector const& eqs);
|
||||
|
|
|
@ -67,8 +67,6 @@ namespace smt {
|
|||
m_ge(ge) {
|
||||
}
|
||||
|
||||
~arith_eq_relevancy_eh() override {}
|
||||
|
||||
void operator()(relevancy_propagator & rp) override {
|
||||
if (!rp.is_relevant(m_n1))
|
||||
return;
|
||||
|
|
|
@ -223,8 +223,6 @@ namespace smt {
|
|||
m_sort(s) {
|
||||
}
|
||||
|
||||
~node() {}
|
||||
|
||||
unsigned get_id() const { return m_id; }
|
||||
|
||||
sort* get_sort() const { return m_sort; }
|
||||
|
|
|
@ -48,7 +48,6 @@ namespace smt {
|
|||
expr * m_target;
|
||||
public:
|
||||
simple_relevancy_eh(expr * t):m_target(t) {}
|
||||
~simple_relevancy_eh() override {}
|
||||
void operator()(relevancy_propagator & rp) override;
|
||||
};
|
||||
|
||||
|
@ -61,7 +60,6 @@ namespace smt {
|
|||
expr * m_target;
|
||||
public:
|
||||
pair_relevancy_eh(expr * s1, expr * s2, expr * t):m_source1(s1), m_source2(s2), m_target(t) {}
|
||||
~pair_relevancy_eh() override {}
|
||||
void operator()(relevancy_propagator & rp) override;
|
||||
};
|
||||
|
||||
|
|
|
@ -134,7 +134,6 @@ namespace smt {
|
|||
unsigned_vector m_limit;
|
||||
public:
|
||||
exclusion_table(ast_manager& m): m(m), m_lhs(m), m_rhs(m) {}
|
||||
~exclusion_table() { }
|
||||
bool empty() const { return m_table.empty(); }
|
||||
void update(expr* e, expr* r);
|
||||
bool contains(expr* e, expr* r) const;
|
||||
|
|
|
@ -38,7 +38,6 @@ class simplifier_solver : public solver {
|
|||
model_reconstruction_trail m_reconstruction_trail;
|
||||
bool m_updated = false;
|
||||
dep_expr_state(simplifier_solver& s) :dependent_expr_state(s.m), s(s), m_reconstruction_trail(s.m, m_trail) {}
|
||||
~dep_expr_state() override {}
|
||||
unsigned qtail() const override { return s.m_fmls.size(); }
|
||||
dependent_expr const& operator[](unsigned i) override { return s.m_fmls[i]; }
|
||||
void update(unsigned i, dependent_expr const& j) override {
|
||||
|
|
|
@ -28,8 +28,6 @@ solver_na2as::solver_na2as(ast_manager & m):
|
|||
m_assumptions(m) {
|
||||
}
|
||||
|
||||
solver_na2as::~solver_na2as() {}
|
||||
|
||||
void solver_na2as::assert_expr_core2(expr * t, expr * a) {
|
||||
if (a == nullptr) {
|
||||
assert_expr_core(t);
|
||||
|
|
|
@ -30,7 +30,6 @@ class solver_na2as : public solver {
|
|||
void restore_assumptions(unsigned old_sz);
|
||||
public:
|
||||
solver_na2as(ast_manager & m);
|
||||
~solver_na2as() override;
|
||||
|
||||
void assert_expr_core2(expr * t, expr * a) override;
|
||||
|
||||
|
|
|
@ -79,8 +79,6 @@ class nla2bv_tactic : public tactic {
|
|||
m_default_bv_size = m_num_bits = p.get_uint("nla2bv_bv_size", 4);
|
||||
}
|
||||
|
||||
~imp() {}
|
||||
|
||||
void updt_params(params_ref const& p) {}
|
||||
|
||||
void operator()(goal & g, model_converter_ref & mc) {
|
||||
|
|
|
@ -41,8 +41,6 @@ struct bv_bound_chk_rewriter_cfg : public default_rewriter_cfg {
|
|||
bv_bound_chk_rewriter_cfg(ast_manager & m, bv_bound_chk_stats& stats)
|
||||
: m_m(m), m_b_rw(m), m_stats(stats) {}
|
||||
|
||||
~bv_bound_chk_rewriter_cfg() {}
|
||||
|
||||
void updt_params(params_ref const & _p) {
|
||||
rewriter_params p(_p);
|
||||
m_bv_ineq_consistency_test_max = p.bv_ineq_consistency_test_max();
|
||||
|
@ -146,8 +144,6 @@ public:
|
|||
imp(ast_manager & m, params_ref const & p, bv_bound_chk_stats& stats)
|
||||
: m_rw(m, p, stats) { }
|
||||
|
||||
virtual ~imp() = default;
|
||||
|
||||
ast_manager& m() { return m_rw.m(); }
|
||||
|
||||
void operator()(goal_ref const & g) {
|
||||
|
@ -164,7 +160,7 @@ public:
|
|||
m_rw.m_cfg.cleanup();
|
||||
}
|
||||
|
||||
virtual void updt_params(params_ref const & p) {
|
||||
void updt_params(params_ref const & p) {
|
||||
m_rw.updt_params(p);
|
||||
}
|
||||
|
||||
|
|
|
@ -48,8 +48,6 @@ namespace {
|
|||
r.insert("propagate-eq", CPK_BOOL, "propagate equalities from inequalities", "false");
|
||||
}
|
||||
|
||||
~bv_bounds_simplifier() override {}
|
||||
|
||||
bool assert_expr(expr * t, bool sign) override {
|
||||
return assert_expr_core(t, sign);
|
||||
}
|
||||
|
|
|
@ -144,9 +144,8 @@ struct ctx_simplify_tactic::imp {
|
|||
};
|
||||
|
||||
struct cache_cell {
|
||||
expr * m_from;
|
||||
cached_result * m_result;
|
||||
cache_cell():m_from(nullptr), m_result(nullptr) {}
|
||||
expr * m_from = nullptr;
|
||||
cached_result * m_result = nullptr;
|
||||
};
|
||||
|
||||
ast_manager & m;
|
||||
|
|
|
@ -117,8 +117,6 @@ public:
|
|||
m_replace = mk_default_expr_replacer(m, false);
|
||||
}
|
||||
|
||||
~imp() {}
|
||||
|
||||
void operator()(goal & g) {
|
||||
if (g.inconsistent())
|
||||
return;
|
||||
|
@ -202,10 +200,10 @@ private:
|
|||
// a |-> c1, b |-> c2 <c1,c2> |-> c
|
||||
//
|
||||
struct u_pair {
|
||||
unsigned m_first;
|
||||
unsigned m_second;
|
||||
unsigned m_first = 0;
|
||||
unsigned m_second = 0;
|
||||
u_pair(unsigned f, unsigned s) : m_first(f), m_second(s) {}
|
||||
u_pair(): m_first(0), m_second(0) {}
|
||||
u_pair() = default;
|
||||
|
||||
struct hash {
|
||||
unsigned operator()(u_pair const& p) const {
|
||||
|
@ -324,8 +322,6 @@ private:
|
|||
class parents {
|
||||
app_parents m_use_funs;
|
||||
public:
|
||||
parents() {}
|
||||
|
||||
app_parents const& get_parents() { return m_use_funs; }
|
||||
|
||||
void operator()(app* n) {
|
||||
|
|
|
@ -40,10 +40,9 @@ public:
|
|||
};
|
||||
|
||||
private:
|
||||
unsigned m_ref_count;
|
||||
unsigned m_ref_count = 0;
|
||||
|
||||
public:
|
||||
probe():m_ref_count(0) {}
|
||||
virtual ~probe() = default;
|
||||
|
||||
void inc_ref() { ++m_ref_count; }
|
||||
|
|
|
@ -146,8 +146,6 @@ tactic * mk_trace_tactic(char const * tag) {
|
|||
|
||||
class fail_if_undecided_tactic : public skip_tactic {
|
||||
public:
|
||||
fail_if_undecided_tactic() {}
|
||||
|
||||
void operator()(goal_ref const & in, goal_ref_buffer& result) override {
|
||||
if (!in->is_decided())
|
||||
throw tactic_exception("undecided");
|
||||
|
|
|
@ -32,10 +32,8 @@ class progress_callback;
|
|||
typedef ptr_buffer<goal> goal_buffer;
|
||||
|
||||
class tactic : public user_propagator::core {
|
||||
unsigned m_ref_count;
|
||||
unsigned m_ref_count = 0;
|
||||
public:
|
||||
tactic():m_ref_count(0) {}
|
||||
|
||||
void inc_ref() { m_ref_count++; }
|
||||
void dec_ref() { SASSERT(m_ref_count > 0); m_ref_count--; if (m_ref_count == 0) dealloc(this); }
|
||||
|
||||
|
|
|
@ -609,7 +609,7 @@ public:
|
|||
struct key_value {
|
||||
Key m_key;
|
||||
Value m_value;
|
||||
key_value() {}
|
||||
key_value() = default;
|
||||
key_value(Key const & k):m_key(k) {}
|
||||
key_value(Key const & k, Value const & v):m_key(k), m_value(v) {}
|
||||
};
|
||||
|
|
|
@ -30,7 +30,7 @@ class optional {
|
|||
}
|
||||
|
||||
public:
|
||||
optional() {}
|
||||
optional() = default;
|
||||
|
||||
explicit optional(const T & val) {
|
||||
m_obj = alloc(T, val);
|
||||
|
@ -116,13 +116,13 @@ public:
|
|||
*/
|
||||
template<typename T>
|
||||
class optional<T*> {
|
||||
T * m_ptr;
|
||||
T * m_ptr = nullptr;
|
||||
|
||||
static optional m_undef;
|
||||
|
||||
public:
|
||||
|
||||
optional():m_ptr(nullptr) {}
|
||||
optional() = default;
|
||||
|
||||
explicit optional(T * val):m_ptr(val) {}
|
||||
|
||||
|
|
|
@ -366,12 +366,11 @@ class params {
|
|||
};
|
||||
typedef std::pair<symbol, value> entry;
|
||||
svector<entry> m_entries;
|
||||
std::atomic<unsigned> m_ref_count;
|
||||
std::atomic<unsigned> m_ref_count = 0;
|
||||
void del_value(entry & e);
|
||||
void del_values();
|
||||
|
||||
public:
|
||||
params():m_ref_count(0) {}
|
||||
~params() {
|
||||
reset();
|
||||
}
|
||||
|
|
|
@ -23,13 +23,10 @@ Notes:
|
|||
template<class T>
|
||||
class queue {
|
||||
vector<T> m_elems;
|
||||
unsigned m_head;
|
||||
unsigned m_capacity;
|
||||
unsigned m_head = 0;
|
||||
unsigned m_capacity = 0;
|
||||
|
||||
public:
|
||||
|
||||
queue(): m_head(0), m_capacity(0) {}
|
||||
|
||||
void push(T const& t) { m_elems.push_back(t); }
|
||||
|
||||
bool empty() const {
|
||||
|
|
|
@ -41,8 +41,8 @@ public:
|
|||
ADD_INITIALIZER('rational::initialize();')
|
||||
ADD_FINALIZER('rational::finalize();')
|
||||
*/
|
||||
rational() {}
|
||||
|
||||
rational() = default;
|
||||
|
||||
rational(rational const & r) { m().set(m_val, r.m_val); }
|
||||
rational(rational&&) = default;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ Revision History:
|
|||
#include "util/rational.h"
|
||||
|
||||
class s_integer {
|
||||
int m_val;
|
||||
int m_val = 0;
|
||||
static s_integer m_zero;
|
||||
static s_integer m_one;
|
||||
static s_integer m_minus_one;
|
||||
|
@ -41,7 +41,7 @@ public:
|
|||
std::string to_string() const;
|
||||
|
||||
public:
|
||||
s_integer(): m_val(0) {}
|
||||
s_integer() = default;
|
||||
explicit s_integer(int n):m_val(n) {}
|
||||
struct i64 {};
|
||||
explicit s_integer(int64_t i, i64):m_val(static_cast<int>(i)) {}
|
||||
|
|
|
@ -29,9 +29,8 @@ class small_object_allocator {
|
|||
static const unsigned NUM_SLOTS = (SMALL_OBJ_SIZE >> PTR_ALIGNMENT);
|
||||
struct chunk {
|
||||
chunk* m_next{ nullptr };
|
||||
char* m_curr{ nullptr };
|
||||
char* m_curr = m_data;
|
||||
char m_data[CHUNK_SIZE];
|
||||
chunk():m_curr(m_data) {}
|
||||
};
|
||||
chunk * m_chunks[NUM_SLOTS];
|
||||
void * m_free_list[NUM_SLOTS];
|
||||
|
|
|
@ -1170,7 +1170,7 @@ public:
|
|||
template<typename T>
|
||||
class ptr_vector : public vector<T *, false> {
|
||||
public:
|
||||
ptr_vector():vector<T *, false>() {}
|
||||
ptr_vector() = default;
|
||||
ptr_vector(unsigned s):vector<T *, false>(s) {}
|
||||
ptr_vector(unsigned s, T * elem):vector<T *, false>(s, elem) {}
|
||||
ptr_vector(unsigned s, T * const * data):vector<T *, false>(s, const_cast<T**>(data)) {}
|
||||
|
@ -1190,7 +1190,7 @@ public:
|
|||
template<typename T, typename SZ = unsigned>
|
||||
class svector : public vector<T, false, SZ> {
|
||||
public:
|
||||
svector():vector<T, false, SZ>() {}
|
||||
svector() = default;
|
||||
svector(SZ s):vector<T, false, SZ>(s) {}
|
||||
svector(SZ s, T const & elem):vector<T, false, SZ>(s, elem) {}
|
||||
svector(SZ s, T const * data):vector<T, false, SZ>(s, data) {}
|
||||
|
|
Loading…
Reference in a new issue