3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-12 12:08:18 +00:00

remove a hundred implicit constructors/destructors

This commit is contained in:
Nuno Lopes 2021-05-23 14:25:01 +01:00
parent f8406623b4
commit f1e0d5dc8a
55 changed files with 30 additions and 140 deletions

View file

@ -28,9 +28,7 @@ namespace api {
// TODO: add support for caching expressions -> polynomial and back // TODO: add support for caching expressions -> polynomial and back
public: public:
pmanager(reslimit& lim) : m_pm(lim, m_nm) {} pmanager(reslimit& lim) : m_pm(lim, m_nm) {}
~pmanager() {}
polynomial::manager & pm() { return m_pm; } polynomial::manager & pm() { return m_pm; }
}; };
}; }

View file

@ -214,12 +214,10 @@ void display_parameters(std::ostream & out, unsigned n, parameter const * p);
between symbols (family names) and the unique IDs. between symbols (family names) and the unique IDs.
*/ */
class family_manager { class family_manager {
family_id m_next_id; family_id m_next_id = 0;
symbol_table<family_id> m_families; symbol_table<family_id> m_families;
svector<symbol> m_names; svector<symbol> m_names;
public: public:
family_manager():m_next_id(0) {}
/** /**
\brief Return the family_id for s, a new id is created if !has_family(s) \brief Return the family_id for s, a new id is created if !has_family(s)
@ -999,8 +997,8 @@ struct builtin_name {
*/ */
class decl_plugin { class decl_plugin {
protected: protected:
ast_manager * m_manager; ast_manager * m_manager = nullptr;
family_id m_family_id; family_id m_family_id = null_family_id;
virtual void set_manager(ast_manager * m, family_id id) { virtual void set_manager(ast_manager * m, family_id id) {
SASSERT(m_manager == nullptr); SASSERT(m_manager == nullptr);
@ -1024,8 +1022,6 @@ protected:
friend class ast_manager; friend class ast_manager;
public: public:
decl_plugin():m_manager(nullptr), m_family_id(null_family_id) {}
virtual ~decl_plugin() {} virtual ~decl_plugin() {}
virtual void finalize() {} virtual void finalize() {}
@ -1354,8 +1350,6 @@ class user_sort_plugin : public decl_plugin {
svector<symbol> m_sort_names; svector<symbol> m_sort_names;
dictionary<int> m_name2decl_kind; dictionary<int> m_name2decl_kind;
public: public:
user_sort_plugin() {}
sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) override; sort * mk_sort(decl_kind k, unsigned num_parameters, parameter const * parameters) override;
func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters, func_decl * mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
unsigned arity, sort * const * domain, sort * range) override; unsigned arity, sort * const * domain, sort * range) override;
@ -2450,7 +2444,6 @@ typedef obj_mark<expr> expr_mark;
class expr_sparse_mark { class expr_sparse_mark {
obj_hashtable<expr> m_marked; obj_hashtable<expr> m_marked;
public: public:
expr_sparse_mark() {}
bool is_marked(expr * n) const { return m_marked.contains(n); } bool is_marked(expr * n) const { return m_marked.contains(n); }
void mark(expr * n) { m_marked.insert(n); } void mark(expr * n) { m_marked.insert(n); }
void mark(expr * n, bool flag) { if (flag) m_marked.insert(n); else m_marked.erase(n); } void mark(expr * n, bool flag) { if (flag) m_marked.insert(n); else m_marked.erase(n); }
@ -2461,7 +2454,6 @@ template<unsigned IDX>
class ast_fast_mark { class ast_fast_mark {
ptr_buffer<ast> m_to_unmark; ptr_buffer<ast> m_to_unmark;
public: public:
ast_fast_mark() {}
~ast_fast_mark() { ~ast_fast_mark() {
reset(); reset();
} }
@ -2603,7 +2595,6 @@ class scoped_mark : public ast_mark {
unsigned_vector m_lim; unsigned_vector m_lim;
public: public:
scoped_mark(ast_manager& m): m_stack(m) {} scoped_mark(ast_manager& m): m_stack(m) {}
~scoped_mark() override {}
void mark(ast * n, bool flag) override; void mark(ast * n, bool flag) override;
void reset() override; void reset() override;
void mark(ast * n); void mark(ast * n);
@ -2644,7 +2635,3 @@ struct parameter_pp {
inline std::ostream& operator<<(std::ostream& out, parameter_pp const& pp) { inline std::ostream& operator<<(std::ostream& out, parameter_pp const& pp) {
return pp.m.display(out, pp.p); return pp.m.display(out, pp.p);
} }

View file

@ -105,7 +105,6 @@ namespace datatype {
class size { class size {
unsigned m_ref{ 0 }; unsigned m_ref{ 0 };
public: public:
size() {}
virtual ~size() { } virtual ~size() { }
void inc_ref() { ++m_ref; } void inc_ref() { ++m_ref; }
void dec_ref(); void dec_ref();
@ -124,7 +123,6 @@ namespace datatype {
struct offset : public size { struct offset : public size {
sort_size m_offset; sort_size m_offset;
offset(sort_size const& s): m_offset(s) {} offset(sort_size const& s): m_offset(s) {}
~offset() override {}
size* subst(obj_map<sort,size*>& S) override { return this; } size* subst(obj_map<sort,size*>& S) override { return this; }
sort_size eval(obj_map<sort, sort_size> const& S) override { return m_offset; } sort_size eval(obj_map<sort, sort_size> const& S) override { return m_offset; }
}; };
@ -152,7 +150,6 @@ namespace datatype {
struct sparam : public size { struct sparam : public size {
sort_ref m_param; sort_ref m_param;
sparam(sort_ref& p): m_param(p) {} sparam(sort_ref& p): m_param(p) {}
~sparam() override {}
size* subst(obj_map<sort, size*>& S) override; size* subst(obj_map<sort, size*>& S) override;
sort_size eval(obj_map<sort, sort_size> const& S) override { return S[m_param]; } sort_size eval(obj_map<sort, sort_size> const& S) override { return S[m_param]; }
}; };

View file

@ -35,8 +35,6 @@ protected:
public: public:
typedef map_impl::iterator iterator; typedef map_impl::iterator iterator;
counter() {}
void reset() { m_data.reset(); } void reset() { m_data.reset(); }
iterator begin() const { return m_data.begin(); } iterator begin() const { return m_data.begin(); }
iterator end() const { return m_data.end(); } iterator end() const { return m_data.end(); }
@ -74,7 +72,6 @@ protected:
unsigned_vector m_scopes; unsigned_vector m_scopes;
unsigned get_max_var(bool & has_var); unsigned get_max_var(bool & has_var);
public: public:
var_counter() {}
void count_vars(const app * t, int coef = 1); void count_vars(const app * t, int coef = 1);
unsigned get_max_var(expr* e); unsigned get_max_var(expr* e);
unsigned get_next_var(expr* e); unsigned get_next_var(expr* e);
@ -86,8 +83,6 @@ class ast_counter {
public: public:
typedef map_impl::iterator iterator; typedef map_impl::iterator iterator;
ast_counter() {}
iterator begin() const { return m_data.begin(); } iterator begin() const { return m_data.begin(); }
iterator end() const { return m_data.end(); } iterator end() const { return m_data.end(); }

View file

@ -26,7 +26,6 @@ class recfun_rewriter {
recfun::util m_rec; recfun::util m_rec;
public: public:
recfun_rewriter(ast_manager& m): m(m), m_rec(m) {} recfun_rewriter(ast_manager& m): m(m), m_rec(m) {}
~recfun_rewriter() {}
br_status mk_app_core(func_decl * f, unsigned num_args, expr * const * args, expr_ref & result); br_status mk_app_core(func_decl * f, unsigned num_args, expr * const * args, expr_ref & result);

View file

@ -160,7 +160,6 @@ class seq_decl_plugin : public decl_plugin {
public: public:
seq_decl_plugin(); seq_decl_plugin();
~seq_decl_plugin() override {}
void finalize() override; void finalize() override;
bool unicode() const { return get_char_plugin().unicode(); } bool unicode() const { return get_char_plugin().unicode(); }
@ -575,8 +574,6 @@ public:
re(*this) { re(*this) {
} }
~seq_util() {}
family_id get_family_id() const { return m_fid; } family_id get_family_id() const { return m_fid; }
}; };

View file

@ -24,8 +24,6 @@ Revision History:
class shared_occs_mark { class shared_occs_mark {
ptr_buffer<ast> m_to_unmark; ptr_buffer<ast> m_to_unmark;
public: public:
shared_occs_mark() {}
~shared_occs_mark() { ~shared_occs_mark() {
reset(); reset();
} }

View file

@ -36,8 +36,6 @@ class matcher {
void reset(); void reset();
public: public:
matcher() {}
/** /**
\brief Return true if e2 is an instance of e1. \brief Return true if e2 is an instance of e1.
In case of success (result is true), it will store the substitution that makes e1 equals to e2 into s. In case of success (result is true), it will store the substitution that makes e1 equals to e2 into s.

View file

@ -94,9 +94,8 @@ public:
\brief Generic wrapper. \brief Generic wrapper.
*/ */
class object_ref { class object_ref {
unsigned m_ref_count; unsigned m_ref_count = 0;
public: public:
object_ref():m_ref_count(0) {}
virtual ~object_ref() {} virtual ~object_ref() {}
virtual void finalize(cmd_context & ctx) = 0; virtual void finalize(cmd_context & ctx) = 0;
void inc_ref(cmd_context & ctx) { void inc_ref(cmd_context & ctx) {

View file

@ -26,9 +26,6 @@ class pdd_eval {
std::function<rational (unsigned)> m_var2val; std::function<rational (unsigned)> m_var2val;
public: public:
pdd_eval() {}
std::function<rational (unsigned)>& var2val() { return m_var2val; } // setter std::function<rational (unsigned)>& var2val() { return m_var2val; } // setter
const std::function<rational (unsigned)>& var2val() const { return m_var2val; } // getter const std::function<rational (unsigned)>& var2val() const { return m_var2val; } // getter

View file

@ -27,7 +27,6 @@ class simplifier {
public: public:
simplifier(solver& s): s(s) {} simplifier(solver& s): s(s) {}
~simplifier() {}
void operator()(); void operator()();

View file

@ -32,7 +32,6 @@ namespace lp {
lia_move cut(lar_term & t, mpq & k, explanation* ex, unsigned basic_inf_int_j, const row_strip<mpq>& row); lia_move cut(lar_term & t, mpq & k, explanation* ex, unsigned basic_inf_int_j, const row_strip<mpq>& row);
public: public:
gomory(int_solver& lia); gomory(int_solver& lia);
~gomory() {}
lia_move operator()(); lia_move operator()();
}; };
} }

View file

@ -32,7 +32,6 @@ namespace lp {
public: public:
int_branch(int_solver& lia); int_branch(int_solver& lia);
~int_branch() {}
lia_move operator()(); lia_move operator()();
}; };
} }

View file

@ -35,7 +35,6 @@ namespace lp {
impq get_cube_delta_for_term(const lar_term& t) const; impq get_cube_delta_for_term(const lar_term& t) const;
public: public:
int_cube(int_solver& lia); int_cube(int_solver& lia);
~int_cube() {}
lia_move operator()(); lia_move operator()();
}; };
} }

View file

@ -47,7 +47,6 @@ namespace lp {
void add_to_explanation_from_fixed_or_boxed_column(unsigned j); void add_to_explanation_from_fixed_or_boxed_column(unsigned j);
public: public:
int_gcd_test(int_solver& lia); int_gcd_test(int_solver& lia);
~int_gcd_test() {}
lia_move operator()(); lia_move operator()();
bool should_apply(); bool should_apply();
}; };

View file

@ -54,7 +54,6 @@ public:
virtual unsigned size() const { return 1; } virtual unsigned size() const { return 1; }
virtual expr_type type() const = 0; virtual expr_type type() const = 0;
virtual std::ostream& print(std::ostream&) const = 0; virtual std::ostream& print(std::ostream&) const = 0;
nex() {}
bool is_elementary() const { bool is_elementary() const {
switch(type()) { switch(type()) {
case expr_type::SUM: case expr_type::SUM:

View file

@ -92,8 +92,6 @@ public:
bool operator!=(row_iterator const& other) const { return m_index != other.m_index; } bool operator!=(row_iterator const& other) const { return m_index != other.m_index; }
}; };
bit_matrix() {}
~bit_matrix() {}
void reset(unsigned num_columns); void reset(unsigned num_columns);
row_iterator begin() { return row_iterator(*this, true); } row_iterator begin() { return row_iterator(*this, true); }

View file

@ -31,7 +31,7 @@ class exception {
class power : public std::pair<var, unsigned> { class power : public std::pair<var, unsigned> {
public: public:
power():std::pair<var, unsigned>() {} power() = default;
power(var v, unsigned d):std::pair<var, unsigned>(v, d) {} power(var v, unsigned d):std::pair<var, unsigned>(v, d) {}
var x() const { return first; } var x() const { return first; }
var get_var() const { return first; } var get_var() const { return first; }

View file

@ -313,7 +313,6 @@ namespace datalog {
static unsigned get_obj_size(unsigned n) { return sizeof(rule) + n * sizeof(app *); } static unsigned get_obj_size(unsigned n) { return sizeof(rule) + n * sizeof(app *); }
rule() : m_ref_cnt(0), m_name(symbol::null) {} rule() : m_ref_cnt(0), m_name(symbol::null) {}
~rule() {}
void deallocate(ast_manager & m); void deallocate(ast_manager & m);

View file

@ -178,7 +178,7 @@ namespace datalog {
class base_fn { class base_fn {
public: public:
base_fn() {} base_fn() = default;
virtual ~base_fn() {} virtual ~base_fn() {}
private: private:
//private and undefined copy constructor and operator= to avoid copying //private and undefined copy constructor and operator= to avoid copying
@ -219,8 +219,6 @@ namespace datalog {
*/ */
class mutator_fn : public base_fn { class mutator_fn : public base_fn {
public: public:
~mutator_fn() override {}
virtual void operator()(base_object & t) = 0; virtual void operator()(base_object & t) = 0;
virtual bool supports_attachment(base_object& other) { return false; } virtual bool supports_attachment(base_object& other) { return false; }

View file

@ -94,7 +94,6 @@ namespace datalog {
struct uint_set2 { struct uint_set2 {
uint_set lt; uint_set lt;
uint_set le; uint_set le;
uint_set2() {}
bool operator==(const uint_set2& other) const { bool operator==(const uint_set2& other) const {
return other.lt == lt && other.le == le; return other.lt == lt && other.le == le;
} }

View file

@ -235,7 +235,6 @@ class pred_transformer {
public: public:
frames (pred_transformer &pt) : m_pt (pt), frames (pred_transformer &pt) : m_pt (pt),
m_size(0), m_sorted (true) {} m_size(0), m_sorted (true) {}
~frames() {}
void simplify_formulas (); void simplify_formulas ();
pred_transformer& pt() const {return m_pt;} pred_transformer& pt() const {return m_pt;}
@ -356,7 +355,6 @@ class pred_transformer {
rule2ptrule m_rules; rule2ptrule m_rules;
tag2ptrule m_tags; tag2ptrule m_tags;
public: public:
pt_rules() {}
~pt_rules() {for (auto &kv : m_rules) {dealloc(kv.m_value);}} ~pt_rules() {for (auto &kv : m_rules) {dealloc(kv.m_value);}}
bool find_by_rule(const datalog::rule &r, pt_rule* &ptr) { bool find_by_rule(const datalog::rule &r, pt_rule* &ptr) {
@ -439,7 +437,6 @@ class pred_transformer {
public: public:
pred_transformer(context& ctx, manager& pm, func_decl* head); pred_transformer(context& ctx, manager& pm, func_decl* head);
~pred_transformer() {}
inline bool use_native_mbp (); inline bool use_native_mbp ();
bool mk_mdl_rf_consistent(const datalog::rule *r, model &mdl); bool mk_mdl_rf_consistent(const datalog::rule *r, model &mdl);
@ -825,7 +822,6 @@ class pob_queue {
public: public:
pob_queue(): m_root(nullptr), m_max_level(0), m_min_depth(0) {} pob_queue(): m_root(nullptr), m_max_level(0), m_min_depth(0) {}
~pob_queue() {}
void reset(); void reset();
pob* top(); pob* top();

View file

@ -75,9 +75,7 @@ namespace smt2 {
EOF_TOKEN EOF_TOKEN
}; };
scanner(cmd_context & ctx, std::istream& stream, bool interactive = false); scanner(cmd_context & ctx, std::istream& stream, bool interactive = false);
~scanner() {}
int get_line() const { return m_line; } int get_line() const { return m_line; }
int get_pos() const { return m_pos; } int get_pos() const { return m_pos; }

View file

@ -39,8 +39,6 @@ public:
scanner(std::istream& stream, std::ostream& err, bool smt2, bool bv_token=false); scanner(std::istream& stream, std::ostream& err, bool smt2, bool bv_token=false);
~scanner() {}
int get_line() const { return m_line; } int get_line() const { return m_line; }
int get_pos() const { return m_pos; } int get_pos() const { return m_pos; }
@ -86,5 +84,3 @@ private:
token read_bv_literal(); token read_bv_literal();
bool state_ok(); bool state_ok();
}; };

View file

@ -63,7 +63,6 @@ namespace dimacs {
unsigned m_node_id{ 0 }; unsigned m_node_id{ 0 };
std::string m_name; std::string m_name;
unsigned_vector m_args; unsigned_vector m_args;
drat_record() {}
}; };
struct drat_pp { struct drat_pp {
@ -111,6 +110,3 @@ namespace dimacs {
}; };
}; };

View file

@ -52,7 +52,6 @@ namespace sat {
public: public:
aig_finder(solver& s); aig_finder(solver& s);
~aig_finder() {}
void set(std::function<void (literal head, literal_vector const& ands)> const& f) { m_on_aig = f; } void set(std::function<void (literal head, literal_vector const& ands)> const& f) { m_on_aig = f; }
void set(std::function<void (literal head, literal cond, literal th, literal el)> const& f) { m_on_if = f; } void set(std::function<void (literal head, literal cond, literal th, literal el)> const& f) { m_on_if = f; }
void operator()(clause_vector& clauses); void operator()(clause_vector& clauses);

View file

@ -111,7 +111,6 @@ namespace sat {
public: public:
anf_simplifier(solver& s) : s(s), m_eval_ts(0) {} anf_simplifier(solver& s) : s(s), m_eval_ts(0) {}
~anf_simplifier() {}
void operator()(); void operator()();
void set(config const& cfg) { m_config = cfg; } void set(config const& cfg) { m_config = cfg; }

View file

@ -97,8 +97,6 @@ namespace sat {
memset(m_false, 0, sizeof(unsigned) * max_lits); memset(m_false, 0, sizeof(unsigned) * max_lits);
} }
~binspr() {}
void operator()(); void operator()();
void updt_params(params_ref const& p) {} void updt_params(params_ref const& p) {}

View file

@ -69,7 +69,6 @@ namespace sat {
lut_finder(solver& s) : s(s), m_max_lut_size(5) { lut_finder(solver& s) : s(s), m_max_lut_size(5) {
memset(m_masks, 0, sizeof(uint64_t)*7); memset(m_masks, 0, sizeof(uint64_t)*7);
} }
~lut_finder() {}
void set(std::function<void (uint64_t, bool_var_vector const&, bool_var)>& f) { m_on_lut = f; } void set(std::function<void (uint64_t, bool_var_vector const&, bool_var)>& f) { m_on_lut = f; }

View file

@ -115,7 +115,6 @@ namespace sat {
public: public:
npn3_finder(solver& s); npn3_finder(solver& s);
~npn3_finder() {}
void set_on_mux(std::function<void(literal head, literal cond, literal th, literal el)> const& f) { m_on_mux = f; } void set_on_mux(std::function<void(literal head, literal cond, literal th, literal el)> const& f) { m_on_mux = f; }
void set_on_maj(std::function<void(literal head, literal a, literal b, literal c)> const& f) { m_on_maj = f; } void set_on_maj(std::function<void(literal head, literal a, literal b, literal c)> const& f) { m_on_maj = f; }
void set_on_orand(std::function<void(literal head, literal a, literal b, literal c)> const& f) { m_on_orand = f; } void set_on_orand(std::function<void(literal head, literal a, literal b, literal c)> const& f) { m_on_orand = f; }

View file

@ -41,7 +41,6 @@ namespace sat {
unsigned get_length(unsigned index) const { return m_vectors[index+1]; } unsigned get_length(unsigned index) const { return m_vectors[index+1]; }
unsigned const* get_ptr(unsigned index) const { return m_vectors.data() + index + 2; } unsigned const* get_ptr(unsigned index) const { return m_vectors.data() + index + 2; }
public: public:
vector_pool() {}
void reserve(unsigned num_owners, unsigned sz); void reserve(unsigned num_owners, unsigned sz);
void begin_add_vector(unsigned owner, unsigned n); void begin_add_vector(unsigned owner, unsigned n);
void end_add_vector(); void end_add_vector();

View file

@ -31,9 +31,8 @@ namespace sat {
class prob : public i_local_search { class prob : public i_local_search {
struct clause_info { struct clause_info {
clause_info(): m_trues(0), m_num_trues(0) {} unsigned m_trues = 0; // set of literals that are true
unsigned m_trues; // set of literals that are true unsigned m_num_trues = 0; // size of true set
unsigned m_num_trues; // size of true set
bool is_true() const { return m_num_trues > 0; } bool is_true() const { return m_num_trues > 0; }
void add(literal lit) { ++m_num_trues; m_trues += lit.index(); } void add(literal lit) { ++m_num_trues; m_trues += lit.index(); }
void del(literal lit) { SASSERT(m_num_trues > 0); --m_num_trues; m_trues -= lit.index(); } void del(literal lit) { SASSERT(m_num_trues > 0); --m_num_trues; m_trues -= lit.index(); }
@ -129,8 +128,6 @@ namespace sat {
void add(unsigned sz, literal const* c); void add(unsigned sz, literal const* c);
public: public:
prob() {}
~prob() override; ~prob() override;
lbool check(unsigned sz, literal const* assumptions, parallel* p) override; lbool check(unsigned sz, literal const* assumptions, parallel* p) override;

View file

@ -62,7 +62,6 @@ namespace sat {
public: public:
xor_finder(solver& s) : s(s), m_max_xor_size(5) { init_parity(); } xor_finder(solver& s) : s(s), m_max_xor_size(5) { init_parity(); }
~xor_finder() {}
void set(std::function<void (literal_vector const& lits)>& f) { m_on_xor = f; } void set(std::function<void (literal_vector const& lits)>& f) { m_on_xor = f; }

View file

@ -54,7 +54,6 @@ namespace array {
euf::enode_vector m_lambdas; // equivalent nodes that have beta reduction properties euf::enode_vector m_lambdas; // equivalent nodes that have beta reduction properties
euf::enode_vector m_parent_lambdas; // parents that have beta reduction properties euf::enode_vector m_parent_lambdas; // parents that have beta reduction properties
euf::enode_vector m_parent_selects; // parents that use array in select position euf::enode_vector m_parent_selects; // parents that use array in select position
var_data() {}
}; };

View file

@ -106,7 +106,6 @@ namespace smt {
class quantifier_manager_plugin { class quantifier_manager_plugin {
public: public:
quantifier_manager_plugin() {}
virtual ~quantifier_manager_plugin() {} virtual ~quantifier_manager_plugin() {}
virtual void set_manager(quantifier_manager & qm) = 0; virtual void set_manager(quantifier_manager & qm) = 0;

View file

@ -29,7 +29,6 @@ namespace smt {
void mark_as_relevant(relevancy_propagator & rp, expr * n); void mark_as_relevant(relevancy_propagator & rp, expr * n);
void mark_args_as_relevant(relevancy_propagator & rp, app * n); void mark_args_as_relevant(relevancy_propagator & rp, app * n);
public: public:
relevancy_eh() {}
virtual ~relevancy_eh() {} virtual ~relevancy_eh() {}
/** /**
\brief This method is invoked when n is marked as relevant. \brief This method is invoked when n is marked as relevant.
@ -49,7 +48,6 @@ namespace smt {
expr * m_target; expr * m_target;
public: public:
simple_relevancy_eh(expr * t):m_target(t) {} simple_relevancy_eh(expr * t):m_target(t) {}
~simple_relevancy_eh() override {}
void operator()(relevancy_propagator & rp) override; void operator()(relevancy_propagator & rp) override;
}; };
@ -62,7 +60,6 @@ namespace smt {
expr * m_target; expr * m_target;
public: public:
pair_relevancy_eh(expr * s1, expr * s2, expr * t):m_source1(s1), m_source2(s2), m_target(t) {} 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; void operator()(relevancy_propagator & rp) override;
}; };

View file

@ -29,7 +29,6 @@ namespace smt {
ptr_vector<enode> m_consts; ptr_vector<enode> m_consts;
ptr_vector<enode> m_as_arrays; ptr_vector<enode> m_as_arrays;
ptr_vector<enode> m_parent_maps; ptr_vector<enode> m_parent_maps;
var_data_full() {}
}; };
ptr_vector<var_data_full> m_var_data_full; ptr_vector<var_data_full> m_var_data_full;

View file

@ -77,7 +77,6 @@ namespace smt {
m_pos(pos), m_pos(pos),
m_neg(neg) { m_neg(neg) {
} }
~atom() {}
bool_var get_bool_var() const { return m_bvar; } bool_var get_bool_var() const { return m_bvar; }
bool is_true() const { return m_true; } bool is_true() const { return m_true; }
void assign_eh(bool is_true) { m_true = is_true; } void assign_eh(bool is_true) { m_true = is_true; }
@ -383,24 +382,21 @@ namespace smt {
static const bool m_int_theory = true; static const bool m_int_theory = true;
typedef rational numeral; typedef rational numeral;
typedef rational fin_numeral; typedef rational fin_numeral;
numeral m_epsilon; numeral m_epsilon { 1 };
idl_ext() : m_epsilon(1) {}
}; };
struct sidl_ext { struct sidl_ext {
static const bool m_int_theory = true; static const bool m_int_theory = true;
typedef s_integer numeral; typedef s_integer numeral;
typedef s_integer fin_numeral; typedef s_integer fin_numeral;
numeral m_epsilon; numeral m_epsilon { 1 };
sidl_ext() : m_epsilon(1) {}
}; };
struct rdl_ext { struct rdl_ext {
static const bool m_int_theory = false; static const bool m_int_theory = false;
typedef inf_int_rational numeral; typedef inf_int_rational numeral;
typedef rational fin_numeral; typedef rational fin_numeral;
numeral m_epsilon; numeral m_epsilon { rational(), true };
rdl_ext() : m_epsilon(rational(), true) {}
}; };
// //

View file

@ -77,7 +77,6 @@ namespace smt {
atom(bool_var bv, int pos, int neg) : atom(bool_var bv, int pos, int neg) :
m_bvar(bv), m_true(false), m_bvar(bv), m_true(false),
m_pos(pos), m_neg(neg) {} m_pos(pos), m_neg(neg) {}
~atom() {}
bool_var get_bool_var() const { return m_bvar; } bool_var get_bool_var() const { return m_bvar; }
void assign_eh(bool is_true) { m_true = is_true; } void assign_eh(bool is_true) { m_true = is_true; }
int get_asserted_edge() const { return this->m_true?m_pos:m_neg; } int get_asserted_edge() const { return this->m_true?m_pos:m_neg; }

View file

@ -20,7 +20,6 @@ Revision History:
class smt_logics { class smt_logics {
public: public:
smt_logics() {}
static bool supported_logic(symbol const & s); static bool supported_logic(symbol const & s);
static bool logic_has_reals_only(symbol const& l); static bool logic_has_reals_only(symbol const& l);
static bool logic_is_all(symbol const& s) { return s == "ALL"; } static bool logic_is_all(symbol const& s) { return s == "ALL"; }
@ -36,5 +35,3 @@ public:
static bool logic_has_fd(symbol const& s) { return s == "QF_FD"; } static bool logic_has_fd(symbol const& s) { return s == "QF_FD"; }
static bool logic_has_datatype(symbol const& s); static bool logic_has_datatype(symbol const& s);
}; };

View file

@ -68,7 +68,6 @@ private:
public: public:
linear_equation_manager(numeral_manager & _m, small_object_allocator & a):m_allocator(a), m(_m), m_int_buffer(m), m_val_buffer(m) {} linear_equation_manager(numeral_manager & _m, small_object_allocator & a):m_allocator(a), m(_m), m_int_buffer(m), m_val_buffer(m) {}
~linear_equation_manager() {}
linear_equation * mk(unsigned sz, mpq * as, var * xs, bool normalized = false); linear_equation * mk(unsigned sz, mpq * as, var * xs, bool normalized = false);
linear_equation * mk(unsigned sz, mpz * as, var * xs, bool normalized = false); linear_equation * mk(unsigned sz, mpz * as, var * xs, bool normalized = false);

View file

@ -64,8 +64,6 @@ public:
class dom_simplifier { class dom_simplifier {
public: public:
dom_simplifier() {}
virtual ~dom_simplifier() {} virtual ~dom_simplifier() {}
/** /**
\brief assert_expr performs an implicit push \brief assert_expr performs an implicit push

View file

@ -164,7 +164,7 @@ typedef approx_set_tpl<unsigned, u2u> u_approx_set;
class approx_set : public u_approx_set { class approx_set : public u_approx_set {
public: public:
approx_set():u_approx_set() {} approx_set() = default;
approx_set(unsigned e):u_approx_set(e) {} approx_set(unsigned e):u_approx_set(e) {}
class iterator { class iterator {

View file

@ -33,7 +33,6 @@ public:
bound m_lower; bound m_lower;
bound m_upper; bound m_upper;
public: public:
interval() {}
bound const & lower() const { return m_lower; } bound const & lower() const { return m_lower; }
bound const & upper() const { return m_upper; } bound const & upper() const { return m_upper; }
bound & lower() { return m_lower; } bound & lower() { return m_lower; }

View file

@ -87,11 +87,13 @@ public:
push_back(std::move(source.m_buffer[i])); push_back(std::move(source.m_buffer[i]));
} }
} else { } else {
m_pos = source.m_pos; m_buffer = source.m_buffer;
m_capacity = source.m_capacity; m_pos = source.m_pos;
m_buffer = source.m_buffer; m_capacity = source.m_capacity;
source.m_buffer = reinterpret_cast<T*>(source.m_initial_buffer); m_buffer = source.m_buffer;
source.m_pos = 0; source.m_buffer = reinterpret_cast<T*>(source.m_initial_buffer);
source.m_pos = 0;
source.m_capacity = INITIAL_SIZE;
} }
} }

View file

@ -20,8 +20,4 @@ Notes:
#include "util/symbol.h" #include "util/symbol.h"
template<typename T> template<typename T>
class dictionary : public map<symbol, T, symbol_hash_proc, symbol_eq_proc> { using dictionary = map<symbol, T, symbol_hash_proc, symbol_eq_proc>;
public:
dictionary() {}
};

View file

@ -44,11 +44,10 @@ typedef enum { HT_FREE,
template<typename T> template<typename T>
class default_hash_entry { class default_hash_entry {
unsigned m_hash{ 0 }; //!< cached hash code unsigned m_hash{ 0 }; //!< cached hash code
hash_entry_state m_state; hash_entry_state m_state = HT_FREE;
T m_data; T m_data;
public: public:
typedef T data; typedef T data;
default_hash_entry():m_state(HT_FREE), m_data() {}
unsigned get_hash() const { return m_hash; } unsigned get_hash() const { return m_hash; }
bool is_free() const { return m_state == HT_FREE; } bool is_free() const { return m_state == HT_FREE; }
bool is_deleted() const { return m_state == HT_DELETED; } bool is_deleted() const { return m_state == HT_DELETED; }
@ -67,10 +66,9 @@ public:
template<int Free, int Deleted> template<int Free, int Deleted>
class int_hash_entry { class int_hash_entry {
unsigned m_hash; //!< cached hash code unsigned m_hash; //!< cached hash code
int m_data; int m_data = Free;
public: public:
typedef int data; typedef int data;
int_hash_entry():m_data(Free) {}
unsigned get_hash() const { return m_hash; } unsigned get_hash() const { return m_hash; }
bool is_free() const { return m_data == Free; } bool is_free() const { return m_data == Free; }
bool is_deleted() const { return m_data == Deleted; } bool is_deleted() const { return m_data == Deleted; }
@ -89,10 +87,9 @@ public:
template<typename T> template<typename T>
class ptr_hash_entry { class ptr_hash_entry {
unsigned m_hash; //!< cached hash code unsigned m_hash; //!< cached hash code
T * m_ptr; T * m_ptr = nullptr;
public: public:
typedef T * data; typedef T * data;
ptr_hash_entry():m_ptr(nullptr) {}
unsigned get_hash() const { return m_hash; } unsigned get_hash() const { return m_hash; }
bool is_free() const { return m_ptr == nullptr; } bool is_free() const { return m_ptr == nullptr; }
bool is_deleted() const { return m_ptr == reinterpret_cast<T *>(1); } bool is_deleted() const { return m_ptr == reinterpret_cast<T *>(1); }
@ -112,10 +109,9 @@ public:
*/ */
template<typename T> template<typename T>
class ptr_addr_hash_entry : public ptr_hash_entry<T> { class ptr_addr_hash_entry : public ptr_hash_entry<T> {
T * m_ptr; T * m_ptr = nullptr;
public: public:
typedef T * data; typedef T * data;
ptr_addr_hash_entry():m_ptr(nullptr) {}
unsigned get_hash() const { return get_ptr_hash(m_ptr); } unsigned get_hash() const { return get_ptr_hash(m_ptr); }
bool is_free() const { return m_ptr == nullptr; } bool is_free() const { return m_ptr == nullptr; }
bool is_deleted() const { return m_ptr == reinterpret_cast<T *>(1); } bool is_deleted() const { return m_ptr == reinterpret_cast<T *>(1); }

View file

@ -22,8 +22,6 @@ template<typename T>
class lim_svector : public svector<T, unsigned> { class lim_svector : public svector<T, unsigned> {
unsigned_vector m_lim; unsigned_vector m_lim;
public: public:
lim_svector() {}
void push_scope() { void push_scope() {
m_lim.push_back(this->size()); m_lim.push_back(this->size());
} }

View file

@ -86,8 +86,6 @@ class max_cliques : public T {
unsigned_vector const& next(unsigned vertex) const { return m_next[vertex]; } unsigned_vector const& next(unsigned vertex) const { return m_next[vertex]; }
public: public:
max_cliques() {}
void add_edge(unsigned src, unsigned dst) { void add_edge(unsigned src, unsigned dst) {
m_next.reserve(std::max(src, dst) + 1); m_next.reserve(std::max(src, dst) + 1);
m_next.reserve(std::max(negate(src), negate(dst)) + 1); m_next.reserve(std::max(negate(src), negate(dst)) + 1);

View file

@ -29,10 +29,9 @@ Revision History:
*/ */
template<typename T> template<typename T>
class obj_hash_entry { class obj_hash_entry {
T * m_ptr; T * m_ptr = nullptr;
public: public:
typedef T * data; typedef T * data;
obj_hash_entry():m_ptr(nullptr) {}
unsigned get_hash() const { return m_ptr->hash(); } unsigned get_hash() const { return m_ptr->hash(); }
bool is_free() const { return m_ptr == nullptr; } bool is_free() const { return m_ptr == nullptr; }
bool is_deleted() const { return m_ptr == reinterpret_cast<T *>(1); } bool is_deleted() const { return m_ptr == reinterpret_cast<T *>(1); }
@ -82,7 +81,6 @@ public:
key_data m_data; key_data m_data;
public: public:
typedef key_data data; typedef key_data data;
obj_map_entry() {}
unsigned get_hash() const { return m_data.hash(); } unsigned get_hash() const { return m_data.hash(); }
bool is_free() const { return m_data.m_key == nullptr; } bool is_free() const { return m_data.m_key == nullptr; }
bool is_deleted() const { return m_data.m_key == reinterpret_cast<Key *>(1); } bool is_deleted() const { return m_data.m_key == reinterpret_cast<Key *>(1); }

View file

@ -29,11 +29,10 @@ Revision History:
template<typename T1, typename T2> template<typename T1, typename T2>
class obj_pair_hash_entry { class obj_pair_hash_entry {
unsigned m_hash; // cached hash code unsigned m_hash; // cached hash code
std::pair<T1*, T2*> m_data; std::pair<T1*, T2*> m_data { nullptr, nullptr };
public: public:
typedef std::pair<T1*, T2*> data; typedef std::pair<T1*, T2*> data;
obj_pair_hash_entry():m_data(static_cast<T1*>(nullptr),static_cast<T2*>(nullptr)) {}
unsigned get_hash() const { return m_hash; } unsigned get_hash() const { return m_hash; }
bool is_free() const { return m_data.first == 0; } bool is_free() const { return m_data.first == 0; }
bool is_deleted() const { return m_data.first == reinterpret_cast<T1 *>(1); } bool is_deleted() const { return m_data.first == reinterpret_cast<T1 *>(1); }
@ -94,7 +93,6 @@ protected:
key_data m_data; key_data m_data;
public: public:
typedef key_data data; typedef key_data data;
entry() {}
unsigned get_hash() const { return m_data.hash(); } unsigned get_hash() const { return m_data.hash(); }
bool is_free() const { return m_data.m_key1 == nullptr; } bool is_free() const { return m_data.m_key1 == nullptr; }
bool is_deleted() const { return m_data.m_key1 == reinterpret_cast<Key1 *>(1); } bool is_deleted() const { return m_data.m_key1 == reinterpret_cast<Key1 *>(1); }

View file

@ -34,7 +34,6 @@ protected:
typedef chashtable<obj_pair, hash_proc, eq_proc> set; typedef chashtable<obj_pair, hash_proc, eq_proc> set;
set m_set; set m_set;
public: public:
obj_pair_set() {}
void insert(T1 * t1, T2 * t2) { m_set.insert(obj_pair(t1, t2)); } void insert(T1 * t1, T2 * t2) { m_set.insert(obj_pair(t1, t2)); }
void insert(obj_pair const & p) { m_set.insert(p); } void insert(obj_pair const & p) { m_set.insert(p); }
bool insert_if_not_there(T1 * t1, T2 * t2) { return m_set.insert_if_not_there2(obj_pair(t1, t2)); } bool insert_if_not_there(T1 * t1, T2 * t2) { return m_set.insert_if_not_there2(obj_pair(t1, t2)); }

View file

@ -30,11 +30,10 @@ Revision History:
template<typename T1, typename T2, typename T3> template<typename T1, typename T2, typename T3>
class obj_triple_hash_entry { class obj_triple_hash_entry {
unsigned m_hash; // cached hash code unsigned m_hash; // cached hash code
triple<T1*, T2*, T3*> m_data; triple<T1*, T2*, T3*> m_data { nullptr, nullptr, nullptr };
public: public:
typedef triple<T1*, T2*, T3*> data; typedef triple<T1*, T2*, T3*> data;
obj_triple_hash_entry():m_data(0,0,0) {}
unsigned get_hash() const { return m_hash; } unsigned get_hash() const { return m_hash; }
bool is_free() const { return m_data.first == 0; } bool is_free() const { return m_data.first == 0; }
bool is_deleted() const { return m_data.first == reinterpret_cast<T1 *>(1); } bool is_deleted() const { return m_data.first == reinterpret_cast<T1 *>(1); }
@ -99,7 +98,6 @@ protected:
key_data m_data; key_data m_data;
public: public:
typedef key_data data; typedef key_data data;
entry() {}
unsigned get_hash() const { return m_data.hash(); } unsigned get_hash() const { return m_data.hash(); }
bool is_free() const { return m_data.m_key1 == nullptr; } bool is_free() const { return m_data.m_key1 == nullptr; }
bool is_deleted() const { return m_data.m_key1 == reinterpret_cast<Key1 *>(1); } bool is_deleted() const { return m_data.m_key1 == reinterpret_cast<Key1 *>(1); }

View file

@ -87,7 +87,7 @@ namespace sat {
}; };
const literal null_literal; const literal null_literal;
struct literal_hash : obj_hash<literal> {}; using literal_hash = obj_hash<literal>;
inline literal to_literal(unsigned x) { literal l; l.m_val = x; return l; } inline literal to_literal(unsigned x) { literal l; l.m_val = x; return l; }
inline bool operator<(literal const & l1, literal const & l2) { return l1.m_val < l2.m_val; } inline bool operator<(literal const & l1, literal const & l2) { return l1.m_val < l2.m_val; }

View file

@ -24,7 +24,6 @@ Revision History:
class union_find_default_ctx { class union_find_default_ctx {
public: public:
typedef trail_stack _trail_stack; typedef trail_stack _trail_stack;
union_find_default_ctx() : m_stack() {}
void unmerge_eh(unsigned, unsigned) {} void unmerge_eh(unsigned, unsigned) {}
void merge_eh(unsigned, unsigned, unsigned, unsigned) {} void merge_eh(unsigned, unsigned, unsigned, unsigned) {}
@ -51,7 +50,6 @@ class union_find {
union_find & m_owner; union_find & m_owner;
public: public:
mk_var_trail(union_find & o):m_owner(o) {} mk_var_trail(union_find & o):m_owner(o) {}
~mk_var_trail() override {}
void undo() override { void undo() override {
m_owner.m_find.pop_back(); m_owner.m_find.pop_back();
m_owner.m_size.pop_back(); m_owner.m_size.pop_back();
@ -69,7 +67,6 @@ class union_find {
unsigned m_r1; unsigned m_r1;
public: public:
merge_trail(union_find & o, unsigned r1):m_owner(o), m_r1(r1) {} merge_trail(union_find & o, unsigned r1):m_owner(o), m_r1(r1) {}
~merge_trail() override {}
void undo() override { m_owner.unmerge(m_r1); } void undo() override { m_owner.unmerge(m_r1); }
}; };