mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +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
|
@ -345,9 +345,9 @@ extern "C" {
|
|||
public:
|
||||
vector_var2anum(scoped_anum_vector & as):m_as(as) {}
|
||||
virtual ~vector_var2anum() {}
|
||||
virtual algebraic_numbers::manager & m() const { return m_as.m(); }
|
||||
virtual bool contains(polynomial::var x) const { return static_cast<unsigned>(x) < m_as.size(); }
|
||||
virtual algebraic_numbers::anum const & operator()(polynomial::var x) const { return m_as.get(x); }
|
||||
algebraic_numbers::manager & m() const override { return m_as.m(); }
|
||||
bool contains(polynomial::var x) const override { return static_cast<unsigned>(x) < m_as.size(); }
|
||||
algebraic_numbers::anum const & operator()(polynomial::var x) const override { return m_as.get(x); }
|
||||
};
|
||||
|
||||
Z3_ast_vector Z3_API Z3_algebraic_roots(Z3_context c, Z3_ast p, unsigned n, Z3_ast a[]) {
|
||||
|
|
|
@ -25,7 +25,7 @@ struct Z3_ast_map_ref : public api::object {
|
|||
ast_manager & m;
|
||||
obj_map<ast, ast*> m_map;
|
||||
Z3_ast_map_ref(api::context& c, ast_manager & _m): api::object(c), m(_m) {}
|
||||
virtual ~Z3_ast_map_ref();
|
||||
~Z3_ast_map_ref() override;
|
||||
};
|
||||
|
||||
inline Z3_ast_map_ref * to_ast_map(Z3_ast_map v) { return reinterpret_cast<Z3_ast_map_ref *>(v); }
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace api {
|
|||
struct Z3_ast_vector_ref : public api::object {
|
||||
ast_ref_vector m_ast_vector;
|
||||
Z3_ast_vector_ref(api::context& c, ast_manager & m): api::object(c), m_ast_vector(m) {}
|
||||
virtual ~Z3_ast_vector_ref() {}
|
||||
~Z3_ast_vector_ref() override {}
|
||||
};
|
||||
|
||||
inline Z3_ast_vector_ref * to_ast_vector(Z3_ast_vector v) { return reinterpret_cast<Z3_ast_vector_ref *>(v); }
|
||||
|
|
|
@ -51,8 +51,8 @@ namespace api {
|
|||
m_context(m, m_register_engine, p),
|
||||
m_trail(m) {}
|
||||
|
||||
virtual ~fixedpoint_context() {}
|
||||
family_id get_family_id() const { return const_cast<datalog::context&>(m_context).get_decl_util().get_family_id(); }
|
||||
~fixedpoint_context() override {}
|
||||
family_id get_family_id() const override { return const_cast<datalog::context&>(m_context).get_decl_util().get_family_id(); }
|
||||
void set_state(void* state) {
|
||||
SASSERT(!m_state);
|
||||
m_state = state;
|
||||
|
@ -73,7 +73,7 @@ namespace api {
|
|||
void set_reduce_assign(reduce_assign_callback_fptr f) {
|
||||
m_reduce_assign = f;
|
||||
}
|
||||
virtual void reduce(func_decl* f, unsigned num_args, expr * const* args, expr_ref& result) {
|
||||
void reduce(func_decl* f, unsigned num_args, expr * const* args, expr_ref& result) override {
|
||||
expr* r = 0;
|
||||
if (m_reduce_app) {
|
||||
m_reduce_app(m_state, f, num_args, args, &r);
|
||||
|
@ -90,7 +90,7 @@ namespace api {
|
|||
result = m.mk_app(f, num_args, args);
|
||||
}
|
||||
}
|
||||
virtual void reduce_assign(func_decl* f, unsigned num_args, expr * const* args, unsigned num_out, expr* const* outs) {
|
||||
void reduce_assign(func_decl* f, unsigned num_args, expr * const* args, unsigned num_out, expr* const* outs) override {
|
||||
if (m_reduce_assign) {
|
||||
m_trail.push_back(f);
|
||||
for (unsigned i = 0; i < num_args; ++i) {
|
||||
|
|
|
@ -38,7 +38,7 @@ struct Z3_fixedpoint_ref : public api::object {
|
|||
api::fixedpoint_context * m_datalog;
|
||||
params_ref m_params;
|
||||
Z3_fixedpoint_ref(api::context& c): api::object(c), m_datalog(0) {}
|
||||
virtual ~Z3_fixedpoint_ref() { dealloc(m_datalog); }
|
||||
~Z3_fixedpoint_ref() override { dealloc(m_datalog); }
|
||||
};
|
||||
|
||||
inline Z3_fixedpoint_ref * to_fixedpoint(Z3_fixedpoint s) { return reinterpret_cast<Z3_fixedpoint_ref *>(s); }
|
||||
|
|
|
@ -24,7 +24,7 @@ Revision History:
|
|||
struct Z3_goal_ref : public api::object {
|
||||
goal_ref m_goal;
|
||||
Z3_goal_ref(api::context& c) : api::object(c) {}
|
||||
virtual ~Z3_goal_ref() {}
|
||||
~Z3_goal_ref() override {}
|
||||
};
|
||||
|
||||
inline Z3_goal_ref * to_goal(Z3_goal g) { return reinterpret_cast<Z3_goal_ref *>(g); }
|
||||
|
|
|
@ -24,7 +24,7 @@ Revision History:
|
|||
struct Z3_model_ref : public api::object {
|
||||
model_ref m_model;
|
||||
Z3_model_ref(api::context& c): api::object(c) {}
|
||||
virtual ~Z3_model_ref() {}
|
||||
~Z3_model_ref() override {}
|
||||
};
|
||||
|
||||
inline Z3_model_ref * to_model(Z3_model s) { return reinterpret_cast<Z3_model_ref *>(s); }
|
||||
|
@ -35,7 +35,7 @@ struct Z3_func_interp_ref : public api::object {
|
|||
model_ref m_model; // must have it to prevent reference to m_func_interp to be killed.
|
||||
func_interp * m_func_interp;
|
||||
Z3_func_interp_ref(api::context& c, model * m): api::object(c), m_model(m), m_func_interp(0) {}
|
||||
virtual ~Z3_func_interp_ref() {}
|
||||
~Z3_func_interp_ref() override {}
|
||||
};
|
||||
|
||||
inline Z3_func_interp_ref * to_func_interp(Z3_func_interp s) { return reinterpret_cast<Z3_func_interp_ref *>(s); }
|
||||
|
@ -47,7 +47,7 @@ struct Z3_func_entry_ref : public api::object {
|
|||
func_interp * m_func_interp;
|
||||
func_entry const * m_func_entry;
|
||||
Z3_func_entry_ref(api::context& c, model * m):api::object(c), m_model(m), m_func_interp(0), m_func_entry(0) {}
|
||||
virtual ~Z3_func_entry_ref() {}
|
||||
~Z3_func_entry_ref() override {}
|
||||
};
|
||||
|
||||
inline Z3_func_entry_ref * to_func_entry(Z3_func_entry s) { return reinterpret_cast<Z3_func_entry_ref *>(s); }
|
||||
|
|
|
@ -36,7 +36,7 @@ extern "C" {
|
|||
struct Z3_optimize_ref : public api::object {
|
||||
opt::context* m_opt;
|
||||
Z3_optimize_ref(api::context& c): api::object(c), m_opt(0) {}
|
||||
virtual ~Z3_optimize_ref() { dealloc(m_opt); }
|
||||
~Z3_optimize_ref() override { dealloc(m_opt); }
|
||||
};
|
||||
inline Z3_optimize_ref * to_optimize(Z3_optimize o) { return reinterpret_cast<Z3_optimize_ref *>(o); }
|
||||
inline Z3_optimize of_optimize(Z3_optimize_ref * o) { return reinterpret_cast<Z3_optimize>(o); }
|
||||
|
|
|
@ -27,7 +27,7 @@ struct Z3_solver_ref : public api::object {
|
|||
params_ref m_params;
|
||||
symbol m_logic;
|
||||
Z3_solver_ref(api::context& c, solver_factory * f): api::object(c), m_solver_factory(f), m_solver(0), m_logic(symbol::null) {}
|
||||
virtual ~Z3_solver_ref() {}
|
||||
~Z3_solver_ref() override {}
|
||||
};
|
||||
|
||||
inline Z3_solver_ref * to_solver(Z3_solver s) { return reinterpret_cast<Z3_solver_ref *>(s); }
|
||||
|
|
|
@ -24,7 +24,7 @@ Revision History:
|
|||
struct Z3_stats_ref : public api::object {
|
||||
statistics m_stats;
|
||||
Z3_stats_ref(api::context& c): api::object(c) {}
|
||||
virtual ~Z3_stats_ref() {}
|
||||
~Z3_stats_ref() override {}
|
||||
};
|
||||
|
||||
inline Z3_stats_ref * to_stats(Z3_stats s) { return reinterpret_cast<Z3_stats_ref *>(s); }
|
||||
|
|
|
@ -29,13 +29,13 @@ namespace api {
|
|||
struct Z3_tactic_ref : public api::object {
|
||||
tactic_ref m_tactic;
|
||||
Z3_tactic_ref(api::context& c): api::object(c) {}
|
||||
virtual ~Z3_tactic_ref() {}
|
||||
~Z3_tactic_ref() override {}
|
||||
};
|
||||
|
||||
struct Z3_probe_ref : public api::object {
|
||||
probe_ref m_probe;
|
||||
Z3_probe_ref(api::context& c):api::object(c) {}
|
||||
virtual ~Z3_probe_ref() {}
|
||||
~Z3_probe_ref() override {}
|
||||
};
|
||||
|
||||
inline Z3_tactic_ref * to_tactic(Z3_tactic g) { return reinterpret_cast<Z3_tactic_ref *>(g); }
|
||||
|
@ -52,7 +52,7 @@ struct Z3_apply_result_ref : public api::object {
|
|||
proof_converter_ref m_pc;
|
||||
expr_dependency_ref m_core;
|
||||
Z3_apply_result_ref(api::context& c, ast_manager & m);
|
||||
virtual ~Z3_apply_result_ref() {}
|
||||
~Z3_apply_result_ref() override {}
|
||||
};
|
||||
|
||||
inline Z3_apply_result_ref * to_apply_result(Z3_apply_result g) { return reinterpret_cast<Z3_apply_result_ref *>(g); }
|
||||
|
|
|
@ -88,7 +88,7 @@ inline lbool to_lbool(Z3_lbool b) { return static_cast<lbool>(b); }
|
|||
struct Z3_params_ref : public api::object {
|
||||
params_ref m_params;
|
||||
Z3_params_ref(api::context& c): api::object(c) {}
|
||||
virtual ~Z3_params_ref() {}
|
||||
~Z3_params_ref() override {}
|
||||
};
|
||||
|
||||
inline Z3_params_ref * to_params(Z3_params p) { return reinterpret_cast<Z3_params_ref *>(p); }
|
||||
|
@ -98,7 +98,7 @@ inline params_ref to_param_ref(Z3_params p) { return p == 0 ? params_ref() : to_
|
|||
struct Z3_param_descrs_ref : public api::object {
|
||||
param_descrs m_descrs;
|
||||
Z3_param_descrs_ref(api::context& c): api::object(c) {}
|
||||
virtual ~Z3_param_descrs_ref() {}
|
||||
~Z3_param_descrs_ref() override {}
|
||||
};
|
||||
|
||||
inline Z3_param_descrs_ref * to_param_descrs(Z3_param_descrs p) { return reinterpret_cast<Z3_param_descrs_ref *>(p); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue