mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 11:25:51 +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
|
@ -1536,14 +1536,14 @@ public:
|
|||
m_trail(m)
|
||||
{}
|
||||
|
||||
~arith_plugin() {
|
||||
~arith_plugin() override {
|
||||
bounds_cache::iterator it = m_bounds_cache.begin(), end = m_bounds_cache.end();
|
||||
for (; it != end; ++it) {
|
||||
dealloc(it->get_value());
|
||||
}
|
||||
}
|
||||
|
||||
virtual void assign(contains_app& contains_x, expr* fml, rational const& vl) {
|
||||
void assign(contains_app& contains_x, expr* fml, rational const& vl) override {
|
||||
SASSERT(vl.is_unsigned());
|
||||
app* x = contains_x.x();
|
||||
unsigned v = vl.get_unsigned();
|
||||
|
@ -1633,7 +1633,7 @@ public:
|
|||
}
|
||||
|
||||
|
||||
virtual bool get_num_branches(contains_app& contains_x, expr* fml, rational& nb) {
|
||||
bool get_num_branches(contains_app& contains_x, expr* fml, rational& nb) override {
|
||||
app* x = contains_x.x();
|
||||
if (!update_bounds(contains_x, fml)) {
|
||||
return false;
|
||||
|
@ -1645,7 +1645,7 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
virtual void subst(contains_app& contains_x, rational const& vl, expr_ref& fml, expr_ref* def) {
|
||||
void subst(contains_app& contains_x, rational const& vl, expr_ref& fml, expr_ref* def) override {
|
||||
SASSERT(vl.is_unsigned());
|
||||
if (def) {
|
||||
get_def(contains_x, vl.get_unsigned(), fml, *def);
|
||||
|
@ -1654,7 +1654,7 @@ public:
|
|||
TRACE("qe", tout << mk_pp(contains_x.x(), m) << " " << vl << "\n" << mk_pp(fml, m) << "\n";);
|
||||
}
|
||||
|
||||
virtual bool project(contains_app& x, model_ref& model, expr_ref& fml) {
|
||||
bool project(contains_app& x, model_ref& model, expr_ref& fml) override {
|
||||
if (!update_bounds(x, fml)) {
|
||||
TRACE("qe", tout << mk_pp(x.x(), m) << " failed to update bounds\n";);
|
||||
return false;
|
||||
|
@ -1668,19 +1668,19 @@ public:
|
|||
}
|
||||
|
||||
|
||||
virtual unsigned get_weight(contains_app& contains_x, expr* fml) {
|
||||
unsigned get_weight(contains_app& contains_x, expr* fml) override {
|
||||
return 2;
|
||||
}
|
||||
|
||||
virtual bool solve(conj_enum& conjs, expr* fml) {
|
||||
bool solve(conj_enum& conjs, expr* fml) override {
|
||||
return m_util.solve(conjs, fml);
|
||||
}
|
||||
|
||||
virtual bool mk_atom(expr* e, bool p, expr_ref& result) {
|
||||
bool mk_atom(expr* e, bool p, expr_ref& result) override {
|
||||
return m_util.mk_atom(e, p, result);
|
||||
}
|
||||
|
||||
virtual bool is_uninterpreted(app* f) {
|
||||
bool is_uninterpreted(app* f) override {
|
||||
switch(f->get_decl_kind()) {
|
||||
case OP_NUM:
|
||||
case OP_LE:
|
||||
|
@ -2456,7 +2456,7 @@ public:
|
|||
m_util.set_enable_linear(true); // (produce_models);
|
||||
}
|
||||
|
||||
virtual ~nlarith_plugin() {
|
||||
~nlarith_plugin() override {
|
||||
bcs_t::iterator it = m_cache.begin(), end = m_cache.end();
|
||||
for (; it != end; ++it) {
|
||||
dealloc(it->get_value());
|
||||
|
@ -2467,7 +2467,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual bool simplify(expr_ref& fml) {
|
||||
bool simplify(expr_ref& fml) override {
|
||||
expr_ref tmp(m), tmp2(m);
|
||||
m_factor_rw(fml, tmp);
|
||||
m_rewriter(tmp, tmp2);
|
||||
|
@ -2478,7 +2478,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
virtual void assign(contains_app& x, expr* fml, rational const& vl) {
|
||||
void assign(contains_app& x, expr* fml, rational const& vl) override {
|
||||
nlarith::branch_conditions *brs = 0;
|
||||
VERIFY (m_cache.find(x.x(), fml, brs));
|
||||
SASSERT(vl.is_unsigned());
|
||||
|
@ -2491,8 +2491,8 @@ public:
|
|||
m_ctx.add_constraint(true, result);
|
||||
}
|
||||
|
||||
virtual bool get_num_branches(contains_app& x,
|
||||
expr* fml, rational& num_branches) {
|
||||
bool get_num_branches(contains_app& x,
|
||||
expr* fml, rational& num_branches) override {
|
||||
nlarith::branch_conditions *brs;
|
||||
if (m_cache.find(x.x(), fml, brs)) {
|
||||
num_branches = rational(brs->size());
|
||||
|
@ -2515,7 +2515,7 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
virtual void subst(contains_app& x, rational const& vl, expr_ref& fml, expr_ref* def) {
|
||||
void subst(contains_app& x, rational const& vl, expr_ref& fml, expr_ref* def) override {
|
||||
nlarith::branch_conditions *brs = 0;
|
||||
VERIFY (m_cache.find(x.x(), fml, brs));
|
||||
SASSERT(vl.is_unsigned());
|
||||
|
@ -2534,7 +2534,7 @@ public:
|
|||
}
|
||||
|
||||
|
||||
virtual unsigned get_weight(contains_app& x, expr* fml) {
|
||||
unsigned get_weight(contains_app& x, expr* fml) override {
|
||||
obj_map<app, unsigned>* weights = 0;
|
||||
unsigned weight = 0;
|
||||
if (!m_weights.find(fml, weights)) {
|
||||
|
@ -2553,12 +2553,12 @@ public:
|
|||
return UINT_MAX;
|
||||
}
|
||||
|
||||
virtual bool solve(conj_enum& conjs, expr* fml) { return false; }
|
||||
bool solve(conj_enum& conjs, expr* fml) override { return false; }
|
||||
|
||||
// we don't need to modify the atom.
|
||||
virtual bool mk_atom(expr* e, bool p, expr_ref& result) { return false; }
|
||||
bool mk_atom(expr* e, bool p, expr_ref& result) override { return false; }
|
||||
|
||||
virtual bool is_uninterpreted(app* f) {
|
||||
bool is_uninterpreted(app* f) override {
|
||||
if (m_produce_models) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue