3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 10:55:50 +00:00

merge with master

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-03-25 14:57:01 -07:00
commit c513f3ca09
883 changed files with 13979 additions and 16480 deletions

View file

@ -43,11 +43,11 @@ public:
m_fn = m.mk_func_decl(symbol(0xbeef101), i_sort, m.mk_bool_sort());
}
virtual tactic * translate(ast_manager & m) {
tactic * translate(ast_manager & m) override {
return alloc(ctx_solver_simplify_tactic, m, m_params);
}
virtual ~ctx_solver_simplify_tactic() {
~ctx_solver_simplify_tactic() override {
obj_map<sort, func_decl*>::iterator it = m_fns.begin(), end = m_fns.end();
for (; it != end; ++it) {
m.dec_ref(it->m_value);
@ -55,29 +55,28 @@ public:
m_fns.reset();
}
virtual void updt_params(params_ref const & p) {
void updt_params(params_ref const & p) override {
m_solver.updt_params(p);
}
virtual void collect_param_descrs(param_descrs & r) {
void collect_param_descrs(param_descrs & r) override {
m_solver.collect_param_descrs(r);
}
virtual void collect_statistics(statistics & st) const {
void collect_statistics(statistics & st) const override {
st.update("solver-simplify-steps", m_num_steps);
}
virtual void reset_statistics() { m_num_steps = 0; }
void reset_statistics() override { m_num_steps = 0; }
virtual void operator()(goal_ref const & in,
goal_ref_buffer & result) {
void operator()(goal_ref const & in,
goal_ref_buffer & result) override {
reduce(*(in.get()));
in->inc_depth();
result.push_back(in.get());
}
virtual void cleanup() {
void cleanup() override {
reset_statistics();
m_solver.reset();
}
@ -123,7 +122,7 @@ protected:
m_solver.pop(1);
});
g.reset();
g.assert_expr(fml, 0, 0);
g.assert_expr(fml, nullptr, nullptr);
IF_VERBOSE(TACTIC_VERBOSITY_LVL, verbose_stream() << "(ctx-solver-simplify :num-steps " << m_num_steps << ")\n";);
SASSERT(g.is_well_sorted());
}
@ -137,7 +136,7 @@ protected:
m_parent(p), m_self(s), m_idx(i), m_expr(e)
{}
expr_pos():
m_parent(0), m_self(0), m_idx(0), m_expr(0)
m_parent(0), m_self(0), m_idx(0), m_expr(nullptr)
{}
};
@ -190,7 +189,7 @@ protected:
a = to_app(e);
sz = a->get_num_args();
n2 = 0;
n2 = nullptr;
for (unsigned i = 0; i < sz; ++i) {
expr* arg = a->get_arg(i);

View file

@ -47,17 +47,17 @@ class smt_tactic : public tactic {
public:
smt_tactic(params_ref const & p):
m_params_ref(p),
m_ctx(0),
m_callback(0) {
m_ctx(nullptr),
m_callback(nullptr) {
updt_params_core(p);
TRACE("smt_tactic", tout << "p: " << p << "\n";);
}
virtual tactic * translate(ast_manager & m) {
tactic * translate(ast_manager & m) override {
return alloc(smt_tactic, m_params_ref);
}
virtual ~smt_tactic() {
~smt_tactic() override {
SASSERT(m_ctx == 0);
}
@ -74,7 +74,7 @@ public:
m_fail_if_inconclusive = p.get_bool("fail_if_inconclusive", true);
}
virtual void updt_params(params_ref const & p) {
void updt_params(params_ref const & p) override {
TRACE("smt_tactic", tout << "updt_params: " << p << "\n";);
updt_params_core(p);
fparams().updt_params(p);
@ -86,7 +86,7 @@ public:
SASSERT(p.get_bool("auto_config", fparams().m_auto_config) == fparams().m_auto_config);
}
virtual void collect_param_descrs(param_descrs & r) {
void collect_param_descrs(param_descrs & r) override {
r.insert("candidate_models", CPK_BOOL, "(default: false) create candidate models even when quantifier or theory reasoning is incomplete.");
r.insert("fail_if_inconclusive", CPK_BOOL, "(default: true) fail if found unsat (sat) for under (over) approximated goal.");
smt_params_helper::collect_param_descrs(r);
@ -94,25 +94,25 @@ public:
}
virtual void collect_statistics(statistics & st) const {
void collect_statistics(statistics & st) const override {
if (m_ctx)
m_ctx->collect_statistics(st); // ctx is still running...
else
st.copy(m_stats);
}
virtual void cleanup() {
void cleanup() override {
}
virtual void reset_statistics() {
void reset_statistics() override {
m_stats.reset();
}
virtual void set_logic(symbol const & l) {
void set_logic(symbol const & l) override {
m_logic = l;
}
virtual void set_progress_callback(progress_callback * callback) {
void set_progress_callback(progress_callback * callback) override {
m_callback = callback;
}
@ -136,7 +136,7 @@ public:
~scoped_init_ctx() {
smt::kernel * d = m_owner.m_ctx;
m_owner.m_ctx = 0;
m_owner.m_ctx = nullptr;
if (d)
dealloc(d);
@ -144,8 +144,8 @@ public:
};
virtual void operator()(goal_ref const & in,
goal_ref_buffer & result) {
void operator()(goal_ref const & in,
goal_ref_buffer & result) override {
try {
IF_VERBOSE(10, verbose_stream() << "(smt.tactic start)\n";);
SASSERT(in->is_well_sorted());
@ -233,8 +233,8 @@ public:
}
// formula is unsat, reset the goal, and store false there.
in->reset();
proof * pr = 0;
expr_dependency * lcore = 0;
proof * pr = nullptr;
expr_dependency * lcore = nullptr;
if (in->proofs_enabled())
pr = m_ctx->get_proof();
if (in->unsat_core_enabled()) {

View file

@ -37,19 +37,19 @@ struct unit_subsumption_tactic : public tactic {
m_clauses(m) {
}
void cleanup() {}
void cleanup() override {}
virtual void operator()(/* in */ goal_ref const & in,
/* out */ goal_ref_buffer & result) {
void operator()(/* in */ goal_ref const & in,
/* out */ goal_ref_buffer & result) override {
reduce_core(in, result);
}
virtual void updt_params(params_ref const& p) {
void updt_params(params_ref const& p) override {
m_params = p;
// m_context.updt_params(p); does not exist.
}
virtual tactic* translate(ast_manager& m) {
tactic* translate(ast_manager& m) override {
return alloc(unit_subsumption_tactic, m, m_params);
}