mirror of
https://github.com/Z3Prover/z3
synced 2025-08-15 15:25:26 +00:00
Use override rather than virtual.
This commit is contained in:
parent
2b847478a2
commit
b7d1753843
138 changed files with 1621 additions and 1624 deletions
|
@ -48,10 +48,10 @@ bool is_unbounded(goal const & g) {
|
|||
|
||||
class is_unbounded_probe : public probe {
|
||||
public:
|
||||
virtual result operator()(goal const & g) {
|
||||
result operator()(goal const & g) override {
|
||||
return is_unbounded(g);
|
||||
}
|
||||
virtual ~is_unbounded_probe() {}
|
||||
~is_unbounded_probe() override {}
|
||||
};
|
||||
|
||||
probe * mk_is_unbounded_probe() {
|
||||
|
@ -142,33 +142,33 @@ public:
|
|||
m_imp = alloc(imp, m, p);
|
||||
}
|
||||
|
||||
virtual tactic * translate(ast_manager & m) {
|
||||
tactic * translate(ast_manager & m) override {
|
||||
return alloc(add_bounds_tactic, m, m_params);
|
||||
}
|
||||
|
||||
virtual ~add_bounds_tactic() {
|
||||
~add_bounds_tactic() override {
|
||||
dealloc(m_imp);
|
||||
}
|
||||
|
||||
virtual void updt_params(params_ref const & p) {
|
||||
void updt_params(params_ref const & p) override {
|
||||
m_params = p;
|
||||
m_imp->updt_params(p);
|
||||
}
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
void collect_param_descrs(param_descrs & r) override {
|
||||
r.insert("add_bound_lower", CPK_NUMERAL, "(default: -2) lower bound to be added to unbounded variables.");
|
||||
r.insert("add_bound_upper", CPK_NUMERAL, "(default: 2) upper bound to be added to unbounded variables.");
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
(*m_imp)(g, result, mc, pc, core);
|
||||
}
|
||||
|
||||
virtual void cleanup() {
|
||||
void cleanup() override {
|
||||
imp * d = alloc(imp, m_imp->m, m_params);
|
||||
std::swap(d, m_imp);
|
||||
dealloc(d);
|
||||
|
|
|
@ -23,15 +23,15 @@ struct arith_bounds_tactic : public tactic {
|
|||
ast_manager& get_manager() { return m; }
|
||||
|
||||
|
||||
virtual void operator()(/* in */ goal_ref const & in,
|
||||
/* out */ goal_ref_buffer & result,
|
||||
/* out */ model_converter_ref & mc,
|
||||
/* out */ proof_converter_ref & pc,
|
||||
/* out */ expr_dependency_ref & core) {
|
||||
void operator()(/* in */ goal_ref const & in,
|
||||
/* out */ goal_ref_buffer & result,
|
||||
/* out */ model_converter_ref & mc,
|
||||
/* out */ proof_converter_ref & pc,
|
||||
/* out */ expr_dependency_ref & core) override {
|
||||
bounds_arith_subsumption(in, result);
|
||||
}
|
||||
|
||||
virtual tactic* translate(ast_manager & mgr) {
|
||||
tactic* translate(ast_manager & mgr) override {
|
||||
return alloc(arith_bounds_tactic, mgr);
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ struct arith_bounds_tactic : public tactic {
|
|||
TRACE("arith_subsumption", s->display(tout); );
|
||||
}
|
||||
|
||||
virtual void cleanup() {}
|
||||
void cleanup() override {}
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -36,26 +36,26 @@ public:
|
|||
m_params(p) {
|
||||
}
|
||||
|
||||
virtual tactic * translate(ast_manager & m) {
|
||||
tactic * translate(ast_manager & m) override {
|
||||
return alloc(card2bv_tactic, m, m_params);
|
||||
}
|
||||
|
||||
virtual ~card2bv_tactic() {
|
||||
~card2bv_tactic() override {
|
||||
}
|
||||
|
||||
virtual void updt_params(params_ref const & p) {
|
||||
void updt_params(params_ref const & p) override {
|
||||
m_params = p;
|
||||
}
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
void collect_param_descrs(param_descrs & r) override {
|
||||
}
|
||||
|
||||
|
||||
virtual void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
TRACE("card2bv-before", g->display(tout););
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0; result.reset();
|
||||
|
@ -101,7 +101,7 @@ public:
|
|||
SASSERT(g->is_well_sorted());
|
||||
}
|
||||
|
||||
virtual void cleanup() {
|
||||
void cleanup() override {
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -297,23 +297,23 @@ public:
|
|||
m_imp = alloc(imp, m);
|
||||
}
|
||||
|
||||
virtual tactic * translate(ast_manager & m) {
|
||||
tactic * translate(ast_manager & m) override {
|
||||
return alloc(degree_shift_tactic, m);
|
||||
}
|
||||
|
||||
virtual ~degree_shift_tactic() {
|
||||
~degree_shift_tactic() override {
|
||||
dealloc(m_imp);
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & in,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & in,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
(*m_imp)(in, result, mc, pc, core);
|
||||
}
|
||||
|
||||
virtual void cleanup() {
|
||||
void cleanup() override {
|
||||
imp * d = alloc(imp, m_imp->m);
|
||||
std::swap(d, m_imp);
|
||||
dealloc(d);
|
||||
|
|
|
@ -354,28 +354,28 @@ public:
|
|||
m_imp = alloc(imp, m, p);
|
||||
}
|
||||
|
||||
virtual tactic * translate(ast_manager & m) {
|
||||
tactic * translate(ast_manager & m) override {
|
||||
return alloc(diff_neq_tactic, m, m_params);
|
||||
}
|
||||
|
||||
virtual ~diff_neq_tactic() {
|
||||
~diff_neq_tactic() override {
|
||||
dealloc(m_imp);
|
||||
}
|
||||
|
||||
virtual void updt_params(params_ref const & p) {
|
||||
void updt_params(params_ref const & p) override {
|
||||
m_params = p;
|
||||
m_imp->updt_params(p);
|
||||
}
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
void collect_param_descrs(param_descrs & r) override {
|
||||
r.insert("diff_neq_max_k", CPK_UINT, "(default: 1024) maximum variable upper bound for diff neq solver.");
|
||||
}
|
||||
|
||||
virtual void collect_statistics(statistics & st) const {
|
||||
void collect_statistics(statistics & st) const override {
|
||||
st.update("conflicts", m_imp->m_num_conflicts);
|
||||
}
|
||||
|
||||
virtual void reset_statistics() {
|
||||
void reset_statistics() override {
|
||||
m_imp->m_num_conflicts = 0;
|
||||
}
|
||||
|
||||
|
@ -383,15 +383,15 @@ public:
|
|||
\brief Fix a DL variable in s to 0.
|
||||
If s is not really in the difference logic fragment, then this is a NOOP.
|
||||
*/
|
||||
virtual void operator()(goal_ref const & in,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & in,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
(*m_imp)(in, result, mc, pc, core);
|
||||
}
|
||||
|
||||
virtual void cleanup() {
|
||||
void cleanup() override {
|
||||
imp * d = alloc(imp, m_imp->m, m_params);
|
||||
d->m_num_conflicts = m_imp->m_num_conflicts;
|
||||
std::swap(d, m_imp);
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
m_refs(m)
|
||||
{}
|
||||
|
||||
virtual void operator()(model_ref & old_model, unsigned goal_idx) {
|
||||
void operator()(model_ref & old_model, unsigned goal_idx) override {
|
||||
SASSERT(goal_idx == 0);
|
||||
model * new_model = alloc(model, m);
|
||||
unsigned num = old_model->get_num_constants();
|
||||
|
@ -106,7 +106,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual model_converter * translate(ast_translation & translator) {
|
||||
model_converter * translate(ast_translation & translator) override {
|
||||
bool2int_model_converter* mc = alloc(bool2int_model_converter, translator.to());
|
||||
for (unsigned i = 0; i < m_nums_as_int.size(); ++i) {
|
||||
mc->insert(m_nums_as_int[i], m_nums_as_bool[i].size(), m_nums_as_bool[i].c_ptr());
|
||||
|
@ -134,24 +134,24 @@ public:
|
|||
m_max_hi(rational(m_max_hi_default)) {
|
||||
}
|
||||
|
||||
virtual ~elim01_tactic() {
|
||||
~elim01_tactic() override {
|
||||
}
|
||||
|
||||
virtual void updt_params(params_ref const & p) {
|
||||
void updt_params(params_ref const & p) override {
|
||||
m_max_hi = rational(p.get_uint("max_coefficient", m_max_hi_default));
|
||||
m_params = p;
|
||||
}
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
void collect_param_descrs(param_descrs & r) override {
|
||||
r.insert("max_coefficient", CPK_UINT, "(default: 1) maximal upper bound for finite range -> Bool conversion");
|
||||
}
|
||||
|
||||
|
||||
virtual void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
expr_dependency_ref & core) override {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
|
||||
|
@ -211,11 +211,11 @@ public:
|
|||
// TBD: support proof conversion (or not..)
|
||||
}
|
||||
|
||||
virtual tactic * translate(ast_manager & m) {
|
||||
tactic * translate(ast_manager & m) override {
|
||||
return alloc(elim01_tactic, m, m_params);
|
||||
}
|
||||
|
||||
virtual void cleanup() {}
|
||||
void cleanup() override {}
|
||||
|
||||
void add_variable(bool2int_model_converter* b2i,
|
||||
expr_safe_replace& sub,
|
||||
|
|
|
@ -82,7 +82,7 @@ class eq2bv_tactic : public tactic {
|
|||
m_map.insert(c_new, c_old);
|
||||
}
|
||||
|
||||
virtual void operator()(model_ref& mdl) {
|
||||
void operator()(model_ref& mdl) override {
|
||||
ast_manager& m = mdl->get_manager();
|
||||
bv_util bv(m);
|
||||
arith_util a(m);
|
||||
|
@ -105,7 +105,7 @@ class eq2bv_tactic : public tactic {
|
|||
mdl = new_m;
|
||||
}
|
||||
|
||||
virtual model_converter* translate(ast_translation & translator) {
|
||||
model_converter* translate(ast_translation & translator) override {
|
||||
bvmc* v = alloc(bvmc);
|
||||
obj_map<func_decl, func_decl*>::iterator it = m_map.begin(), end = m_map.end();
|
||||
for (; it != end; ++it) {
|
||||
|
@ -136,19 +136,18 @@ public:
|
|||
m_bounds(m) {
|
||||
}
|
||||
|
||||
virtual ~eq2bv_tactic() {
|
||||
~eq2bv_tactic() override {
|
||||
}
|
||||
|
||||
|
||||
void updt_params(params_ref const & p) {
|
||||
void updt_params(params_ref const & p) override {
|
||||
}
|
||||
|
||||
virtual void operator()(
|
||||
goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
m_trail.reset();
|
||||
|
@ -213,14 +212,14 @@ public:
|
|||
}
|
||||
|
||||
|
||||
virtual tactic * translate(ast_manager & m) {
|
||||
tactic * translate(ast_manager & m) override {
|
||||
return alloc(eq2bv_tactic, m);
|
||||
}
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
void collect_param_descrs(param_descrs & r) override {
|
||||
}
|
||||
|
||||
virtual void cleanup() {
|
||||
void cleanup() override {
|
||||
}
|
||||
|
||||
void cleanup_fd(ref<bvmc>& mc) {
|
||||
|
|
|
@ -293,30 +293,30 @@ public:
|
|||
m_imp = alloc(imp, m, p);
|
||||
}
|
||||
|
||||
virtual tactic * translate(ast_manager & m) {
|
||||
tactic * translate(ast_manager & m) override {
|
||||
return alloc(factor_tactic, m, m_params);
|
||||
}
|
||||
|
||||
virtual ~factor_tactic() {
|
||||
~factor_tactic() override {
|
||||
dealloc(m_imp);
|
||||
}
|
||||
|
||||
virtual void updt_params(params_ref const & p) {
|
||||
void updt_params(params_ref const & p) override {
|
||||
m_params = p;
|
||||
m_imp->m_rw.cfg().updt_params(p);
|
||||
}
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
void collect_param_descrs(param_descrs & r) override {
|
||||
r.insert("split_factors", CPK_BOOL,
|
||||
"(default: true) apply simplifications such as (= (* p1 p2) 0) --> (or (= p1 0) (= p2 0)).");
|
||||
polynomial::factor_params::get_param_descrs(r);
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & in,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & in,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
try {
|
||||
(*m_imp)(in, result, mc, pc, core);
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual void cleanup() {
|
||||
void cleanup() override {
|
||||
imp * d = alloc(imp, m_imp->m, m_params);
|
||||
std::swap(d, m_imp);
|
||||
dealloc(d);
|
||||
|
|
|
@ -303,28 +303,28 @@ public:
|
|||
m_imp = alloc(imp, m, p);
|
||||
}
|
||||
|
||||
virtual tactic * translate(ast_manager & m) {
|
||||
tactic * translate(ast_manager & m) override {
|
||||
return alloc(fix_dl_var_tactic, m, m_params);
|
||||
}
|
||||
|
||||
virtual ~fix_dl_var_tactic() {
|
||||
~fix_dl_var_tactic() override {
|
||||
dealloc(m_imp);
|
||||
}
|
||||
|
||||
virtual void updt_params(params_ref const & p) {
|
||||
void updt_params(params_ref const & p) override {
|
||||
m_params = p;
|
||||
m_imp->updt_params(p);
|
||||
}
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
void collect_param_descrs(param_descrs & r) override {
|
||||
th_rewriter::get_param_descrs(r);
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & in,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & in,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
try {
|
||||
(*m_imp)(in, result, mc, pc, core);
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual void cleanup() {
|
||||
void cleanup() override {
|
||||
imp * d = alloc(imp, m_imp->m, m_params);
|
||||
std::swap(d, m_imp);
|
||||
dealloc(d);
|
||||
|
|
|
@ -164,7 +164,7 @@ class fm_tactic : public tactic {
|
|||
public:
|
||||
fm_model_converter(ast_manager & _m):m(_m) {}
|
||||
|
||||
virtual ~fm_model_converter() {
|
||||
~fm_model_converter() override {
|
||||
m.dec_array_ref(m_xs.size(), m_xs.c_ptr());
|
||||
vector<clauses>::iterator it = m_clauses.begin();
|
||||
vector<clauses>::iterator end = m_clauses.end();
|
||||
|
@ -180,7 +180,7 @@ class fm_tactic : public tactic {
|
|||
m_clauses.back().swap(c);
|
||||
}
|
||||
|
||||
virtual void operator()(model_ref & md, unsigned goal_idx) {
|
||||
void operator()(model_ref & md, unsigned goal_idx) override {
|
||||
TRACE("fm_mc", model_v2_pp(tout, *md); display(tout););
|
||||
model_evaluator ev(*(md.get()));
|
||||
ev.set_model_completion(true);
|
||||
|
@ -244,7 +244,7 @@ class fm_tactic : public tactic {
|
|||
}
|
||||
|
||||
|
||||
virtual void display(std::ostream & out) {
|
||||
void display(std::ostream & out) override {
|
||||
out << "(fm-model-converter";
|
||||
SASSERT(m_xs.size() == m_clauses.size());
|
||||
unsigned sz = m_xs.size();
|
||||
|
@ -261,7 +261,7 @@ class fm_tactic : public tactic {
|
|||
out << ")\n";
|
||||
}
|
||||
|
||||
virtual model_converter * translate(ast_translation & translator) {
|
||||
model_converter * translate(ast_translation & translator) override {
|
||||
ast_manager & to_m = translator.to();
|
||||
fm_model_converter * res = alloc(fm_model_converter, to_m);
|
||||
unsigned sz = m_xs.size();
|
||||
|
@ -1643,20 +1643,20 @@ public:
|
|||
m_imp = alloc(imp, m, p);
|
||||
}
|
||||
|
||||
virtual tactic * translate(ast_manager & m) {
|
||||
tactic * translate(ast_manager & m) override {
|
||||
return alloc(fm_tactic, m, m_params);
|
||||
}
|
||||
|
||||
virtual ~fm_tactic() {
|
||||
~fm_tactic() override {
|
||||
dealloc(m_imp);
|
||||
}
|
||||
|
||||
virtual void updt_params(params_ref const & p) {
|
||||
void updt_params(params_ref const & p) override {
|
||||
m_params = p;
|
||||
m_imp->updt_params(p);
|
||||
}
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
void collect_param_descrs(param_descrs & r) override {
|
||||
insert_produce_models(r);
|
||||
insert_max_memory(r);
|
||||
r.insert("fm_real_only", CPK_BOOL, "(default: true) consider only real variables for fourier-motzkin elimination.");
|
||||
|
@ -1668,17 +1668,17 @@ public:
|
|||
}
|
||||
|
||||
|
||||
virtual void cleanup() {
|
||||
void cleanup() override {
|
||||
imp * d = alloc(imp, m_imp->m, m_params);
|
||||
std::swap(d, m_imp);
|
||||
dealloc(d);
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & in,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & in,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
(*m_imp)(in, result, mc, pc, core);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -148,21 +148,21 @@ public:
|
|||
m_compile_equality(false) {
|
||||
}
|
||||
|
||||
virtual ~lia2card_tactic() {
|
||||
~lia2card_tactic() override {
|
||||
dealloc(m_todo);
|
||||
dealloc(m_01s);
|
||||
}
|
||||
|
||||
void updt_params(params_ref const & p) {
|
||||
void updt_params(params_ref const & p) override {
|
||||
m_params = p;
|
||||
m_compile_equality = p.get_bool("compile_equality", false);
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
expr_dependency_ref & core) override {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
m_01s->reset();
|
||||
|
@ -389,16 +389,16 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual tactic * translate(ast_manager & m) {
|
||||
tactic * translate(ast_manager & m) override {
|
||||
return alloc(lia2card_tactic, m, m_params);
|
||||
}
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
void collect_param_descrs(param_descrs & r) override {
|
||||
r.insert("compile_equality", CPK_BOOL,
|
||||
"(default:false) compile equalities into pseudo-Boolean equality");
|
||||
}
|
||||
|
||||
virtual void cleanup() {
|
||||
void cleanup() override {
|
||||
expr_set* d = alloc(expr_set);
|
||||
ptr_vector<expr>* todo = alloc(ptr_vector<expr>);
|
||||
std::swap(m_01s, d);
|
||||
|
|
|
@ -313,30 +313,30 @@ public:
|
|||
m_imp = alloc(imp, m, p);
|
||||
}
|
||||
|
||||
virtual tactic * translate(ast_manager & m) {
|
||||
tactic * translate(ast_manager & m) override {
|
||||
return alloc(lia2pb_tactic, m, m_params);
|
||||
}
|
||||
|
||||
virtual ~lia2pb_tactic() {
|
||||
~lia2pb_tactic() override {
|
||||
dealloc(m_imp);
|
||||
}
|
||||
|
||||
virtual void updt_params(params_ref const & p) {
|
||||
void updt_params(params_ref const & p) override {
|
||||
m_params = p;
|
||||
m_imp->updt_params(p);
|
||||
}
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
void collect_param_descrs(param_descrs & r) override {
|
||||
r.insert("lia2pb_partial", CPK_BOOL, "(default: false) partial lia2pb conversion.");
|
||||
r.insert("lia2pb_max_bits", CPK_UINT, "(default: 32) maximum number of bits to be used (per variable) in lia2pb.");
|
||||
r.insert("lia2pb_total_bits", CPK_UINT, "(default: 2048) total number of bits to be used (per problem) in lia2pb.");
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & in,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & in,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
try {
|
||||
(*m_imp)(in, result, mc, pc, core);
|
||||
}
|
||||
|
@ -345,7 +345,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual void cleanup() {
|
||||
void cleanup() override {
|
||||
imp * d = alloc(imp, m_imp->m, m_params);
|
||||
std::swap(d, m_imp);
|
||||
dealloc(d);
|
||||
|
|
|
@ -418,18 +418,18 @@ public:
|
|||
m_imp(0) {
|
||||
}
|
||||
|
||||
virtual tactic * translate(ast_manager & m) {
|
||||
tactic * translate(ast_manager & m) override {
|
||||
return alloc(nla2bv_tactic, m_params);
|
||||
}
|
||||
|
||||
virtual ~nla2bv_tactic() {
|
||||
~nla2bv_tactic() override {
|
||||
}
|
||||
|
||||
virtual void updt_params(params_ref const & p) {
|
||||
void updt_params(params_ref const & p) override {
|
||||
m_params = p;
|
||||
}
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
void collect_param_descrs(param_descrs & r) override {
|
||||
r.insert("nla2bv_max_bv_size", CPK_UINT, "(default: inf) maximum bit-vector size used by nla2bv tactic");
|
||||
r.insert("nla2bv_bv_size", CPK_UINT, "(default: 4) default bit-vector size used by nla2bv tactic.");
|
||||
r.insert("nla2bv_root", CPK_UINT, "(default: 2) nla2bv tactic encodes reals into bit-vectors using expressions of the form a+b*sqrt(c), this parameter sets the value of c used in the encoding.");
|
||||
|
@ -441,11 +441,11 @@ public:
|
|||
arithmetic in place of non-linear integer arithmetic.
|
||||
\return false if transformation is not possible.
|
||||
*/
|
||||
virtual void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
SASSERT(g->is_well_sorted());
|
||||
fail_if_proof_generation("nla2bv", g);
|
||||
fail_if_unsat_core_generation("nla2bv", g);
|
||||
|
@ -459,7 +459,7 @@ public:
|
|||
SASSERT(g->is_well_sorted());
|
||||
}
|
||||
|
||||
virtual void cleanup(void) {
|
||||
void cleanup(void) override {
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -156,28 +156,28 @@ public:
|
|||
m_imp = alloc(imp, m, p);
|
||||
}
|
||||
|
||||
virtual tactic * translate(ast_manager & m) {
|
||||
tactic * translate(ast_manager & m) override {
|
||||
return alloc(normalize_bounds_tactic, m, m_params);
|
||||
}
|
||||
|
||||
virtual ~normalize_bounds_tactic() {
|
||||
~normalize_bounds_tactic() override {
|
||||
dealloc(m_imp);
|
||||
}
|
||||
|
||||
virtual void updt_params(params_ref const & p) {
|
||||
void updt_params(params_ref const & p) override {
|
||||
m_imp->updt_params(p);
|
||||
}
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
void collect_param_descrs(param_descrs & r) override {
|
||||
insert_produce_models(r);
|
||||
r.insert("norm_int_only", CPK_BOOL, "(default: true) normalize only the bounds of integer constants.");
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & in,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & in,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
try {
|
||||
(*m_imp)(in, result, mc, pc, core);
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual void cleanup() {
|
||||
void cleanup() override {
|
||||
ast_manager & m = m_imp->m;
|
||||
imp * d = alloc(imp, m, m_params);
|
||||
std::swap(d, m_imp);
|
||||
|
|
|
@ -30,11 +30,11 @@ class pb2bv_model_converter : public model_converter {
|
|||
public:
|
||||
pb2bv_model_converter(ast_manager & _m);
|
||||
pb2bv_model_converter(ast_manager & _m, obj_map<func_decl, expr*> const & c2bit, bound_manager const & bm);
|
||||
virtual ~pb2bv_model_converter();
|
||||
virtual void operator()(model_ref & md);
|
||||
virtual void operator()(model_ref & md, unsigned goal_idx);
|
||||
virtual void display(std::ostream & out);
|
||||
virtual model_converter * translate(ast_translation & translator);
|
||||
~pb2bv_model_converter() override;
|
||||
void operator()(model_ref & md) override;
|
||||
void operator()(model_ref & md, unsigned goal_idx) override;
|
||||
void display(std::ostream & out) override;
|
||||
model_converter * translate(ast_translation & translator) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -983,32 +983,32 @@ public:
|
|||
m_imp = alloc(imp, m, p);
|
||||
}
|
||||
|
||||
virtual tactic * translate(ast_manager & m) {
|
||||
tactic * translate(ast_manager & m) override {
|
||||
return alloc(pb2bv_tactic, m, m_params);
|
||||
}
|
||||
|
||||
virtual ~pb2bv_tactic() {
|
||||
~pb2bv_tactic() override {
|
||||
dealloc(m_imp);
|
||||
}
|
||||
|
||||
virtual void updt_params(params_ref const & p) {
|
||||
void updt_params(params_ref const & p) override {
|
||||
m_params = p;
|
||||
m_imp->updt_params(p);
|
||||
}
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
void collect_param_descrs(param_descrs & r) override {
|
||||
m_imp->collect_param_descrs(r);
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & in,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & in,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
(*m_imp)(in, result, mc, pc, core);
|
||||
}
|
||||
|
||||
virtual void cleanup() {
|
||||
void cleanup() override {
|
||||
ast_manager & m = m_imp->m;
|
||||
imp * d = alloc(imp, m, m_params);
|
||||
std::swap(d, m_imp);
|
||||
|
@ -1023,7 +1023,7 @@ tactic * mk_pb2bv_tactic(ast_manager & m, params_ref const & p) {
|
|||
}
|
||||
|
||||
struct is_pb_probe : public probe {
|
||||
virtual result operator()(goal const & g) {
|
||||
result operator()(goal const & g) override {
|
||||
try {
|
||||
ast_manager & m = g.m();
|
||||
bound_manager bm(m);
|
||||
|
|
|
@ -74,7 +74,7 @@ class arith_degree_probe : public probe {
|
|||
public:
|
||||
arith_degree_probe(bool avg):m_avg(avg) {}
|
||||
|
||||
virtual result operator()(goal const & g) {
|
||||
result operator()(goal const & g) override {
|
||||
proc p(g.m());
|
||||
for_each_expr_at(p, g);
|
||||
if (m_avg)
|
||||
|
@ -117,7 +117,7 @@ class arith_bw_probe : public probe {
|
|||
public:
|
||||
arith_bw_probe(bool avg):m_avg(avg) {}
|
||||
|
||||
virtual result operator()(goal const & g) {
|
||||
result operator()(goal const & g) override {
|
||||
proc p(g.m());
|
||||
for_each_expr_at(p, g);
|
||||
if (m_avg)
|
||||
|
@ -269,14 +269,14 @@ static bool is_qfauflia(goal const & g) {
|
|||
|
||||
class is_qflia_probe : public probe {
|
||||
public:
|
||||
virtual result operator()(goal const & g) {
|
||||
result operator()(goal const & g) override {
|
||||
return is_qflia(g);
|
||||
}
|
||||
};
|
||||
|
||||
class is_qfauflia_probe : public probe {
|
||||
public:
|
||||
virtual result operator()(goal const & g) {
|
||||
result operator()(goal const & g) override {
|
||||
return is_qfauflia(g);
|
||||
}
|
||||
};
|
||||
|
@ -288,7 +288,7 @@ static bool is_qflra(goal const & g) {
|
|||
|
||||
class is_qflra_probe : public probe {
|
||||
public:
|
||||
virtual result operator()(goal const & g) {
|
||||
result operator()(goal const & g) override {
|
||||
return is_qflra(g);
|
||||
}
|
||||
};
|
||||
|
@ -300,7 +300,7 @@ static bool is_qflira(goal const & g) {
|
|||
|
||||
class is_qflira_probe : public probe {
|
||||
public:
|
||||
virtual result operator()(goal const & g) {
|
||||
result operator()(goal const & g) override {
|
||||
return is_qflira(g);
|
||||
}
|
||||
};
|
||||
|
@ -344,14 +344,14 @@ static bool is_mip(goal const & g) {
|
|||
|
||||
class is_ilp_probe : public probe {
|
||||
public:
|
||||
virtual result operator()(goal const & g) {
|
||||
result operator()(goal const & g) override {
|
||||
return is_ilp(g);
|
||||
}
|
||||
};
|
||||
|
||||
class is_mip_probe : public probe {
|
||||
public:
|
||||
virtual result operator()(goal const & g) {
|
||||
result operator()(goal const & g) override {
|
||||
return is_mip(g);
|
||||
}
|
||||
};
|
||||
|
@ -583,56 +583,56 @@ struct is_non_qfufnra_functor {
|
|||
|
||||
class is_qfnia_probe : public probe {
|
||||
public:
|
||||
virtual result operator()(goal const & g) {
|
||||
result operator()(goal const & g) override {
|
||||
return is_qfnia(g);
|
||||
}
|
||||
};
|
||||
|
||||
class is_qfnra_probe : public probe {
|
||||
public:
|
||||
virtual result operator()(goal const & g) {
|
||||
result operator()(goal const & g) override {
|
||||
return is_qfnra(g);
|
||||
}
|
||||
};
|
||||
|
||||
class is_nia_probe : public probe {
|
||||
public:
|
||||
virtual result operator()(goal const & g) {
|
||||
result operator()(goal const & g) override {
|
||||
return is_nia(g);
|
||||
}
|
||||
};
|
||||
|
||||
class is_nra_probe : public probe {
|
||||
public:
|
||||
virtual result operator()(goal const & g) {
|
||||
result operator()(goal const & g) override {
|
||||
return is_nra(g);
|
||||
}
|
||||
};
|
||||
|
||||
class is_nira_probe : public probe {
|
||||
public:
|
||||
virtual result operator()(goal const & g) {
|
||||
result operator()(goal const & g) override {
|
||||
return is_nira(g);
|
||||
}
|
||||
};
|
||||
|
||||
class is_lia_probe : public probe {
|
||||
public:
|
||||
virtual result operator()(goal const & g) {
|
||||
result operator()(goal const & g) override {
|
||||
return is_lia(g);
|
||||
}
|
||||
};
|
||||
|
||||
class is_lra_probe : public probe {
|
||||
public:
|
||||
virtual result operator()(goal const & g) {
|
||||
result operator()(goal const & g) override {
|
||||
return is_lra(g);
|
||||
}
|
||||
};
|
||||
|
||||
class is_lira_probe : public probe {
|
||||
public:
|
||||
virtual result operator()(goal const & g) {
|
||||
result operator()(goal const & g) override {
|
||||
return is_lira(g);
|
||||
}
|
||||
};
|
||||
|
@ -644,7 +644,7 @@ static bool is_qfufnra(goal const& g) {
|
|||
|
||||
class is_qfufnra_probe : public probe {
|
||||
public:
|
||||
virtual result operator()(goal const & g) {
|
||||
result operator()(goal const & g) override {
|
||||
return is_qfufnra(g);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -43,18 +43,18 @@ class propagate_ineqs_tactic : public tactic {
|
|||
public:
|
||||
propagate_ineqs_tactic(ast_manager & m, params_ref const & p);
|
||||
|
||||
virtual tactic * translate(ast_manager & m) {
|
||||
tactic * translate(ast_manager & m) override {
|
||||
return alloc(propagate_ineqs_tactic, m, m_params);
|
||||
}
|
||||
|
||||
virtual ~propagate_ineqs_tactic();
|
||||
~propagate_ineqs_tactic() override;
|
||||
|
||||
virtual void updt_params(params_ref const & p);
|
||||
virtual void collect_param_descrs(param_descrs & r) {}
|
||||
void updt_params(params_ref const & p) override;
|
||||
void collect_param_descrs(param_descrs & r) override {}
|
||||
|
||||
virtual void operator()(goal_ref const & g, goal_ref_buffer & result, model_converter_ref & mc, proof_converter_ref & pc, expr_dependency_ref & core);
|
||||
void operator()(goal_ref const & g, goal_ref_buffer & result, model_converter_ref & mc, proof_converter_ref & pc, expr_dependency_ref & core) override;
|
||||
|
||||
virtual void cleanup();
|
||||
void cleanup() override;
|
||||
};
|
||||
|
||||
tactic * mk_propagate_ineqs_tactic(ast_manager & m, params_ref const & p) {
|
||||
|
|
|
@ -802,18 +802,18 @@ public:
|
|||
m_params(p) {
|
||||
}
|
||||
|
||||
virtual tactic * translate(ast_manager & m) {
|
||||
tactic * translate(ast_manager & m) override {
|
||||
return alloc(purify_arith_tactic, m, m_params);
|
||||
}
|
||||
|
||||
virtual ~purify_arith_tactic() {
|
||||
~purify_arith_tactic() override {
|
||||
}
|
||||
|
||||
virtual void updt_params(params_ref const & p) {
|
||||
void updt_params(params_ref const & p) override {
|
||||
m_params = p;
|
||||
}
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
void collect_param_descrs(param_descrs & r) override {
|
||||
r.insert("complete", CPK_BOOL,
|
||||
"(default: true) add constraints to make sure that any interpretation of a underspecified arithmetic operators is a function. The result will include additional uninterpreted functions/constants: /0, div0, mod0, 0^0, neg-root");
|
||||
r.insert("elim_root_objects", CPK_BOOL,
|
||||
|
@ -823,11 +823,11 @@ public:
|
|||
th_rewriter::get_param_descrs(r);
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
try {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
|
@ -852,7 +852,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual void cleanup() {
|
||||
void cleanup() override {
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -390,29 +390,29 @@ public:
|
|||
m_imp = alloc(imp, m, p);
|
||||
}
|
||||
|
||||
virtual tactic * translate(ast_manager & m) {
|
||||
tactic * translate(ast_manager & m) override {
|
||||
return alloc(recover_01_tactic, m, m_params);
|
||||
}
|
||||
|
||||
virtual ~recover_01_tactic() {
|
||||
~recover_01_tactic() override {
|
||||
dealloc(m_imp);
|
||||
}
|
||||
|
||||
virtual void updt_params(params_ref const & p) {
|
||||
void updt_params(params_ref const & p) override {
|
||||
m_params = p;
|
||||
m_imp->updt_params(p);
|
||||
}
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
void collect_param_descrs(param_descrs & r) override {
|
||||
th_rewriter::get_param_descrs(r);
|
||||
r.insert("recover_01_max_bits", CPK_UINT, "(default: 10) maximum number of bits to consider in a clause.");
|
||||
}
|
||||
|
||||
void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
expr_dependency_ref & core) override {
|
||||
try {
|
||||
(*m_imp)(g, result, mc, pc, core);
|
||||
}
|
||||
|
@ -421,7 +421,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual void cleanup() {
|
||||
void cleanup() override {
|
||||
imp * d = alloc(imp, m_imp->m, m_params);
|
||||
std::swap(d, m_imp);
|
||||
dealloc(d);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue