mirror of
https://github.com/Z3Prover/z3
synced 2025-08-04 18:30:24 +00:00
Use override rather than virtual.
This commit is contained in:
parent
ce123d9dbc
commit
7167fda1dc
220 changed files with 2546 additions and 2548 deletions
|
@ -306,16 +306,16 @@ namespace smt {
|
|||
public:
|
||||
atom(bool_var bv, theory_var v, inf_numeral const & k, atom_kind kind);
|
||||
atom_kind get_atom_kind() const { return static_cast<atom_kind>(m_atom_kind); }
|
||||
virtual ~atom() {}
|
||||
~atom() override {}
|
||||
inline inf_numeral const & get_k() const { return m_k; }
|
||||
bool_var get_bool_var() const { return m_bvar; }
|
||||
bool is_true() const { return m_is_true; }
|
||||
void assign_eh(bool is_true, inf_numeral const & epsilon);
|
||||
virtual bool has_justification() const { return true; }
|
||||
virtual void push_justification(antecedents& a, numeral const& coeff, bool proofs_enabled) {
|
||||
bool has_justification() const override { return true; }
|
||||
void push_justification(antecedents& a, numeral const& coeff, bool proofs_enabled) override {
|
||||
a.push_lit(literal(get_bool_var(), !m_is_true), coeff, proofs_enabled);
|
||||
}
|
||||
virtual void display(theory_arith const& th, std::ostream& out) const;
|
||||
void display(theory_arith const& th, std::ostream& out) const override;
|
||||
};
|
||||
|
||||
class eq_bound : public bound {
|
||||
|
@ -328,13 +328,13 @@ namespace smt {
|
|||
m_rhs(rhs) {
|
||||
SASSERT(m_lhs->get_root() == m_rhs->get_root());
|
||||
}
|
||||
virtual ~eq_bound() {}
|
||||
virtual bool has_justification() const { return true; }
|
||||
virtual void push_justification(antecedents& a, numeral const& coeff, bool proofs_enabled) {
|
||||
~eq_bound() override {}
|
||||
bool has_justification() const override { return true; }
|
||||
void push_justification(antecedents& a, numeral const& coeff, bool proofs_enabled) override {
|
||||
SASSERT(m_lhs->get_root() == m_rhs->get_root());
|
||||
a.push_eq(enode_pair(m_lhs, m_rhs), coeff, proofs_enabled);
|
||||
}
|
||||
virtual void display(theory_arith const& th, std::ostream& out) const;
|
||||
void display(theory_arith const& th, std::ostream& out) const override;
|
||||
};
|
||||
|
||||
class derived_bound : public bound {
|
||||
|
@ -344,14 +344,14 @@ namespace smt {
|
|||
friend class theory_arith;
|
||||
public:
|
||||
derived_bound(theory_var v, inf_numeral const & val, bound_kind k):bound(v, val, k, false) {}
|
||||
virtual ~derived_bound() {}
|
||||
~derived_bound() override {}
|
||||
literal_vector const& lits() const { return m_lits; }
|
||||
eq_vector const& eqs() const { return m_eqs; }
|
||||
virtual bool has_justification() const { return true; }
|
||||
virtual void push_justification(antecedents& a, numeral const& coeff, bool proofs_enabled);
|
||||
bool has_justification() const override { return true; }
|
||||
void push_justification(antecedents& a, numeral const& coeff, bool proofs_enabled) override;
|
||||
virtual void push_lit(literal l, numeral const&) { m_lits.push_back(l); }
|
||||
virtual void push_eq(enode_pair const& p, numeral const&) { m_eqs.push_back(p); }
|
||||
virtual void display(theory_arith const& th, std::ostream& out) const;
|
||||
void display(theory_arith const& th, std::ostream& out) const override;
|
||||
|
||||
};
|
||||
|
||||
|
@ -361,12 +361,12 @@ namespace smt {
|
|||
friend class theory_arith;
|
||||
public:
|
||||
justified_derived_bound(theory_var v, inf_numeral const & val, bound_kind k):derived_bound(v, val, k) {}
|
||||
virtual ~justified_derived_bound() {}
|
||||
virtual bool has_justification() const { return true; }
|
||||
virtual void push_justification(antecedents& a, numeral const& coeff, bool proofs_enabled);
|
||||
virtual void push_lit(literal l, numeral const& coeff);
|
||||
~justified_derived_bound() override {}
|
||||
bool has_justification() const override { return true; }
|
||||
void push_justification(antecedents& a, numeral const& coeff, bool proofs_enabled) override;
|
||||
void push_lit(literal l, numeral const& coeff) override;
|
||||
|
||||
virtual void push_eq(enode_pair const& p, numeral const& coeff);
|
||||
void push_eq(enode_pair const& p, numeral const& coeff) override;
|
||||
};
|
||||
|
||||
typedef int_hashtable<int_hash, default_eq<int> > literal_idx_set;
|
||||
|
@ -510,7 +510,7 @@ namespace smt {
|
|||
typedef int_hashtable<var_value_hash, var_value_eq> var_value_table;
|
||||
var_value_table m_var_value_table;
|
||||
|
||||
virtual theory_var mk_var(enode * n);
|
||||
theory_var mk_var(enode * n) override;
|
||||
|
||||
void found_unsupported_op(app * n);
|
||||
void found_underspecified_op(app * n);
|
||||
|
@ -635,24 +635,24 @@ namespace smt {
|
|||
struct compare_atoms {
|
||||
bool operator()(atom* a1, atom* a2) const { return a1->get_k() < a2->get_k(); }
|
||||
};
|
||||
virtual bool default_internalizer() const { return false; }
|
||||
virtual bool internalize_atom(app * n, bool gate_ctx);
|
||||
virtual bool internalize_term(app * term);
|
||||
virtual void internalize_eq_eh(app * atom, bool_var v);
|
||||
virtual void apply_sort_cnstr(enode * n, sort * s);
|
||||
bool default_internalizer() const override { return false; }
|
||||
bool internalize_atom(app * n, bool gate_ctx) override;
|
||||
bool internalize_term(app * term) override;
|
||||
void internalize_eq_eh(app * atom, bool_var v) override;
|
||||
void apply_sort_cnstr(enode * n, sort * s) override;
|
||||
|
||||
virtual void assign_eh(bool_var v, bool is_true);
|
||||
virtual void new_eq_eh(theory_var v1, theory_var v2);
|
||||
virtual bool use_diseqs() const;
|
||||
virtual void new_diseq_eh(theory_var v1, theory_var v2);
|
||||
void assign_eh(bool_var v, bool is_true) override;
|
||||
void new_eq_eh(theory_var v1, theory_var v2) override;
|
||||
bool use_diseqs() const override;
|
||||
void new_diseq_eh(theory_var v1, theory_var v2) override;
|
||||
|
||||
virtual void push_scope_eh();
|
||||
virtual void pop_scope_eh(unsigned num_scopes);
|
||||
void push_scope_eh() override;
|
||||
void pop_scope_eh(unsigned num_scopes) override;
|
||||
|
||||
virtual void relevant_eh(app * n);
|
||||
void relevant_eh(app * n) override;
|
||||
|
||||
virtual void restart_eh();
|
||||
virtual void init_search_eh();
|
||||
void restart_eh() override;
|
||||
void init_search_eh() override;
|
||||
/**
|
||||
\brief True if the assignment may be changed during final
|
||||
check. assume_eqs, check_int_feasibility,
|
||||
|
@ -669,18 +669,18 @@ namespace smt {
|
|||
*/
|
||||
bool m_liberal_final_check;
|
||||
final_check_status final_check_core();
|
||||
virtual final_check_status final_check_eh();
|
||||
final_check_status final_check_eh() override;
|
||||
|
||||
virtual bool can_propagate();
|
||||
virtual void propagate();
|
||||
bool can_propagate() override;
|
||||
void propagate() override;
|
||||
bool propagate_core();
|
||||
void failed();
|
||||
|
||||
|
||||
virtual void flush_eh();
|
||||
virtual void reset_eh();
|
||||
void flush_eh() override;
|
||||
void reset_eh() override;
|
||||
|
||||
virtual bool validate_eq_in_model(theory_var v1, theory_var v2, bool is_true) const;
|
||||
bool validate_eq_in_model(theory_var v1, theory_var v2, bool is_true) const override;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
|
@ -867,7 +867,7 @@ namespace smt {
|
|||
void propagate_cheap_eq(unsigned rid);
|
||||
void propagate_eq_to_core(theory_var x, theory_var y, antecedents& antecedents);
|
||||
|
||||
virtual bool is_shared(theory_var v) const;
|
||||
bool is_shared(theory_var v) const override;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
|
@ -909,7 +909,7 @@ namespace smt {
|
|||
/**
|
||||
\brief See comment in theory::mk_eq_atom
|
||||
*/
|
||||
virtual app * mk_eq_atom(expr * lhs, expr * rhs) { return m_util.mk_eq(lhs, rhs); }
|
||||
app * mk_eq_atom(expr * lhs, expr * rhs) override { return m_util.mk_eq(lhs, rhs); }
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
|
@ -1039,13 +1039,13 @@ namespace smt {
|
|||
// -----------------------------------
|
||||
public:
|
||||
theory_arith(ast_manager & m, theory_arith_params & params);
|
||||
virtual ~theory_arith();
|
||||
~theory_arith() override;
|
||||
|
||||
virtual theory * mk_fresh(context * new_ctx);
|
||||
theory * mk_fresh(context * new_ctx) override;
|
||||
|
||||
virtual void setup();
|
||||
void setup() override;
|
||||
|
||||
virtual char const * get_name() const { return "arithmetic"; }
|
||||
char const * get_name() const override { return "arithmetic"; }
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
|
@ -1058,15 +1058,15 @@ namespace smt {
|
|||
void compute_epsilon();
|
||||
void refine_epsilon();
|
||||
|
||||
virtual void init_model(model_generator & m);
|
||||
virtual model_value_proc * mk_value(enode * n, model_generator & mg);
|
||||
void init_model(model_generator & m) override;
|
||||
model_value_proc * mk_value(enode * n, model_generator & mg) override;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Model checker
|
||||
//
|
||||
// -----------------------------------
|
||||
virtual bool get_value(enode * n, expr_ref & r);
|
||||
bool get_value(enode * n, expr_ref & r) override;
|
||||
|
||||
bool get_lower(enode* n, expr_ref& r);
|
||||
bool get_upper(enode* n, expr_ref& r);
|
||||
|
@ -1078,9 +1078,9 @@ namespace smt {
|
|||
// Optimization
|
||||
//
|
||||
// -----------------------------------
|
||||
virtual inf_eps_rational<inf_rational> maximize(theory_var v, expr_ref& blocker, bool& has_shared);
|
||||
virtual inf_eps_rational<inf_rational> value(theory_var v);
|
||||
virtual theory_var add_objective(app* term);
|
||||
inf_eps_rational<inf_rational> maximize(theory_var v, expr_ref& blocker, bool& has_shared) override;
|
||||
inf_eps_rational<inf_rational> value(theory_var v) override;
|
||||
theory_var add_objective(app* term) override;
|
||||
expr_ref mk_ge(filter_model_converter& fm, theory_var v, inf_numeral const& val);
|
||||
void enable_record_conflict(expr* bound);
|
||||
void record_conflict(unsigned num_lits, literal const * lits,
|
||||
|
@ -1102,8 +1102,8 @@ namespace smt {
|
|||
//
|
||||
// -----------------------------------
|
||||
public:
|
||||
virtual void collect_statistics(::statistics & st) const;
|
||||
virtual void display(std::ostream & out) const;
|
||||
void collect_statistics(::statistics & st) const override;
|
||||
void display(std::ostream & out) const override;
|
||||
protected:
|
||||
void display_row(std::ostream & out, unsigned r_id, bool compact = true) const;
|
||||
void display_row(std::ostream & out, row const & r, bool compact = true) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue