mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 09:35:32 +00:00
Use nullptr.
This commit is contained in:
parent
f01328c65f
commit
76eb7b9ede
625 changed files with 4639 additions and 4639 deletions
|
@ -30,13 +30,13 @@ class aig_lit {
|
|||
friend class aig_ref;
|
||||
aig * m_ref;
|
||||
public:
|
||||
aig_lit(aig * n = 0):m_ref(n) {}
|
||||
aig_lit(aig * n = nullptr):m_ref(n) {}
|
||||
aig_lit(aig_ref const & r):m_ref(static_cast<aig*>(r.m_ref)) {}
|
||||
bool is_inverted() const { return (reinterpret_cast<size_t>(m_ref) & static_cast<size_t>(1)) == static_cast<size_t>(1); }
|
||||
void invert() { m_ref = reinterpret_cast<aig*>(reinterpret_cast<size_t>(m_ref) ^ static_cast<size_t>(1)); }
|
||||
aig * ptr() const { return reinterpret_cast<aig*>(reinterpret_cast<size_t>(m_ref) & ~static_cast<size_t>(1)); }
|
||||
aig * ptr_non_inverted() const { SASSERT(!is_inverted()); return m_ref; }
|
||||
bool is_null() const { return m_ref == 0; }
|
||||
bool is_null() const { return m_ref == nullptr; }
|
||||
friend bool operator==(aig_lit const & r1, aig_lit const & r2) { return r1.m_ref == r2.m_ref; }
|
||||
friend bool operator!=(aig_lit const & r1, aig_lit const & r2) { return r1.m_ref != r2.m_ref; }
|
||||
aig_lit & operator=(aig_lit const & r) { m_ref = r.m_ref; return *this; }
|
||||
|
@ -151,7 +151,7 @@ struct aig_manager::imp {
|
|||
m_num_aigs--;
|
||||
if (is_var(n)) {
|
||||
m_var_id_gen.recycle(n->m_id);
|
||||
m_var2exprs.set(n->m_id, 0);
|
||||
m_var2exprs.set(n->m_id, nullptr);
|
||||
}
|
||||
else {
|
||||
m_table.erase(n);
|
||||
|
@ -797,7 +797,7 @@ struct aig_manager::imp {
|
|||
m_cache.resize(idx+1);
|
||||
return false;
|
||||
}
|
||||
return m_cache.get(idx) != 0;
|
||||
return m_cache.get(idx) != nullptr;
|
||||
}
|
||||
|
||||
void cache_result(aig * n, expr * t) {
|
||||
|
@ -960,14 +960,14 @@ struct aig_manager::imp {
|
|||
}
|
||||
unsigned idx = to_idx(t);
|
||||
cache.reserve(idx+1);
|
||||
if (cache.get(idx) != 0) {
|
||||
if (cache.get(idx) != nullptr) {
|
||||
todo.pop_back();
|
||||
continue;
|
||||
}
|
||||
bool ok = true;
|
||||
for (unsigned i = 0; i < 2; i++) {
|
||||
aig * c = t->m_children[i].ptr();
|
||||
if (!is_var(c) && cache.get(to_idx(c), 0) == 0) {
|
||||
if (!is_var(c) && cache.get(to_idx(c), nullptr) == nullptr) {
|
||||
todo.push_back(c);
|
||||
ok = false;
|
||||
}
|
||||
|
@ -981,7 +981,7 @@ struct aig_manager::imp {
|
|||
if (is_var(c))
|
||||
args[i] = m.m_var2exprs.get(c->m_id);
|
||||
else
|
||||
args[i] = cache.get(to_idx(c), 0);
|
||||
args[i] = cache.get(to_idx(c), nullptr);
|
||||
if (!l.is_inverted())
|
||||
args[i] = invert(args[i]);
|
||||
}
|
||||
|
@ -1009,16 +1009,16 @@ struct aig_manager::imp {
|
|||
aig_lit n = roots.back();
|
||||
roots.pop_back();
|
||||
if (n.is_inverted()) {
|
||||
g.assert_expr(invert(process_root(n.ptr())), 0, 0);
|
||||
g.assert_expr(invert(process_root(n.ptr())), nullptr, nullptr);
|
||||
continue;
|
||||
}
|
||||
aig * p = n.ptr();
|
||||
if (m.is_ite(p)) {
|
||||
g.assert_expr(process_root(p), 0, 0);
|
||||
g.assert_expr(process_root(p), nullptr, nullptr);
|
||||
continue;
|
||||
}
|
||||
if (is_var(p)) {
|
||||
g.assert_expr(m.var2expr(p), 0, 0);
|
||||
g.assert_expr(m.var2expr(p), nullptr, nullptr);
|
||||
continue;
|
||||
}
|
||||
roots.push_back(left(p));
|
||||
|
@ -1081,7 +1081,7 @@ struct aig_manager::imp {
|
|||
|
||||
bool visit(aig * p) {
|
||||
if (is_var(p)) {
|
||||
push_result(0);
|
||||
push_result(nullptr);
|
||||
return true;
|
||||
}
|
||||
if (is_cached(p))
|
||||
|
@ -1654,8 +1654,8 @@ public:
|
|||
|
||||
|
||||
aig_ref::aig_ref():
|
||||
m_manager(0),
|
||||
m_ref(0) {
|
||||
m_manager(nullptr),
|
||||
m_ref(nullptr) {
|
||||
}
|
||||
|
||||
aig_ref::aig_ref(aig_manager & m, aig_lit const & l):
|
||||
|
@ -1665,15 +1665,15 @@ aig_ref::aig_ref(aig_manager & m, aig_lit const & l):
|
|||
}
|
||||
|
||||
aig_ref::~aig_ref() {
|
||||
if (m_ref != 0) {
|
||||
if (m_ref != nullptr) {
|
||||
m_manager->m_imp->dec_ref(aig_lit(*this));
|
||||
}
|
||||
}
|
||||
|
||||
aig_ref & aig_ref::operator=(aig_ref const & r) {
|
||||
if (r.m_ref != 0)
|
||||
if (r.m_ref != nullptr)
|
||||
r.m_manager->m_imp->inc_ref(aig_lit(r));
|
||||
if (m_ref != 0)
|
||||
if (m_ref != nullptr)
|
||||
m_manager->m_imp->dec_ref(aig_lit(*this));
|
||||
m_ref = r.m_ref;
|
||||
m_manager = r.m_manager;
|
||||
|
|
|
@ -37,12 +37,12 @@ class aig_tactic : public tactic {
|
|||
|
||||
~mk_aig_manager() {
|
||||
dealloc(m_owner.m_aig_manager);
|
||||
m_owner.m_aig_manager = 0;
|
||||
m_owner.m_aig_manager = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
public:
|
||||
aig_tactic(params_ref const & p = params_ref()):m_aig_manager(0) {
|
||||
aig_tactic(params_ref const & p = params_ref()):m_aig_manager(nullptr) {
|
||||
updt_params(p);
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ public:
|
|||
expr_ref new_f(g->m());
|
||||
m_aig_manager->to_formula(r, new_f);
|
||||
expr_dependency * ed = g->dep(i);
|
||||
g->update(i, new_f, 0, ed);
|
||||
g->update(i, new_f, nullptr, ed);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -96,7 +96,7 @@ public:
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
fail_if_proof_generation("aig", g);
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
operator()(g);
|
||||
g->inc_depth();
|
||||
result.push_back(g.get());
|
||||
|
|
|
@ -115,7 +115,7 @@ class add_bounds_tactic : public tactic {
|
|||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
tactic_report report("add-bounds", *g);
|
||||
bound_manager bm(m);
|
||||
expr_fast_mark1 visited;
|
||||
|
|
|
@ -50,7 +50,7 @@ struct arith_bounds_tactic : public tactic {
|
|||
|
||||
void mk_proof(proof_ref& pr, goal_ref const& s, unsigned i, unsigned j) {
|
||||
if (s->proofs_enabled()) {
|
||||
proof* th_lemma = m.mk_th_lemma(a.get_family_id(), m.mk_implies(s->form(i), s->form(j)), 0, 0);
|
||||
proof* th_lemma = m.mk_th_lemma(a.get_family_id(), m.mk_implies(s->form(i), s->form(j)), 0, nullptr);
|
||||
pr = m.mk_modus_ponens(s->pr(i), th_lemma);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -201,22 +201,22 @@ bool bound_manager::is_disjunctive_bound(expr * f, expr_dependency * d) {
|
|||
if (!m().is_or(f)) return false;
|
||||
unsigned sz = to_app(f)->get_num_args();
|
||||
if (sz == 0) return false;
|
||||
expr * x, * y, * v = 0;
|
||||
expr * x, * y, * v = nullptr;
|
||||
bool is_int;
|
||||
for (unsigned i = 0; i < sz; ++i) {
|
||||
expr * e = to_app(f)->get_arg(i);
|
||||
if (!m().is_eq(e, x, y)) return false;
|
||||
if (is_uninterp_const(x) &&
|
||||
is_numeral(y, n, is_int) && is_int &&
|
||||
(x == v || v == 0)) {
|
||||
if (v == 0) { v = x; lo = hi = n; }
|
||||
(x == v || v == nullptr)) {
|
||||
if (v == nullptr) { v = x; lo = hi = n; }
|
||||
if (n < lo) lo = n;
|
||||
if (n > hi) hi = n;
|
||||
}
|
||||
else if (is_uninterp_const(y) &&
|
||||
is_numeral(x, n, is_int) && is_int &&
|
||||
(y == v || v == 0)) {
|
||||
if (v == 0) { v = y; lo = hi = n; }
|
||||
(y == v || v == nullptr)) {
|
||||
if (v == nullptr) { v = y; lo = hi = n; }
|
||||
if (n < lo) lo = n;
|
||||
if (n > hi) hi = n;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
ast_manager & m() const { return m_util.get_manager(); }
|
||||
|
||||
void operator()(goal const & g);
|
||||
void operator()(expr * n, expr_dependency * d = 0);
|
||||
void operator()(expr * n, expr_dependency * d = nullptr);
|
||||
|
||||
bool has_lower(expr * c, numeral & v, bool & strict) const {
|
||||
limit l;
|
||||
|
@ -76,14 +76,14 @@ public:
|
|||
expr_dependency * d;
|
||||
if (m_lower_deps.find(c, d))
|
||||
return d;
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
expr_dependency * upper_dep(expr * c) const {
|
||||
expr_dependency * d;
|
||||
if (m_upper_deps.find(c, d))
|
||||
return d;
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool has_lower(expr * c) const {
|
||||
|
|
|
@ -182,7 +182,7 @@ void bound_propagator::mk_eq(unsigned sz, mpz * as, var * xs) {
|
|||
}
|
||||
|
||||
void bound_propagator::init_eq(linear_equation * eq) {
|
||||
if (eq == 0)
|
||||
if (eq == nullptr)
|
||||
return;
|
||||
unsigned c_idx = m_constraints.size();
|
||||
m_constraints.push_back(constraint());
|
||||
|
@ -383,7 +383,7 @@ bool bound_propagator::relevant_bound(var x, double new_k) const {
|
|||
if (LOWER && has_lower(x)) tout << "old: " << m.to_string(m_lowers[x]->m_k) << " | " << m_lowers[x]->m_approx_k << "\n";
|
||||
if (!LOWER && has_upper(x)) tout << "old: " << m.to_string(m_uppers[x]->m_k) << " | " << m_uppers[x]->m_approx_k << "\n";);
|
||||
bound * b = LOWER ? m_lowers[x] : m_uppers[x];
|
||||
if (b == 0)
|
||||
if (b == nullptr)
|
||||
return true; // variable did not have a bound
|
||||
|
||||
double interval_size;
|
||||
|
@ -537,7 +537,7 @@ bool bound_propagator::propagate_eq(unsigned c_idx) {
|
|||
bound * u_i = m_uppers[x_i];
|
||||
if (a_i < 0.0) {
|
||||
if (!ll_failed) {
|
||||
if (l_i == 0) {
|
||||
if (l_i == nullptr) {
|
||||
if (ll_i == UINT_MAX)
|
||||
ll_i = i;
|
||||
else
|
||||
|
@ -549,7 +549,7 @@ bool bound_propagator::propagate_eq(unsigned c_idx) {
|
|||
}
|
||||
|
||||
if (!uu_failed) {
|
||||
if (u_i == 0) {
|
||||
if (u_i == nullptr) {
|
||||
if (uu_i == UINT_MAX)
|
||||
uu_i = i;
|
||||
else
|
||||
|
@ -562,7 +562,7 @@ bool bound_propagator::propagate_eq(unsigned c_idx) {
|
|||
}
|
||||
else {
|
||||
if (!ll_failed) {
|
||||
if (u_i == 0) {
|
||||
if (u_i == nullptr) {
|
||||
if (ll_i == UINT_MAX)
|
||||
ll_i = i;
|
||||
else
|
||||
|
@ -574,7 +574,7 @@ bool bound_propagator::propagate_eq(unsigned c_idx) {
|
|||
}
|
||||
|
||||
if (!uu_failed) {
|
||||
if (l_i == 0) {
|
||||
if (l_i == nullptr) {
|
||||
if (uu_i == UINT_MAX)
|
||||
uu_i = i;
|
||||
else
|
||||
|
@ -780,7 +780,7 @@ bool bound_propagator::upper(var x, mpq & k, bool & strict, unsigned & ts) const
|
|||
|
||||
bound_propagator::bound * bound_propagator::bound::at(unsigned timestamp) {
|
||||
bound * r = this;
|
||||
while (r != 0 && r->m_timestamp >= timestamp)
|
||||
while (r != nullptr && r->m_timestamp >= timestamp)
|
||||
r = r->m_prev;
|
||||
return r;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ void bv2int_rewriter_ctx::collect_power2(goal const& s) {
|
|||
expr* f = s.form(j);
|
||||
if (!m.is_or(f)) continue;
|
||||
unsigned sz = to_app(f)->get_num_args();
|
||||
expr* x, *y, *v = 0;
|
||||
expr* x, *y, *v = nullptr;
|
||||
rational n;
|
||||
vector<rational> bounds;
|
||||
bool is_int, ok = true;
|
||||
|
@ -50,12 +50,12 @@ void bv2int_rewriter_ctx::collect_power2(goal const& s) {
|
|||
break;
|
||||
}
|
||||
if (arith.is_numeral(y, n, is_int) && is_int &&
|
||||
(x == v || v == 0)) {
|
||||
(x == v || v == nullptr)) {
|
||||
v = x;
|
||||
bounds.push_back(n);
|
||||
}
|
||||
else if (arith.is_numeral(x, n, is_int) && is_int &&
|
||||
(y == v || v == 0)) {
|
||||
(y == v || v == nullptr)) {
|
||||
v = y;
|
||||
bounds.push_back(n);
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ struct bv2int_rewriter_cfg : public default_rewriter_cfg {
|
|||
bool rewrite_patterns() const { return false; }
|
||||
bool flat_assoc(func_decl * f) const { return false; }
|
||||
br_status reduce_app(func_decl * f, unsigned num, expr * const * args, expr_ref & result, proof_ref & result_pr) {
|
||||
result_pr = 0;
|
||||
result_pr = nullptr;
|
||||
return m_r.mk_app_core(f, num, args, result);
|
||||
}
|
||||
bv2int_rewriter_cfg(ast_manager & m, bv2int_rewriter_ctx& ctx):m_r(m, ctx) {}
|
||||
|
|
|
@ -181,7 +181,7 @@ struct bv2real_rewriter_cfg : public default_rewriter_cfg {
|
|||
bool rewrite_patterns() const { return false; }
|
||||
bool flat_assoc(func_decl * f) const { return false; }
|
||||
br_status reduce_app(func_decl * f, unsigned num, expr * const * args, expr_ref & result, proof_ref & result_pr) {
|
||||
result_pr = 0;
|
||||
result_pr = nullptr;
|
||||
return m_r.mk_app_core(f, num, args, result);
|
||||
}
|
||||
bv2real_rewriter_cfg(ast_manager & m, bv2real_util& u):m_r(m, u) {}
|
||||
|
@ -216,7 +216,7 @@ struct bv2real_elim_rewriter_cfg : public default_rewriter_cfg {
|
|||
bool rewrite_patterns() const { return false; }
|
||||
bool flat_assoc(func_decl * f) const { return false; }
|
||||
br_status reduce_app(func_decl * f, unsigned num, expr * const * args, expr_ref & result, proof_ref & result_pr) {
|
||||
result_pr = 0;
|
||||
result_pr = nullptr;
|
||||
return m_r.mk_app_core(f, num, args, result);
|
||||
}
|
||||
bv2real_elim_rewriter_cfg(bv2real_util& u):m_r(u) {}
|
||||
|
|
|
@ -58,7 +58,7 @@ public:
|
|||
expr_dependency_ref & core) override {
|
||||
TRACE("card2bv-before", g->display(tout););
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0; result.reset();
|
||||
mc = nullptr; pc = nullptr; core = nullptr; result.reset();
|
||||
tactic_report report("card2bv", *g);
|
||||
th_rewriter rw1(m, m_params);
|
||||
pb2bv_rewriter rw2(m, m_params);
|
||||
|
|
|
@ -79,7 +79,7 @@ namespace pb {
|
|||
bool rewrite_patterns() const { return false; }
|
||||
bool flat_assoc(func_decl * f) const { return false; }
|
||||
br_status reduce_app(func_decl * f, unsigned num, expr * const * args, expr_ref & result, proof_ref & result_pr) {
|
||||
result_pr = 0;
|
||||
result_pr = nullptr;
|
||||
return m_r.mk_app_core(f, num, args, result);
|
||||
}
|
||||
card2bv_rewriter_cfg(ast_manager & m):m_r(m) {}
|
||||
|
|
|
@ -94,7 +94,7 @@ class degree_shift_tactic : public tactic {
|
|||
m_autil(_m),
|
||||
m_pinned(_m),
|
||||
m_one(1),
|
||||
m_rw(0) {
|
||||
m_rw(nullptr) {
|
||||
}
|
||||
|
||||
|
||||
|
@ -205,8 +205,8 @@ class degree_shift_tactic : public tactic {
|
|||
|
||||
void prepare_substitution(model_converter_ref & mc) {
|
||||
SASSERT(!m_var2degree.empty());
|
||||
filter_model_converter * fmc = 0;
|
||||
extension_model_converter * xmc = 0;
|
||||
filter_model_converter * fmc = nullptr;
|
||||
extension_model_converter * xmc = nullptr;
|
||||
if (m_produce_models) {
|
||||
fmc = alloc(filter_model_converter, m);
|
||||
xmc = alloc(extension_model_converter, m);
|
||||
|
@ -217,7 +217,7 @@ class degree_shift_tactic : public tactic {
|
|||
for (; it != end; ++it) {
|
||||
SASSERT(it->m_value.is_int());
|
||||
SASSERT(it->m_value >= rational(2));
|
||||
app * fresh = m.mk_fresh_const(0, it->m_key->get_decl()->get_range());
|
||||
app * fresh = m.mk_fresh_const(nullptr, it->m_key->get_decl()->get_range());
|
||||
m_pinned.push_back(fresh);
|
||||
m_var2var.insert(it->m_key, fresh);
|
||||
if (m_produce_models) {
|
||||
|
@ -241,7 +241,7 @@ class degree_shift_tactic : public tactic {
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
m_produce_proofs = g->proofs_enabled();
|
||||
m_produce_models = g->models_enabled();
|
||||
tactic_report report("degree_shift", *g);
|
||||
|
@ -275,12 +275,12 @@ class degree_shift_tactic : public tactic {
|
|||
if (it->m_value.is_even()) {
|
||||
app * new_var = m_var2var.find(it->m_key);
|
||||
app * new_c = m_autil.mk_ge(new_var, m_autil.mk_numeral(rational(0), false));
|
||||
proof * new_pr = 0;
|
||||
proof * new_pr = nullptr;
|
||||
if (m_produce_proofs) {
|
||||
proof * pr = m_var2pr.find(it->m_key);
|
||||
new_pr = m.mk_th_lemma(m_autil.get_family_id(), new_c, 1, &pr);
|
||||
}
|
||||
g->assert_expr(new_c, new_pr, 0);
|
||||
g->assert_expr(new_c, new_pr, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -319,7 +319,7 @@ class diff_neq_tactic : public tactic {
|
|||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
m_produce_models = g->models_enabled();
|
||||
mc = 0; pc = 0; core = 0; result.reset();
|
||||
mc = nullptr; pc = nullptr; core = nullptr; result.reset();
|
||||
tactic_report report("diff-neq", *g);
|
||||
fail_if_proof_generation("diff-neq", g);
|
||||
fail_if_unsat_core_generation("diff-neq", g);
|
||||
|
|
|
@ -153,7 +153,7 @@ public:
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
|
||||
tactic_report report("elim01", *g);
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ class eq2bv_tactic : public tactic {
|
|||
bool rewrite_patterns() const { return false; }
|
||||
bool flat_assoc(func_decl * f) const { return false; }
|
||||
br_status reduce_app(func_decl * f, unsigned num, expr * const * args, expr_ref & result, proof_ref & result_pr) {
|
||||
result_pr = 0;
|
||||
result_pr = nullptr;
|
||||
return mk_app_core(f, num, args, result);
|
||||
}
|
||||
eq_rewriter_cfg(eq2bv_tactic& t):m(t.m), t(t) {}
|
||||
|
@ -149,7 +149,7 @@ public:
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
m_trail.reset();
|
||||
m_fd.reset();
|
||||
m_max.reset();
|
||||
|
@ -175,7 +175,7 @@ public:
|
|||
expr_ref new_curr(m);
|
||||
proof_ref new_pr(m);
|
||||
if (is_bound(g->form(i))) {
|
||||
g->update(i, m.mk_true(), 0, 0);
|
||||
g->update(i, m.mk_true(), nullptr, nullptr);
|
||||
continue;
|
||||
}
|
||||
m_rw(g->form(i), new_curr, new_pr);
|
||||
|
|
|
@ -262,7 +262,7 @@ class factor_tactic : public tactic {
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
tactic_report report("factor", *g);
|
||||
bool produce_proofs = g->proofs_enabled();
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class fix_dl_var_tactic : public tactic {
|
|||
m_util(u) {
|
||||
}
|
||||
|
||||
void throw_failed(expr * ctx1, expr * ctx2 = 0) {
|
||||
void throw_failed(expr * ctx1, expr * ctx2 = nullptr) {
|
||||
TRACE("fix_dl_var", tout << mk_ismt2_pp(ctx1, m) << "\n"; if (ctx2) tout << mk_ismt2_pp(ctx2, m) << "\n";);
|
||||
throw failed();
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ class fix_dl_var_tactic : public tactic {
|
|||
}
|
||||
|
||||
app * most_occs(obj_map<app, unsigned> & occs, unsigned & best) {
|
||||
app * r = 0;
|
||||
app * r = nullptr;
|
||||
best = 0;
|
||||
obj_map<app, unsigned>::iterator it = occs.begin();
|
||||
obj_map<app, unsigned>::iterator end = occs.end();
|
||||
|
@ -227,7 +227,7 @@ class fix_dl_var_tactic : public tactic {
|
|||
return most_occs();
|
||||
}
|
||||
catch (failed) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -254,13 +254,13 @@ class fix_dl_var_tactic : public tactic {
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
tactic_report report("fix-dl-var", *g);
|
||||
bool produce_proofs = g->proofs_enabled();
|
||||
m_produce_models = g->models_enabled();
|
||||
|
||||
app * var = is_target(u)(*g);
|
||||
if (var != 0) {
|
||||
if (var != nullptr) {
|
||||
IF_VERBOSE(TACTIC_VERBOSITY_LVL, verbose_stream() << "(fixing-at-zero " << var->get_decl()->get_name() << ")\n";);
|
||||
tactic_report report("fix-dl-var", *g);
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ class fm_tactic : public tactic {
|
|||
bool is_false(model_ref & md, app * p) {
|
||||
SASSERT(is_uninterp_const(p));
|
||||
expr * val = md->get_const_interp(p->get_decl());
|
||||
if (val == 0) {
|
||||
if (val == nullptr) {
|
||||
// if it is don't care, then set to false
|
||||
md->register_decl(p->get_decl(), m.mk_false());
|
||||
return true;
|
||||
|
@ -828,7 +828,7 @@ class fm_tactic : public tactic {
|
|||
reset_constraints();
|
||||
m_bvar2expr.reset();
|
||||
m_bvar2sign.reset();
|
||||
m_bvar2expr.push_back(0); // bvar 0 is not used
|
||||
m_bvar2expr.push_back(nullptr); // bvar 0 is not used
|
||||
m_bvar2sign.push_back(0);
|
||||
m_expr2var.reset();
|
||||
m_is_int.reset();
|
||||
|
@ -838,11 +838,11 @@ class fm_tactic : public tactic {
|
|||
m_expr2var.reset();
|
||||
m_lowers.reset();
|
||||
m_uppers.reset();
|
||||
m_new_goal = 0;
|
||||
m_mc = 0;
|
||||
m_new_goal = nullptr;
|
||||
m_mc = nullptr;
|
||||
m_counter = 0;
|
||||
m_inconsistent = false;
|
||||
m_inconsistent_core = 0;
|
||||
m_inconsistent_core = nullptr;
|
||||
init_forbidden_set(g);
|
||||
}
|
||||
|
||||
|
@ -878,7 +878,7 @@ class fm_tactic : public tactic {
|
|||
// 0 <= 0 -- > true
|
||||
if (c.m_c.is_pos() || (!c.m_strict && c.m_c.is_zero()))
|
||||
return m.mk_true();
|
||||
ineq = 0;
|
||||
ineq = nullptr;
|
||||
}
|
||||
else {
|
||||
bool int_cnstr = all_int(c);
|
||||
|
@ -1115,7 +1115,7 @@ class fm_tactic : public tactic {
|
|||
}
|
||||
else {
|
||||
TRACE("add_constraint_bug", tout << "all variables are forbidden "; display(tout, *c); tout << "\n";);
|
||||
m_new_goal->assert_expr(to_expr(*c), 0, c->m_dep);
|
||||
m_new_goal->assert_expr(to_expr(*c), nullptr, c->m_dep);
|
||||
del_constraint(c);
|
||||
return false;
|
||||
}
|
||||
|
@ -1130,7 +1130,7 @@ class fm_tactic : public tactic {
|
|||
if (is_occ(f))
|
||||
add_constraint(f, g.dep(i));
|
||||
else
|
||||
m_new_goal->assert_expr(f, 0, g.dep(i));
|
||||
m_new_goal->assert_expr(f, nullptr, g.dep(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1367,7 +1367,7 @@ class fm_tactic : public tactic {
|
|||
display(tout, l);
|
||||
tout << "\n";
|
||||
display(tout, u); tout << "\n";);
|
||||
return 0; // no constraint needs to be created.
|
||||
return nullptr; // no constraint needs to be created.
|
||||
}
|
||||
|
||||
new_lits.reset();
|
||||
|
@ -1411,7 +1411,7 @@ class fm_tactic : public tactic {
|
|||
display(tout, l);
|
||||
tout << "\n";
|
||||
display(tout, u); tout << "\n";);
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
expr_dependency * new_dep = m.mk_join(l.m_dep, u.m_dep);
|
||||
|
@ -1423,7 +1423,7 @@ class fm_tactic : public tactic {
|
|||
display(tout, u); tout << "\n";);
|
||||
m_inconsistent = true;
|
||||
m_inconsistent_core = new_dep;
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
constraint * new_cnstr = mk_constraint(new_lits.size(),
|
||||
|
@ -1493,7 +1493,7 @@ class fm_tactic : public tactic {
|
|||
constraint const & l_c = *(l[i]);
|
||||
constraint const & u_c = *(u[j]);
|
||||
constraint * new_c = resolve(l_c, u_c, x);
|
||||
if (new_c != 0) {
|
||||
if (new_c != nullptr) {
|
||||
num_new_cnstrs++;
|
||||
new_constraints.push_back(new_c);
|
||||
}
|
||||
|
@ -1528,7 +1528,7 @@ class fm_tactic : public tactic {
|
|||
c->m_dead = true;
|
||||
expr * new_f = to_expr(*c);
|
||||
TRACE("fm_bug", tout << "asserting...\n" << mk_ismt2_pp(new_f, m) << "\nnew_dep: " << c->m_dep << "\n";);
|
||||
m_new_goal->assert_expr(new_f, 0, c->m_dep);
|
||||
m_new_goal->assert_expr(new_f, nullptr, c->m_dep);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1555,7 +1555,7 @@ class fm_tactic : public tactic {
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
tactic_report report("fm", *g);
|
||||
fail_if_proof_generation("fm", g);
|
||||
m_produce_models = g->models_enabled();
|
||||
|
@ -1571,7 +1571,7 @@ class fm_tactic : public tactic {
|
|||
|
||||
if (m_inconsistent) {
|
||||
m_new_goal->reset();
|
||||
m_new_goal->assert_expr(m.mk_false(), 0, m_inconsistent_core);
|
||||
m_new_goal->assert_expr(m.mk_false(), nullptr, m_inconsistent_core);
|
||||
}
|
||||
else {
|
||||
TRACE("fm", display(tout););
|
||||
|
@ -1595,7 +1595,7 @@ class fm_tactic : public tactic {
|
|||
eliminated++;
|
||||
if (m_inconsistent) {
|
||||
m_new_goal->reset();
|
||||
m_new_goal->assert_expr(m.mk_false(), 0, m_inconsistent_core);
|
||||
m_new_goal->assert_expr(m.mk_false(), nullptr, m_inconsistent_core);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ class lia2card_tactic : public tactic {
|
|||
bool rewrite_patterns() const { return false; }
|
||||
bool flat_assoc(func_decl * f) const { return false; }
|
||||
br_status reduce_app(func_decl * f, unsigned num, expr * const * args, expr_ref & result, proof_ref & result_pr) {
|
||||
result_pr = 0;
|
||||
result_pr = nullptr;
|
||||
return mk_app_core(f, num, args, result);
|
||||
}
|
||||
lia_rewriter_cfg(lia2card_tactic& t):m(t.m), t(t), a(m), args(m) {}
|
||||
|
@ -164,7 +164,7 @@ public:
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
m_01s->reset();
|
||||
|
||||
tactic_report report("cardinality-intro", *g);
|
||||
|
|
|
@ -197,7 +197,7 @@ class lia2pb_tactic : public tactic {
|
|||
fail_if_proof_generation("lia2pb", g);
|
||||
m_produce_models = g->models_enabled();
|
||||
m_produce_unsat_cores = g->unsat_core_enabled();
|
||||
mc = 0; pc = 0; core = 0; result.reset();
|
||||
mc = nullptr; pc = nullptr; core = nullptr; result.reset();
|
||||
tactic_report report("lia2pb", *g);
|
||||
m_bm.reset(); m_rw.reset(); m_new_deps.reset();
|
||||
|
||||
|
@ -224,8 +224,8 @@ class lia2pb_tactic : public tactic {
|
|||
if (!check_num_bits())
|
||||
throw tactic_exception("lia2pb failed, number of necessary bits exceeds specified threshold (use option :lia2pb-total-bits to increase threshold)");
|
||||
|
||||
extension_model_converter * mc1 = 0;
|
||||
filter_model_converter * mc2 = 0;
|
||||
extension_model_converter * mc1 = nullptr;
|
||||
filter_model_converter * mc2 = nullptr;
|
||||
if (m_produce_models) {
|
||||
mc1 = alloc(extension_model_converter, m);
|
||||
mc2 = alloc(filter_model_converter, m);
|
||||
|
@ -251,7 +251,7 @@ class lia2pb_tactic : public tactic {
|
|||
rational a(1);
|
||||
unsigned num_bits = u.get_num_bits();
|
||||
for (unsigned i = 0; i < num_bits; i++) {
|
||||
app * x_prime = m.mk_fresh_const(0, m_util.mk_int());
|
||||
app * x_prime = m.mk_fresh_const(nullptr, m_util.mk_int());
|
||||
g->assert_expr(m_util.mk_le(zero, x_prime));
|
||||
g->assert_expr(m_util.mk_le(x_prime, one));
|
||||
if (a.is_one())
|
||||
|
@ -264,14 +264,14 @@ class lia2pb_tactic : public tactic {
|
|||
}
|
||||
SASSERT(def_args.size() > 1);
|
||||
expr * def = m_util.mk_add(def_args.size(), def_args.c_ptr());
|
||||
expr_dependency * dep = 0;
|
||||
expr_dependency * dep = nullptr;
|
||||
if (m_produce_unsat_cores) {
|
||||
dep = m.mk_join(m_bm.lower_dep(x), m_bm.upper_dep(x));
|
||||
if (dep != 0)
|
||||
if (dep != nullptr)
|
||||
m_new_deps.push_back(dep);
|
||||
}
|
||||
TRACE("lia2pb", tout << mk_ismt2_pp(x, m) << " -> " << dep << "\n";);
|
||||
subst.insert(x, def, 0, dep);
|
||||
subst.insert(x, def, nullptr, dep);
|
||||
if (m_produce_models) {
|
||||
mc1->insert(to_app(x)->get_decl(), def);
|
||||
}
|
||||
|
@ -287,7 +287,7 @@ class lia2pb_tactic : public tactic {
|
|||
unsigned size = g->size();
|
||||
for (unsigned idx = 0; idx < size; idx++) {
|
||||
expr * curr = g->form(idx);
|
||||
expr_dependency * dep = 0;
|
||||
expr_dependency * dep = nullptr;
|
||||
m_rw(curr, new_curr, new_pr);
|
||||
if (m_produce_unsat_cores) {
|
||||
dep = m.mk_join(m_rw.get_used_dependencies(), g->dep(idx));
|
||||
|
|
|
@ -174,7 +174,7 @@ linear_equation * linear_equation_manager::mk(unsigned sz, mpz * as, var * xs, b
|
|||
}
|
||||
sz = j;
|
||||
if (sz <= 1)
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
else {
|
||||
DEBUG_CODE({
|
||||
|
@ -265,7 +265,7 @@ linear_equation * linear_equation_manager::mk(mpz const & b1, linear_equation co
|
|||
m.del(new_a);
|
||||
SASSERT(m_int_buffer.size() == m_var_buffer.size());
|
||||
if (m_int_buffer.empty())
|
||||
return 0;
|
||||
return nullptr;
|
||||
return mk_core(m_int_buffer.size(), m_int_buffer.c_ptr(), m_var_buffer.c_ptr());
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ class nla2bv_tactic : public tactic {
|
|||
m_vars(m),
|
||||
m_defs(m),
|
||||
m_trail(m),
|
||||
m_fmc(0) {
|
||||
m_fmc(nullptr) {
|
||||
m_default_bv_size = m_num_bits = p.get_uint("nla2bv_bv_size", 4);
|
||||
}
|
||||
|
||||
|
@ -408,14 +408,14 @@ class nla2bv_tactic : public tactic {
|
|||
}
|
||||
|
||||
~scoped_set_imp() {
|
||||
m_owner.m_imp = 0;
|
||||
m_owner.m_imp = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
public:
|
||||
nla2bv_tactic(params_ref const & p):
|
||||
m_params(p),
|
||||
m_imp(0) {
|
||||
m_imp(nullptr) {
|
||||
}
|
||||
|
||||
tactic * translate(ast_manager & m) override {
|
||||
|
@ -449,7 +449,7 @@ public:
|
|||
SASSERT(g->is_well_sorted());
|
||||
fail_if_proof_generation("nla2bv", g);
|
||||
fail_if_unsat_core_generation("nla2bv", g);
|
||||
mc = 0; pc = 0; core = 0; result.reset();
|
||||
mc = nullptr; pc = nullptr; core = nullptr; result.reset();
|
||||
|
||||
imp proc(g->m(), m_params);
|
||||
scoped_set_imp setter(*this, proc);
|
||||
|
|
|
@ -85,7 +85,7 @@ class normalize_bounds_tactic : public tactic {
|
|||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
bool produce_models = in->models_enabled();
|
||||
bool produce_proofs = in->proofs_enabled();
|
||||
tactic_report report("normalize-bounds", *in);
|
||||
|
@ -98,8 +98,8 @@ class normalize_bounds_tactic : public tactic {
|
|||
return;
|
||||
}
|
||||
|
||||
extension_model_converter * mc1 = 0;
|
||||
filter_model_converter * mc2 = 0;
|
||||
extension_model_converter * mc1 = nullptr;
|
||||
filter_model_converter * mc2 = nullptr;
|
||||
if (produce_models) {
|
||||
mc1 = alloc(extension_model_converter, m);
|
||||
mc2 = alloc(filter_model_converter, m);
|
||||
|
@ -116,7 +116,7 @@ class normalize_bounds_tactic : public tactic {
|
|||
if (is_target(x, val)) {
|
||||
num_norm_bounds++;
|
||||
sort * s = m.get_sort(x);
|
||||
app * x_prime = m.mk_fresh_const(0, s);
|
||||
app * x_prime = m.mk_fresh_const(nullptr, s);
|
||||
expr * def = m_util.mk_add(x_prime, m_util.mk_numeral(val, s));
|
||||
subst.insert(x, def);
|
||||
if (produce_models) {
|
||||
|
|
|
@ -43,7 +43,7 @@ pb2bv_model_converter::pb2bv_model_converter(ast_manager & _m, obj_map<func_decl
|
|||
if (!c2bit.contains(d)) {
|
||||
SASSERT(d->get_arity() == 0);
|
||||
m.inc_ref(d);
|
||||
m_c2bit.push_back(func_decl_pair(d, static_cast<func_decl*>(0)));
|
||||
m_c2bit.push_back(func_decl_pair(d, static_cast<func_decl*>(nullptr)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ void pb2bv_model_converter::operator()(model_ref & md, unsigned goal_idx) {
|
|||
for (; it != end; ++it) {
|
||||
if (it->second) {
|
||||
expr * val = md->get_const_interp(it->second);
|
||||
if (val == 0 || m.is_false(val)) {
|
||||
if (val == nullptr || m.is_false(val)) {
|
||||
/* false's and don't cares get the integer 0 solution*/
|
||||
md->register_decl(it->first, a_util.mk_numeral(rational(0), true));
|
||||
}
|
||||
|
|
|
@ -216,7 +216,7 @@ private:
|
|||
}
|
||||
|
||||
bool get_subst(expr * s, expr * & t, proof * & t_pr) {
|
||||
t_pr = 0;
|
||||
t_pr = nullptr;
|
||||
if (owner.is_constraint_core(s)) {
|
||||
owner.convert(to_app(s), m_saved_res, true, false);
|
||||
t = m_saved_res;
|
||||
|
@ -328,12 +328,12 @@ private:
|
|||
func_decl * fd = x->get_decl();
|
||||
obj_map<func_decl, expr*> & const2lit = sign ? m_not_const2bit : m_const2bit;
|
||||
|
||||
expr * r = 0;
|
||||
expr * r = nullptr;
|
||||
const2lit.find(fd, r);
|
||||
if (r != 0)
|
||||
if (r != nullptr)
|
||||
return r;
|
||||
|
||||
r = m.mk_fresh_const(0, m.mk_bool_sort());
|
||||
r = m.mk_fresh_const(nullptr, m.mk_bool_sort());
|
||||
expr * not_r = m.mk_not(r);
|
||||
m_const2bit.insert(fd, r);
|
||||
m_not_const2bit.insert(fd, not_r);
|
||||
|
@ -490,7 +490,7 @@ private:
|
|||
for (unsigned j = 0; j < i; j++)
|
||||
m_clause.push_back(monomial(numeral(1), m_p[j].m_lit));
|
||||
|
||||
app * new_var = m.mk_fresh_const(0, m_arith_util.mk_int());
|
||||
app * new_var = m.mk_fresh_const(nullptr, m_arith_util.mk_int());
|
||||
m_temporary_ints.push_back(new_var);
|
||||
|
||||
m_clause.push_back(monomial(numeral(1), lit(new_var, true)));
|
||||
|
@ -895,7 +895,7 @@ private:
|
|||
fail_if_proof_generation("pb2bv", g);
|
||||
m_produce_models = g->models_enabled();
|
||||
m_produce_unsat_cores = g->unsat_core_enabled();
|
||||
mc = 0; pc = 0; core = 0; result.reset();
|
||||
mc = nullptr; pc = nullptr; core = nullptr; result.reset();
|
||||
tactic_report report("pb2bv", *g);
|
||||
m_bm.reset(); m_rw.reset(); m_new_deps.reset();
|
||||
|
||||
|
@ -946,7 +946,7 @@ private:
|
|||
}
|
||||
|
||||
for (unsigned idx = 0; idx < size; idx++)
|
||||
g->update(idx, new_exprs[idx].get(), 0, (m_produce_unsat_cores) ? new_deps[idx].get() : g->dep(idx));
|
||||
g->update(idx, new_exprs[idx].get(), nullptr, (m_produce_unsat_cores) ? new_deps[idx].get() : g->dep(idx));
|
||||
|
||||
if (m_produce_models) {
|
||||
filter_model_converter * mc1 = alloc(filter_model_converter, m);
|
||||
|
|
|
@ -354,7 +354,7 @@ struct propagate_ineqs_tactic::imp {
|
|||
void find_ite_bounds(expr * root) {
|
||||
TRACE("find_ite_bounds_bug", display_bounds(tout););
|
||||
expr * n = root;
|
||||
expr * target = 0;
|
||||
expr * target = nullptr;
|
||||
expr * c, * t, * e;
|
||||
expr * x, * y;
|
||||
bool has_l, has_u;
|
||||
|
@ -374,7 +374,7 @@ struct propagate_ineqs_tactic::imp {
|
|||
break;
|
||||
}
|
||||
else if (is_x_minus_y_eq_0(n, x, y)) {
|
||||
n = 0;
|
||||
n = nullptr;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
|
@ -394,7 +394,7 @@ struct propagate_ineqs_tactic::imp {
|
|||
break;
|
||||
}
|
||||
|
||||
if (target == 0) {
|
||||
if (target == nullptr) {
|
||||
target = x;
|
||||
if (lower(y, curr, curr_strict)) {
|
||||
has_l = true;
|
||||
|
@ -448,7 +448,7 @@ struct propagate_ineqs_tactic::imp {
|
|||
if (!has_l && !has_u)
|
||||
break;
|
||||
|
||||
if (n == 0) {
|
||||
if (n == nullptr) {
|
||||
TRACE("find_ite_bounds", tout << "found bounds for: " << mk_ismt2_pp(target, m) << "\n";
|
||||
tout << "has_l: " << has_l << " " << nm.to_string(l_min) << " l_strict: " << l_strict << "\n";
|
||||
tout << "has_u: " << has_u << " " << nm.to_string(u_max) << " u_strict: " << u_strict << "\n";
|
||||
|
@ -484,7 +484,7 @@ struct propagate_ineqs_tactic::imp {
|
|||
m_new_goal->inc_depth();
|
||||
r = m_new_goal.get();
|
||||
if (!collect_bounds(*g)) {
|
||||
m_new_goal = 0;
|
||||
m_new_goal = nullptr;
|
||||
r = g;
|
||||
return; // nothing to be done
|
||||
}
|
||||
|
@ -534,7 +534,7 @@ void propagate_ineqs_tactic::operator()(goal_ref const & g,
|
|||
SASSERT(g->is_well_sorted());
|
||||
fail_if_proof_generation("propagate-ineqs", g);
|
||||
fail_if_unsat_core_generation("propagate-ineqs", g);
|
||||
mc = 0; pc = 0; core = 0; result.reset();
|
||||
mc = nullptr; pc = nullptr; core = nullptr; result.reset();
|
||||
goal_ref r;
|
||||
(*m_imp)(g.get(), r);
|
||||
result.push_back(r.get());
|
||||
|
|
|
@ -170,8 +170,8 @@ struct purify_arith_proc {
|
|||
}
|
||||
std::pair<expr*, expr*> pair;
|
||||
if (!m_sin_cos.find(to_app(theta), pair)) {
|
||||
pair.first = m().mk_fresh_const(0, u().mk_real());
|
||||
pair.second = m().mk_fresh_const(0, u().mk_real());
|
||||
pair.first = m().mk_fresh_const(nullptr, u().mk_real());
|
||||
pair.second = m().mk_fresh_const(nullptr, u().mk_real());
|
||||
m_sin_cos.insert(to_app(theta), pair);
|
||||
m_pinned.push_back(pair.first);
|
||||
m_pinned.push_back(pair.second);
|
||||
|
@ -214,7 +214,7 @@ struct purify_arith_proc {
|
|||
bool elim_inverses() const { return m_owner.m_elim_inverses; }
|
||||
|
||||
expr * mk_fresh_var(bool is_int) {
|
||||
expr * r = m().mk_fresh_const(0, is_int ? u().mk_int() : u().mk_real());
|
||||
expr * r = m().mk_fresh_const(nullptr, is_int ? u().mk_int() : u().mk_real());
|
||||
m_new_vars.push_back(r);
|
||||
return r;
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ struct purify_arith_proc {
|
|||
}
|
||||
|
||||
void mk_def_proof(expr * k, expr * def, proof_ref & result_pr) {
|
||||
result_pr = 0;
|
||||
result_pr = nullptr;
|
||||
if (produce_proofs()) {
|
||||
expr * eq = m().mk_eq(k, def);
|
||||
proof * pr1 = m().mk_def_intro(eq);
|
||||
|
@ -691,7 +691,7 @@ struct purify_arith_proc {
|
|||
};
|
||||
|
||||
void process_quantifier(quantifier * q, expr_ref & result, proof_ref & result_pr) {
|
||||
result_pr = 0;
|
||||
result_pr = nullptr;
|
||||
rw r(*this);
|
||||
expr_ref new_body(m());
|
||||
proof_ref new_body_pr(m());
|
||||
|
@ -761,7 +761,7 @@ struct purify_arith_proc {
|
|||
sz = r.cfg().m_new_cnstrs.size();
|
||||
TRACE("purify_arith", tout << r.cfg().m_new_cnstrs << "\n";);
|
||||
for (unsigned i = 0; i < sz; i++) {
|
||||
m_goal.assert_expr(r.cfg().m_new_cnstrs.get(i), m_produce_proofs ? r.cfg().m_new_cnstr_prs.get(i) : 0, 0);
|
||||
m_goal.assert_expr(r.cfg().m_new_cnstrs.get(i), m_produce_proofs ? r.cfg().m_new_cnstr_prs.get(i) : nullptr, nullptr);
|
||||
}
|
||||
|
||||
// add filter_model_converter to eliminate auxiliary variables from model
|
||||
|
@ -830,7 +830,7 @@ public:
|
|||
expr_dependency_ref & core) override {
|
||||
try {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
tactic_report report("purify-arith", *g);
|
||||
TRACE("purify_arith", g->display(tout););
|
||||
bool produce_proofs = g->proofs_enabled();
|
||||
|
|
|
@ -70,7 +70,7 @@ class recover_01_tactic : public tactic {
|
|||
bool save_clause(expr * c) {
|
||||
if (!m.is_or(c))
|
||||
return false;
|
||||
func_decl * x = 0;
|
||||
func_decl * x = nullptr;
|
||||
app * cls = to_app(c);
|
||||
if (cls->get_num_args() <= 1 || cls->get_num_args() >= m_cls_max_size)
|
||||
return false;
|
||||
|
@ -84,7 +84,7 @@ class recover_01_tactic : public tactic {
|
|||
else if (m.is_not(lit, arg) && is_uninterp_const(arg)) {
|
||||
// negative literal
|
||||
}
|
||||
else if (x == 0 && m.is_eq(lit, lhs, rhs)) {
|
||||
else if (x == nullptr && m.is_eq(lit, lhs, rhs)) {
|
||||
// x = k literal
|
||||
if (is_uninterp_const(lhs) && m_util.is_numeral(rhs)) {
|
||||
x = to_app(lhs)->get_decl();
|
||||
|
@ -101,7 +101,7 @@ class recover_01_tactic : public tactic {
|
|||
}
|
||||
}
|
||||
|
||||
if (x != 0) {
|
||||
if (x != nullptr) {
|
||||
var2clauses::obj_map_entry * entry = m_var2clauses.insert_if_not_there2(x, ptr_vector<app>());
|
||||
if (entry->get_data().m_value.empty() || entry->get_data().m_value.back()->get_num_args() == cls->get_num_args()) {
|
||||
entry->get_data().m_value.push_back(cls);
|
||||
|
@ -134,7 +134,7 @@ class recover_01_tactic : public tactic {
|
|||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Find coeff (the k of literal (x = k)) of clause cls.
|
||||
|
@ -199,7 +199,7 @@ class recover_01_tactic : public tactic {
|
|||
SASSERT(is_uninterp_const(atom));
|
||||
expr * var;
|
||||
if (!bool2int.find(atom, var)) {
|
||||
var = m.mk_fresh_const(0, m_util.mk_int());
|
||||
var = m.mk_fresh_const(nullptr, m_util.mk_int());
|
||||
new_goal->assert_expr(m_util.mk_le(m_util.mk_numeral(rational(0), true), var));
|
||||
new_goal->assert_expr(m_util.mk_le(var, m_util.mk_numeral(rational(1), true)));
|
||||
expr * bool_def = m.mk_eq(var, m_util.mk_numeral(rational(1), true));
|
||||
|
@ -225,7 +225,7 @@ class recover_01_tactic : public tactic {
|
|||
if (clauses.size() < expected_num_clauses) // using < instead of != because we tolerate duplicates
|
||||
return false;
|
||||
app * zero_cls = find_zero_cls(x, clauses);
|
||||
if (zero_cls == 0)
|
||||
if (zero_cls == nullptr)
|
||||
return false;
|
||||
|
||||
buffer<bool> found; // marks which idx were found
|
||||
|
@ -302,7 +302,7 @@ class recover_01_tactic : public tactic {
|
|||
fail_if_proof_generation("recover-01", g);
|
||||
fail_if_unsat_core_generation("recover-01", g);
|
||||
m_produce_models = g->models_enabled();
|
||||
mc = 0; pc = 0; core = 0; result.reset();
|
||||
mc = nullptr; pc = nullptr; core = nullptr; result.reset();
|
||||
tactic_report report("recover-01", *g);
|
||||
|
||||
bool saved = false;
|
||||
|
@ -357,7 +357,7 @@ class recover_01_tactic : public tactic {
|
|||
|
||||
if (!recovered) {
|
||||
result.push_back(g.get());
|
||||
mc = 0;
|
||||
mc = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ struct bit_blaster_model_converter : public model_converter {
|
|||
func_decl * bit_decl = to_app(bit)->get_decl();
|
||||
expr * bit_val = old_model->get_const_interp(bit_decl);
|
||||
// remark: if old_model does not assign bit_val, then assume it is false.
|
||||
if (bit_val != 0 && m().is_true(bit_val))
|
||||
if (bit_val != nullptr && m().is_true(bit_val))
|
||||
val++;
|
||||
}
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ struct bit_blaster_model_converter : public model_converter {
|
|||
func_decl * bit_decl = to_app(bit)->get_decl();
|
||||
expr * bit_val = old_model->get_const_interp(bit_decl);
|
||||
// remark: if old_model does not assign bit_val, then assume it is false.
|
||||
if (bit_val != 0 && !util.is_zero(bit_val))
|
||||
if (bit_val != nullptr && !util.is_zero(bit_val))
|
||||
val++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ class bit_blaster_tactic : public tactic {
|
|||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
bool proofs_enabled = g->proofs_enabled();
|
||||
|
||||
if (proofs_enabled && m_blast_quant)
|
||||
|
@ -90,7 +90,7 @@ class bit_blaster_tactic : public tactic {
|
|||
if (change && g->models_enabled())
|
||||
mc = mk_bit_blaster_model_converter(m(), m_rewriter->const2bits());
|
||||
else
|
||||
mc = 0;
|
||||
mc = nullptr;
|
||||
g->inc_depth();
|
||||
result.push_back(g.get());
|
||||
TRACE("after_bit_blaster", g->display(tout); if (mc) mc->display(tout); tout << "\n";);
|
||||
|
@ -113,7 +113,7 @@ public:
|
|||
|
||||
tactic * translate(ast_manager & m) override {
|
||||
SASSERT(!m_rewriter); // assume translation isn't used where rewriter is external.
|
||||
return alloc(bit_blaster_tactic, m, 0, m_params);
|
||||
return alloc(bit_blaster_tactic, m, nullptr, m_params);
|
||||
}
|
||||
|
||||
~bit_blaster_tactic() override {
|
||||
|
@ -161,7 +161,7 @@ public:
|
|||
|
||||
|
||||
tactic * mk_bit_blaster_tactic(ast_manager & m, params_ref const & p) {
|
||||
return clean(alloc(bit_blaster_tactic, m, 0, p));
|
||||
return clean(alloc(bit_blaster_tactic, m, nullptr, p));
|
||||
}
|
||||
|
||||
tactic * mk_bit_blaster_tactic(ast_manager & m, bit_blaster_rewriter* rw, params_ref const & p) {
|
||||
|
|
|
@ -106,7 +106,7 @@ class bv1_blaster_tactic : public tactic {
|
|||
sort * b = butil().mk_sort(1);
|
||||
ptr_buffer<expr> bits;
|
||||
for (unsigned i = 0; i < bv_size; i++) {
|
||||
bits.push_back(m().mk_fresh_const(0, b));
|
||||
bits.push_back(m().mk_fresh_const(nullptr, b));
|
||||
}
|
||||
r = butil().mk_concat(bits.size(), bits.c_ptr());
|
||||
m_saved.push_back(r);
|
||||
|
@ -253,7 +253,7 @@ class bv1_blaster_tactic : public tactic {
|
|||
}
|
||||
|
||||
br_status reduce_app(func_decl * f, unsigned num, expr * const * args, expr_ref & result, proof_ref & result_pr) {
|
||||
result_pr = 0;
|
||||
result_pr = nullptr;
|
||||
if (num == 0 && f->get_family_id() == null_family_id && butil().is_bv_sort(f->get_range())) {
|
||||
mk_const(f, result);
|
||||
return BR_DONE;
|
||||
|
@ -383,7 +383,7 @@ class bv1_blaster_tactic : public tactic {
|
|||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
|
||||
if (!is_target(*g))
|
||||
throw tactic_exception("bv1 blaster cannot be applied to goal");
|
||||
|
|
|
@ -68,7 +68,7 @@ struct bv_bound_chk_rewriter_cfg : public default_rewriter_cfg {
|
|||
}
|
||||
|
||||
br_status reduce_app_core(func_decl * f, unsigned num, expr * const * args, expr_ref & result, proof_ref & result_pr) {
|
||||
result_pr = 0;
|
||||
result_pr = nullptr;
|
||||
const family_id fid = f->get_family_id();
|
||||
if (fid != m_b_rw.get_fid()) return BR_FAILED;
|
||||
bv_bounds bvb(m());
|
||||
|
@ -206,7 +206,7 @@ void bv_bound_chk_tactic::operator()(goal_ref const & g,
|
|||
fail_if_proof_generation("bv-bound-chk", g);
|
||||
fail_if_unsat_core_generation("bv-bound-chk", g);
|
||||
TRACE("bv-bound-chk", g->display(tout << "before:"); tout << std::endl;);
|
||||
mc = 0; pc = 0; core = 0; result.reset();
|
||||
mc = nullptr; pc = nullptr; core = nullptr; result.reset();
|
||||
m_imp->operator()(g);
|
||||
g->inc_depth();
|
||||
result.push_back(g.get());
|
||||
|
|
|
@ -194,7 +194,7 @@ namespace {
|
|||
|
||||
bool is_bound(expr *e, expr*& v, interval& b) const {
|
||||
uint64 n;
|
||||
expr *lhs = 0, *rhs = 0;
|
||||
expr *lhs = nullptr, *rhs = nullptr;
|
||||
unsigned sz;
|
||||
|
||||
if (m_bv.is_bv_ule(e, lhs, rhs)) {
|
||||
|
@ -382,7 +382,7 @@ namespace {
|
|||
}
|
||||
|
||||
interval ctx, intr;
|
||||
result = 0;
|
||||
result = nullptr;
|
||||
|
||||
if (b.is_full() && b.tight) {
|
||||
result = m.mk_true();
|
||||
|
@ -561,7 +561,7 @@ namespace {
|
|||
|
||||
bool is_bound(expr *e, expr*& v, interval& b) const {
|
||||
uint64 n;
|
||||
expr *lhs = 0, *rhs = 0;
|
||||
expr *lhs = nullptr, *rhs = nullptr;
|
||||
unsigned sz = 0;
|
||||
|
||||
if (m_bv.is_bv_ule(e, lhs, rhs)) {
|
||||
|
|
|
@ -184,8 +184,8 @@ struct bv_size_reduction_tactic::imp {
|
|||
return;
|
||||
TRACE("before_bv_size_reduction", g.display(tout););
|
||||
m_produce_models = g.models_enabled();
|
||||
mc = 0;
|
||||
m_mc = 0;
|
||||
mc = nullptr;
|
||||
m_mc = nullptr;
|
||||
unsigned num_reduced = 0;
|
||||
{
|
||||
tactic_report report("bv-size-reduction", g);
|
||||
|
@ -211,11 +211,11 @@ struct bv_size_reduction_tactic::imp {
|
|||
unsigned bv_sz = m_util.get_bv_size(v);
|
||||
numeral l = m_util.norm(it->m_value, bv_sz, true);
|
||||
obj_map<app, numeral>::obj_map_entry * entry = m_signed_uppers.find_core(v);
|
||||
if (entry != 0) {
|
||||
if (entry != nullptr) {
|
||||
numeral u = m_util.norm(entry->get_data().m_value, bv_sz, true);
|
||||
TRACE("bv_size_reduction", tout << l << " <= " << v->get_decl()->get_name() << " <= " << u << "\n";);
|
||||
expr * new_def = 0;
|
||||
app * new_const = 0;
|
||||
expr * new_def = nullptr;
|
||||
app * new_const = nullptr;
|
||||
if (l > u) {
|
||||
g.assert_expr(m.mk_false());
|
||||
return;
|
||||
|
@ -235,7 +235,7 @@ struct bv_size_reduction_tactic::imp {
|
|||
unsigned i_nb = l_nb;
|
||||
TRACE("bv_size_reduction", tout << " l <= " << v->get_decl()->get_name() << " <= u <= 0 " << " --> " << i_nb << " bits\n";);
|
||||
if (i_nb < v_nb) {
|
||||
new_const = m.mk_fresh_const(0, m_util.mk_sort(i_nb));
|
||||
new_const = m.mk_fresh_const(nullptr, m_util.mk_sort(i_nb));
|
||||
new_def = m_util.mk_concat(m_util.mk_numeral(numeral(-1), v_nb - i_nb), new_const);
|
||||
}
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ struct bv_size_reduction_tactic::imp {
|
|||
unsigned i_nb = ((l_nb > u_nb) ? l_nb : u_nb) + 1;
|
||||
TRACE("bv_size_reduction", tout << " l <= " << v->get_decl()->get_name() << " <= 0 <= u " << " --> " << i_nb << " bits\n";);
|
||||
if (i_nb < v_nb) {
|
||||
new_const = m.mk_fresh_const(0, m_util.mk_sort(i_nb));
|
||||
new_const = m.mk_fresh_const(nullptr, m_util.mk_sort(i_nb));
|
||||
new_def = m_util.mk_sign_extend(v_nb - i_nb, new_const);
|
||||
}
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ struct bv_size_reduction_tactic::imp {
|
|||
unsigned v_nb = m_util.get_bv_size(v);
|
||||
TRACE("bv_size_reduction", tout << l << " <= " << v->get_decl()->get_name() << " <= " << u << " --> " << u_nb << " bits\n";);
|
||||
if (u_nb < v_nb) {
|
||||
new_const = m.mk_fresh_const(0, m_util.mk_sort(u_nb));
|
||||
new_const = m.mk_fresh_const(nullptr, m_util.mk_sort(u_nb));
|
||||
new_def = m_util.mk_concat(m_util.mk_numeral(numeral(0), v_nb - u_nb), new_const);
|
||||
}
|
||||
}
|
||||
|
@ -365,8 +365,8 @@ struct bv_size_reduction_tactic::imp {
|
|||
if (m_fmc) {
|
||||
mc = concat(m_fmc.get(), mc.get());
|
||||
}
|
||||
m_mc = 0;
|
||||
m_fmc = 0;
|
||||
m_mc = nullptr;
|
||||
m_fmc = nullptr;
|
||||
}
|
||||
report_tactic_progress(":bv-reduced", num_reduced);
|
||||
TRACE("after_bv_size_reduction", g.display(tout); if (m_mc) m_mc->display(tout););
|
||||
|
@ -390,7 +390,7 @@ void bv_size_reduction_tactic::operator()(goal_ref const & g,
|
|||
SASSERT(g->is_well_sorted());
|
||||
fail_if_proof_generation("bv-size-reduction", g);
|
||||
fail_if_unsat_core_generation("bv-size-reduction", g);
|
||||
mc = 0; pc = 0; core = 0; result.reset();
|
||||
mc = nullptr; pc = nullptr; core = nullptr; result.reset();
|
||||
m_imp->operator()(*(g.get()), mc);
|
||||
g->inc_depth();
|
||||
result.push_back(g.get());
|
||||
|
|
|
@ -37,8 +37,8 @@ bvarray2uf_rewriter_cfg::bvarray2uf_rewriter_cfg(ast_manager & m, params_ref con
|
|||
m_bindings(m),
|
||||
m_bv_util(m),
|
||||
m_array_util(m),
|
||||
m_emc(0),
|
||||
m_fmc(0),
|
||||
m_emc(nullptr),
|
||||
m_fmc(nullptr),
|
||||
extra_assertions(m) {
|
||||
updt_params(p);
|
||||
// We need to make sure that the mananger has the BV and array plugins loaded.
|
||||
|
@ -108,7 +108,7 @@ func_decl_ref bvarray2uf_rewriter_cfg::mk_uf_for_array(expr * e) {
|
|||
if (m_array_util.is_as_array(e))
|
||||
return func_decl_ref(static_cast<func_decl*>(to_app(e)->get_decl()->get_parameter(0).get_ast()), m_manager);
|
||||
else {
|
||||
func_decl * bv_f = 0;
|
||||
func_decl * bv_f = nullptr;
|
||||
if (!m_arrays_fs.find(e, bv_f)) {
|
||||
sort * domain = get_index_sort(e);
|
||||
sort * range = get_value_sort(e);
|
||||
|
@ -184,7 +184,7 @@ br_status bvarray2uf_rewriter_cfg::reduce_app(func_decl * f, unsigned num, expr
|
|||
func_decl_ref itefd(m_manager);
|
||||
e = m_manager.mk_ite(c, f_ta, f_fa);
|
||||
|
||||
func_decl * bv_f = 0;
|
||||
func_decl * bv_f = nullptr;
|
||||
if (!m_arrays_fs.find(f_a, bv_f)) {
|
||||
sort * domain = get_index_sort(args[1]);
|
||||
sort * range = get_value_sort(args[1]);
|
||||
|
|
|
@ -61,7 +61,7 @@ class bvarray2uf_tactic : public tactic {
|
|||
{
|
||||
SASSERT(g->is_well_sorted());
|
||||
tactic_report report("bvarray2uf", *g);
|
||||
mc = 0; pc = 0; core = 0; result.reset();
|
||||
mc = nullptr; pc = nullptr; core = nullptr; result.reset();
|
||||
fail_if_unsat_core_generation("bvarray2uf", g);
|
||||
|
||||
TRACE("bvarray2uf", tout << "Before: " << std::endl; g->display(tout); );
|
||||
|
|
|
@ -122,7 +122,7 @@ public:
|
|||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
bool produce_proofs = g->proofs_enabled();
|
||||
tactic_report report("dt2bv", *g);
|
||||
unsigned size = g->size();
|
||||
|
|
|
@ -52,7 +52,7 @@ class elim_small_bv_tactic : public tactic {
|
|||
m_bindings(_m),
|
||||
m_num_eliminated(0) {
|
||||
updt_params(p);
|
||||
m_goal = 0;
|
||||
m_goal = nullptr;
|
||||
m_max_steps = UINT_MAX;
|
||||
}
|
||||
|
||||
|
@ -77,13 +77,13 @@ class elim_small_bv_tactic : public tactic {
|
|||
expr_ref res(m);
|
||||
expr_ref_vector substitution(m);
|
||||
|
||||
substitution.resize(num_decls, 0);
|
||||
substitution.resize(num_decls, nullptr);
|
||||
substitution[num_decls - idx - 1] = replacement;
|
||||
|
||||
// (VAR 0) is in the first position of substitution; (VAR num_decls-1) is in the last position.
|
||||
|
||||
for (unsigned i = 0; i < max_var_idx_p1; i++)
|
||||
substitution.push_back(0);
|
||||
substitution.push_back(nullptr);
|
||||
|
||||
// (VAR num_decls) ... (VAR num_decls+sz-1); are in positions num_decls .. num_decls+sz-1
|
||||
|
||||
|
@ -175,7 +175,7 @@ class elim_small_bv_tactic : public tactic {
|
|||
|
||||
TRACE("elim_small_bv", tout << "elimination result: " << mk_ismt2_pp(result, m) << std::endl; );
|
||||
|
||||
result_pr = 0; // proofs NIY
|
||||
result_pr = nullptr; // proofs NIY
|
||||
m_bindings.shrink(old_sz);
|
||||
return true;
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ class elim_small_bv_tactic : public tactic {
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
tactic_report report("elim-small-bv", *g);
|
||||
bool produce_proofs = g->proofs_enabled();
|
||||
fail_if_proof_generation("elim-small-bv", g);
|
||||
|
|
|
@ -84,7 +84,7 @@ class max_bv_sharing_tactic : public tactic {
|
|||
return m().mk_app(f, arg1, arg2);
|
||||
if (s.contains(expr_pair(arg2, arg1)))
|
||||
return m().mk_app(f, arg2, arg1);
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
struct ref_count_lt {
|
||||
|
@ -106,10 +106,10 @@ class max_bv_sharing_tactic : public tactic {
|
|||
|
||||
ptr_buffer<expr, 128> _args;
|
||||
bool first = false;
|
||||
expr * num = 0;
|
||||
expr * num = nullptr;
|
||||
for (unsigned i = 0; i < num_args; i++) {
|
||||
expr * arg = args[i];
|
||||
if (num == 0 && m_util.is_numeral(arg)) {
|
||||
if (num == nullptr && m_util.is_numeral(arg)) {
|
||||
if (i == 0) first = true;
|
||||
num = arg;
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ class max_bv_sharing_tactic : public tactic {
|
|||
for (unsigned i = 0; i < num_args - 1; i++) {
|
||||
for (unsigned j = i + 1; j < num_args; j++) {
|
||||
expr * r = reuse(s, f, _args[i], _args[j]);
|
||||
if (r != 0) {
|
||||
if (r != nullptr) {
|
||||
TRACE("bv_sharing_detail", tout << "reusing args: " << i << " " << j << "\n";);
|
||||
_args[i] = r;
|
||||
SASSERT(num_args > 1);
|
||||
|
@ -186,7 +186,7 @@ class max_bv_sharing_tactic : public tactic {
|
|||
}
|
||||
num_args = j;
|
||||
if (num_args == 1) {
|
||||
if (num == 0) {
|
||||
if (num == nullptr) {
|
||||
result = _args[0];
|
||||
}
|
||||
else {
|
||||
|
@ -209,7 +209,7 @@ class max_bv_sharing_tactic : public tactic {
|
|||
case OP_BMUL:
|
||||
case OP_BOR:
|
||||
case OP_BXOR:
|
||||
result_pr = 0;
|
||||
result_pr = nullptr;
|
||||
return reduce_ac_app(f, num, args, result);
|
||||
default:
|
||||
return BR_FAILED;
|
||||
|
@ -242,7 +242,7 @@ class max_bv_sharing_tactic : public tactic {
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
tactic_report report("max-bv-sharing", *g);
|
||||
bool produce_proofs = g->proofs_enabled();
|
||||
|
||||
|
|
|
@ -84,11 +84,11 @@ protected:
|
|||
|
||||
template<typename T2>
|
||||
T * translate_core(ast_translation & translator) {
|
||||
T * t1 = m_c1 ? m_c1->translate(translator) : 0;
|
||||
T * t1 = m_c1 ? m_c1->translate(translator) : nullptr;
|
||||
ptr_buffer<T> t2s;
|
||||
unsigned num = m_c2s.size();
|
||||
for (unsigned i = 0; i < num; i++)
|
||||
t2s.push_back(m_c2s[i] ? m_c2s[i]->translate(translator) : 0);
|
||||
t2s.push_back(m_c2s[i] ? m_c2s[i]->translate(translator) : nullptr);
|
||||
return alloc(T2, t1, num, t2s.c_ptr(), m_szs.c_ptr());
|
||||
}
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ class blast_term_ite_tactic : public tactic {
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
tactic_report report("blast-term-ite", *g);
|
||||
bool produce_proofs = g->proofs_enabled();
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ struct cofactor_elim_term_ite::imp {
|
|||
break;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -286,7 +286,7 @@ struct cofactor_elim_term_ite::imp {
|
|||
break;
|
||||
}
|
||||
}
|
||||
expr * best = 0;
|
||||
expr * best = nullptr;
|
||||
unsigned best_occs = 0;
|
||||
obj_map<expr, unsigned>::iterator it = occs.begin();
|
||||
obj_map<expr, unsigned>::iterator end = occs.end();
|
||||
|
@ -329,7 +329,7 @@ struct cofactor_elim_term_ite::imp {
|
|||
bool m_strict_upper;
|
||||
app * m_upper;
|
||||
|
||||
cofactor_rw_cfg(ast_manager & _m, imp & owner, obj_hashtable<expr> * has_term_ite = 0):
|
||||
cofactor_rw_cfg(ast_manager & _m, imp & owner, obj_hashtable<expr> * has_term_ite = nullptr):
|
||||
m(_m),
|
||||
m_owner(owner),
|
||||
m_has_term_ite(has_term_ite),
|
||||
|
@ -349,13 +349,13 @@ struct cofactor_elim_term_ite::imp {
|
|||
if (m.is_not(t)) {
|
||||
m_atom = to_app(t)->get_arg(0);
|
||||
m_sign = true;
|
||||
m_term = 0;
|
||||
m_term = nullptr;
|
||||
// TODO: bounds
|
||||
}
|
||||
else {
|
||||
m_atom = t;
|
||||
m_sign = false;
|
||||
m_term = 0;
|
||||
m_term = nullptr;
|
||||
expr * lhs;
|
||||
expr * rhs;
|
||||
if (m_owner.m_cofactor_equalities && m.is_eq(t, lhs, rhs)) {
|
||||
|
@ -377,19 +377,19 @@ struct cofactor_elim_term_ite::imp {
|
|||
bool rewrite_patterns() const { return false; }
|
||||
|
||||
br_status reduce_app(func_decl * f, unsigned num, expr * const * args, expr_ref & result, proof_ref & result_pr) {
|
||||
result_pr = 0;
|
||||
result_pr = nullptr;
|
||||
return m_mk_app.mk_core(f, num, args, result);
|
||||
}
|
||||
|
||||
bool get_subst(expr * s, expr * & t, proof * & pr) {
|
||||
pr = 0;
|
||||
pr = nullptr;
|
||||
|
||||
if (s == m_atom) {
|
||||
t = m_sign ? m.mk_false() : m.mk_true();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (s == m_term && m_value != 0) {
|
||||
if (s == m_term && m_value != nullptr) {
|
||||
t = m_value;
|
||||
return true;
|
||||
}
|
||||
|
@ -406,7 +406,7 @@ struct cofactor_elim_term_ite::imp {
|
|||
struct cofactor_rw : rewriter_tpl<cofactor_rw_cfg> {
|
||||
cofactor_rw_cfg m_cfg;
|
||||
public:
|
||||
cofactor_rw(ast_manager & m, imp & owner, obj_hashtable<expr> * has_term_ite = 0):
|
||||
cofactor_rw(ast_manager & m, imp & owner, obj_hashtable<expr> * has_term_ite = nullptr):
|
||||
rewriter_tpl<cofactor_rw_cfg>(m, false, m_cfg),
|
||||
m_cfg(m, owner, has_term_ite) {
|
||||
}
|
||||
|
@ -444,7 +444,7 @@ struct cofactor_elim_term_ite::imp {
|
|||
|
||||
bool get_subst(expr * s, expr * & t, proof * & t_pr) {
|
||||
if (m_candidates.contains(s)) {
|
||||
t_pr = 0;
|
||||
t_pr = nullptr;
|
||||
|
||||
if (m_cache.find(s, t))
|
||||
return true;
|
||||
|
@ -455,7 +455,7 @@ struct cofactor_elim_term_ite::imp {
|
|||
while (true) {
|
||||
// expr * c = m_owner.get_best(curr);
|
||||
expr * c = m_owner.get_first(curr);
|
||||
if (c == 0) {
|
||||
if (c == nullptr) {
|
||||
m_cache.insert(s, curr);
|
||||
m_cache_domain.push_back(curr);
|
||||
t = curr.get();
|
||||
|
@ -532,7 +532,7 @@ struct cofactor_elim_term_ite::imp {
|
|||
while (true) {
|
||||
expr * c = m_owner.get_best(curr);
|
||||
// expr * c = m_owner.get_first(curr);
|
||||
if (c == 0) {
|
||||
if (c == nullptr) {
|
||||
r = curr.get();
|
||||
return;
|
||||
}
|
||||
|
@ -607,7 +607,7 @@ struct cofactor_elim_term_ite::imp {
|
|||
unsigned num = to_app(t)->get_num_args();
|
||||
for (unsigned i = 0; i < num; i++) {
|
||||
expr * arg = to_app(t)->get_arg(i);
|
||||
expr * new_arg = 0;
|
||||
expr * new_arg = nullptr;
|
||||
TRACE("cofactor_bug", tout << "collecting child: " << arg->get_id() << "\n";);
|
||||
m_cache.find(arg, new_arg);
|
||||
SASSERT(new_arg != 0);
|
||||
|
@ -645,7 +645,7 @@ struct cofactor_elim_term_ite::imp {
|
|||
m_cache_domain.push_back(new_t);
|
||||
m_frames.pop_back();
|
||||
}
|
||||
expr * result = 0;
|
||||
expr * result = nullptr;
|
||||
m_cache.find(t, result);
|
||||
r = result;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ class cofactor_term_ite_tactic : public tactic {
|
|||
expr * f = g.form(i);
|
||||
expr_ref new_f(m);
|
||||
m_elim_ite(f, new_f);
|
||||
g.update(i, new_f, 0, g.dep(i));
|
||||
g.update(i, new_f, nullptr, g.dep(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ public:
|
|||
fail_if_proof_generation("cofactor-term-ite", g);
|
||||
fail_if_unsat_core_generation("cofactor-term-ite", g);
|
||||
tactic_report report("cofactor-term-ite", *g);
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
process(*(g.get()));
|
||||
g->inc_depth();
|
||||
result.push_back(g.get());
|
||||
|
|
|
@ -66,7 +66,7 @@ public:
|
|||
void operator()(goal_ref const & g, goal_ref_buffer & result,
|
||||
model_converter_ref & mc, proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
mc = 0;
|
||||
mc = nullptr;
|
||||
tactic_report report("collect-statistics", *g);
|
||||
|
||||
collect_proc cp(m, m_stats);
|
||||
|
|
|
@ -148,7 +148,7 @@ struct ctx_simplify_tactic::imp {
|
|||
struct cache_cell {
|
||||
expr * m_from;
|
||||
cached_result * m_result;
|
||||
cache_cell():m_from(0), m_result(0) {}
|
||||
cache_cell():m_from(nullptr), m_result(nullptr) {}
|
||||
};
|
||||
|
||||
ast_manager & m;
|
||||
|
@ -217,7 +217,7 @@ struct ctx_simplify_tactic::imp {
|
|||
bool check_cache() {
|
||||
for (unsigned i = 0; i < m_cache.size(); i++) {
|
||||
cache_cell & cell = m_cache[i];
|
||||
if (cell.m_from != 0) {
|
||||
if (cell.m_from != nullptr) {
|
||||
SASSERT(cell.m_result != 0);
|
||||
cached_result * curr = cell.m_result;
|
||||
while (curr) {
|
||||
|
@ -235,10 +235,10 @@ struct ctx_simplify_tactic::imp {
|
|||
m_cache.reserve(id+1);
|
||||
cache_cell & cell = m_cache[id];
|
||||
void * mem = m_allocator.allocate(sizeof(cached_result));
|
||||
if (cell.m_from == 0) {
|
||||
if (cell.m_from == nullptr) {
|
||||
// new_entry
|
||||
cell.m_from = from;
|
||||
cell.m_result = new (mem) cached_result(to, scope_level(), 0);
|
||||
cell.m_result = new (mem) cached_result(to, scope_level(), nullptr);
|
||||
m.inc_ref(from);
|
||||
m.inc_ref(to);
|
||||
}
|
||||
|
@ -281,9 +281,9 @@ struct ctx_simplify_tactic::imp {
|
|||
if (to_delete->m_next) tout << mk_ismt2_pp(to_delete->m_next->m_to, m); else tout << "<null>";
|
||||
tout << "\n";);
|
||||
cell.m_result = to_delete->m_next;
|
||||
if (cell.m_result == 0) {
|
||||
if (cell.m_result == nullptr) {
|
||||
m.dec_ref(cell.m_from);
|
||||
cell.m_from = 0;
|
||||
cell.m_from = nullptr;
|
||||
}
|
||||
m_allocator.deallocate(sizeof(cached_result), to_delete);
|
||||
}
|
||||
|
@ -316,7 +316,7 @@ struct ctx_simplify_tactic::imp {
|
|||
return false;
|
||||
cache_cell & cell = m_cache[id];
|
||||
SASSERT(cell.m_result == 0 || cell.m_result->m_lvl <= scope_level());
|
||||
if (cell.m_result != 0 && cell.m_result->m_lvl == scope_level()) {
|
||||
if (cell.m_result != nullptr && cell.m_result->m_lvl == scope_level()) {
|
||||
SASSERT(cell.m_from == t);
|
||||
SASSERT(cell.m_result->m_to != 0);
|
||||
r = cell.m_result->m_to;
|
||||
|
@ -326,7 +326,7 @@ struct ctx_simplify_tactic::imp {
|
|||
}
|
||||
|
||||
void simplify(expr * t, expr_ref & r) {
|
||||
r = 0;
|
||||
r = nullptr;
|
||||
if (m_depth >= m_max_depth || m_num_steps >= m_max_steps || !is_app(t) || !m_simp->may_simplify(t)) {
|
||||
r = t;
|
||||
return;
|
||||
|
@ -534,7 +534,7 @@ struct ctx_simplify_tactic::imp {
|
|||
if (i < sz - 1 && !m.is_true(r) && !m.is_false(r) && !g.dep(i) && !assert_expr(r, false)) {
|
||||
r = m.mk_false();
|
||||
}
|
||||
g.update(i, r, 0, g.dep(i));
|
||||
g.update(i, r, nullptr, g.dep(i));
|
||||
}
|
||||
pop(scope_level() - old_lvl);
|
||||
|
||||
|
@ -549,7 +549,7 @@ struct ctx_simplify_tactic::imp {
|
|||
if (i > 0 && !m.is_true(r) && !m.is_false(r) && !g.dep(i) && !assert_expr(r, false)) {
|
||||
r = m.mk_false();
|
||||
}
|
||||
g.update(i, r, 0, g.dep(i));
|
||||
g.update(i, r, nullptr, g.dep(i));
|
||||
}
|
||||
pop(scope_level() - old_lvl);
|
||||
SASSERT(scope_level() == 0);
|
||||
|
@ -582,7 +582,7 @@ struct ctx_simplify_tactic::imp {
|
|||
for (unsigned i = 0; !g.inconsistent() && i < sz; ++i) {
|
||||
expr * t = g.form(i);
|
||||
process(t, r);
|
||||
proof* new_pr = m.mk_modus_ponens(g.pr(i), m.mk_rewrite_star(t, r, 0, 0)); // TODO :-)
|
||||
proof* new_pr = m.mk_modus_ponens(g.pr(i), m.mk_rewrite_star(t, r, 0, nullptr)); // TODO :-)
|
||||
g.update(i, r, new_pr, g.dep(i));
|
||||
}
|
||||
}
|
||||
|
@ -625,7 +625,7 @@ void ctx_simplify_tactic::operator()(goal_ref const & in,
|
|||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
(*m_imp)(*(in.get()));
|
||||
in->inc_depth();
|
||||
result.push_back(in.get());
|
||||
|
|
|
@ -78,7 +78,7 @@ public:
|
|||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
(*m_imp)(*(in.get()));
|
||||
in->inc_depth();
|
||||
result.push_back(in.get());
|
||||
|
|
|
@ -93,7 +93,7 @@ class distribute_forall_tactic : public tactic {
|
|||
rw * m_rw;
|
||||
|
||||
public:
|
||||
distribute_forall_tactic():m_rw(0) {}
|
||||
distribute_forall_tactic():m_rw(nullptr) {}
|
||||
|
||||
tactic * translate(ast_manager & m) override {
|
||||
return alloc(distribute_forall_tactic);
|
||||
|
@ -109,7 +109,7 @@ public:
|
|||
bool produce_proofs = g->proofs_enabled();
|
||||
rw r(m, produce_proofs);
|
||||
m_rw = &r;
|
||||
mc = 0; pc = 0; core = 0; result.reset();
|
||||
mc = nullptr; pc = nullptr; core = nullptr; result.reset();
|
||||
tactic_report report("distribute-forall", *g);
|
||||
|
||||
expr_ref new_curr(m);
|
||||
|
@ -131,7 +131,7 @@ public:
|
|||
result.push_back(g.get());
|
||||
TRACE("distribute-forall", g->display(tout););
|
||||
SASSERT(g->is_well_sorted());
|
||||
m_rw = 0;
|
||||
m_rw = nullptr;
|
||||
}
|
||||
|
||||
void cleanup() override {}
|
||||
|
|
|
@ -100,7 +100,7 @@ bool expr_dominators::compute_dominators() {
|
|||
for (unsigned i = 0; i + 1 < m_post2expr.size(); ++i) {
|
||||
expr * child = m_post2expr[i];
|
||||
ptr_vector<expr> const& p = m_parents[child];
|
||||
expr * new_idom = 0, *idom2 = 0;
|
||||
expr * new_idom = nullptr, *idom2 = nullptr;
|
||||
|
||||
for (expr * pred : p) {
|
||||
if (m_doms.contains(pred)) {
|
||||
|
@ -189,7 +189,7 @@ void dom_simplify_tactic::operator()(
|
|||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
|
||||
tactic_report report("dom-simplify", *in.get());
|
||||
simplify_goal(*(in.get()));
|
||||
|
@ -207,7 +207,7 @@ void dom_simplify_tactic::cleanup() {
|
|||
|
||||
expr_ref dom_simplify_tactic::simplify_ite(app * ite) {
|
||||
expr_ref r(m);
|
||||
expr * c = 0, *t = 0, *e = 0;
|
||||
expr * c = nullptr, *t = nullptr, *e = nullptr;
|
||||
VERIFY(m.is_ite(ite, c, t, e));
|
||||
unsigned old_lvl = scope_level();
|
||||
expr_ref new_c = simplify_arg(c);
|
||||
|
@ -262,7 +262,7 @@ expr_ref dom_simplify_tactic::simplify_arg(expr * e) {
|
|||
*/
|
||||
expr_ref dom_simplify_tactic::simplify_rec(expr * e0) {
|
||||
expr_ref r(m);
|
||||
expr* e = 0;
|
||||
expr* e = nullptr;
|
||||
|
||||
TRACE("simplify", tout << "depth: " << m_depth << " " << mk_pp(e0, m) << "\n";);
|
||||
if (!m_result.find(e0, e)) {
|
||||
|
@ -380,9 +380,9 @@ void dom_simplify_tactic::simplify_goal(goal& g) {
|
|||
}
|
||||
CTRACE("simplify", r != g.form(i), tout << r << " " << mk_pp(g.form(i), m) << "\n";);
|
||||
change |= r != g.form(i);
|
||||
proof* new_pr = 0;
|
||||
proof* new_pr = nullptr;
|
||||
if (g.proofs_enabled()) {
|
||||
new_pr = m.mk_modus_ponens(g.pr(i), m.mk_rewrite_star(g.form(i), r, 0, 0));
|
||||
new_pr = m.mk_modus_ponens(g.pr(i), m.mk_rewrite_star(g.form(i), r, 0, nullptr));
|
||||
}
|
||||
g.update(i, r, new_pr, g.dep(i));
|
||||
}
|
||||
|
@ -400,9 +400,9 @@ void dom_simplify_tactic::simplify_goal(goal& g) {
|
|||
}
|
||||
change |= r != g.form(i);
|
||||
CTRACE("simplify", r != g.form(i), tout << r << " " << mk_pp(g.form(i), m) << "\n";);
|
||||
proof* new_pr = 0;
|
||||
proof* new_pr = nullptr;
|
||||
if (g.proofs_enabled()) {
|
||||
new_pr = m.mk_modus_ponens(g.pr(i), m.mk_rewrite_star(g.form(i), r, 0, 0));
|
||||
new_pr = m.mk_modus_ponens(g.pr(i), m.mk_rewrite_star(g.form(i), r, 0, nullptr));
|
||||
}
|
||||
g.update(i, r, new_pr, g.dep(i));
|
||||
}
|
||||
|
@ -448,14 +448,14 @@ bool expr_substitution_simplifier::assert_expr(expr * t, bool sign) {
|
|||
m_scoped_substitution.push();
|
||||
expr* tt;
|
||||
if (!sign) {
|
||||
update_substitution(t, 0);
|
||||
update_substitution(t, nullptr);
|
||||
}
|
||||
else if (m.is_not(t, tt)) {
|
||||
update_substitution(tt, 0);
|
||||
update_substitution(tt, nullptr);
|
||||
}
|
||||
else {
|
||||
expr_ref nt(m.mk_not(t), m);
|
||||
update_substitution(nt, 0);
|
||||
update_substitution(nt, nullptr);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ class dom_simplify_tactic : public tactic {
|
|||
|
||||
bool is_subexpr(expr * a, expr * b);
|
||||
|
||||
expr_ref get_cached(expr* t) { expr* r = 0; if (!m_result.find(t, r)) r = t; return expr_ref(r, m); }
|
||||
expr_ref get_cached(expr* t) { expr* r = nullptr; if (!m_result.find(t, r)) r = t; return expr_ref(r, m); }
|
||||
void cache(expr *t, expr* r) { m_result.insert(t, r); m_trail.push_back(r); }
|
||||
|
||||
ptr_vector<expr> const & tree(expr * e);
|
||||
|
|
|
@ -51,7 +51,7 @@ class elim_term_ite_tactic : public tactic {
|
|||
proof_ref new_def_pr(m);
|
||||
app_ref _result(m);
|
||||
if (m_defined_names.mk_name(new_ite, new_def, new_def_pr, _result, result_pr)) {
|
||||
m_goal->assert_expr(new_def, new_def_pr, 0);
|
||||
m_goal->assert_expr(new_def, new_def_pr, nullptr);
|
||||
m_num_fresh++;
|
||||
if (m_produce_models) {
|
||||
if (!m_mc)
|
||||
|
@ -65,9 +65,9 @@ class elim_term_ite_tactic : public tactic {
|
|||
|
||||
rw_cfg(ast_manager & _m, params_ref const & p):
|
||||
m(_m),
|
||||
m_defined_names(m, 0 /* don't use prefix */) {
|
||||
m_defined_names(m, nullptr /* don't use prefix */) {
|
||||
updt_params(p);
|
||||
m_goal = 0;
|
||||
m_goal = nullptr;
|
||||
m_num_fresh = 0;
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ class elim_term_ite_tactic : public tactic {
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
tactic_report report("elim-term-ite", *g);
|
||||
bool produce_proofs = g->proofs_enabled();
|
||||
m_rw.cfg().m_produce_models = g->models_enabled();
|
||||
|
|
|
@ -95,7 +95,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
return false; // variable already existed for this application
|
||||
}
|
||||
|
||||
v = m().mk_fresh_const(0, m().get_sort(t));
|
||||
v = m().mk_fresh_const(nullptr, m().get_sort(t));
|
||||
TRACE("elim_uncnstr_bug", tout << "eliminating:\n" << mk_ismt2_pp(t, m()) << "\n";);
|
||||
TRACE("elim_uncnstr_bug_ll", tout << "eliminating:\n" << mk_bounded_pp(t, m()) << "\n";);
|
||||
m_fresh_vars.push_back(v);
|
||||
|
@ -220,7 +220,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
t = arg1;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
sort * s = m().get_sort(arg1);
|
||||
|
@ -243,14 +243,14 @@ class elim_uncnstr_tactic : public tactic {
|
|||
// variables.
|
||||
//
|
||||
if (!m().is_fully_interp(s))
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
// If the interpreted sort has only one element,
|
||||
// then it is unsound to eliminate the unconstrained variable in the equality
|
||||
sort_size sz = s->get_num_elements();
|
||||
|
||||
if (sz.is_finite() && sz.size() <= 1)
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
if (!m_mc) {
|
||||
// easy case, model generation is disabled.
|
||||
|
@ -267,7 +267,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
add_def(v, m().mk_ite(u, t, d));
|
||||
return u;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
app * process_basic_app(func_decl * f, unsigned num, expr * const * args) {
|
||||
|
@ -299,7 +299,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
add_def(args[2], r);
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
case OP_NOT:
|
||||
SASSERT(num == 1);
|
||||
if (uncnstr(args[0])) {
|
||||
|
@ -310,7 +310,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
add_def(args[0], m().mk_not(r));
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
case OP_AND:
|
||||
if (num > 0 && uncnstr(num, args)) {
|
||||
app * r;
|
||||
|
@ -320,7 +320,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
add_defs(num, args, r, m().mk_true());
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
case OP_OR:
|
||||
if (num > 0 && uncnstr(num, args)) {
|
||||
app * r;
|
||||
|
@ -330,13 +330,13 @@ class elim_uncnstr_tactic : public tactic {
|
|||
add_defs(num, args, r, m().mk_false());
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
case OP_IFF:
|
||||
case OP_EQ:
|
||||
SASSERT(num == 2);
|
||||
return process_eq(f, args[0], args[1]);
|
||||
default:
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -353,7 +353,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
le = !le;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
app * u;
|
||||
if (!mk_fresh_uncnstr_var_for(f, arg1, arg2, u))
|
||||
|
@ -368,9 +368,9 @@ class elim_uncnstr_tactic : public tactic {
|
|||
|
||||
app * process_add(family_id fid, decl_kind add_k, decl_kind sub_k, unsigned num, expr * const * args) {
|
||||
if (num == 0)
|
||||
return 0;
|
||||
return nullptr;
|
||||
unsigned i;
|
||||
expr * v = 0;
|
||||
expr * v = nullptr;
|
||||
for (i = 0; i < num; i++) {
|
||||
expr * arg = args[i];
|
||||
if (uncnstr(arg)) {
|
||||
|
@ -378,8 +378,8 @@ class elim_uncnstr_tactic : public tactic {
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (v == 0)
|
||||
return 0;
|
||||
if (v == nullptr)
|
||||
return nullptr;
|
||||
app * u;
|
||||
if (!mk_fresh_uncnstr_var_for(m().mk_app(fid, add_k, num, args), u))
|
||||
return u;
|
||||
|
@ -407,7 +407,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
|
||||
app * process_arith_mul(func_decl * f, unsigned num, expr * const * args) {
|
||||
if (num == 0)
|
||||
return 0;
|
||||
return nullptr;
|
||||
sort * s = m().get_sort(args[0]);
|
||||
if (uncnstr(num, args)) {
|
||||
app * r;
|
||||
|
@ -422,7 +422,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
rational val;
|
||||
if (num == 2 && uncnstr(args[1]) && m_a_util.is_numeral(args[0], val, is_int) && !is_int) {
|
||||
if (val.is_zero())
|
||||
return 0;
|
||||
return nullptr;
|
||||
app * r;
|
||||
if (!mk_fresh_uncnstr_var_for(f, num, args, r))
|
||||
return r;
|
||||
|
@ -432,7 +432,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
}
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
app * process_arith_app(func_decl * f, unsigned num, expr * const * args) {
|
||||
|
@ -450,13 +450,13 @@ class elim_uncnstr_tactic : public tactic {
|
|||
SASSERT(num == 2);
|
||||
return process_le_ge(f, args[0], args[1], false);
|
||||
default:
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
app * process_bv_mul(func_decl * f, unsigned num, expr * const * args) {
|
||||
if (num == 0)
|
||||
return 0;
|
||||
return nullptr;
|
||||
if (uncnstr(num, args)) {
|
||||
sort * s = m().get_sort(args[0]);
|
||||
app * r;
|
||||
|
@ -482,12 +482,12 @@ class elim_uncnstr_tactic : public tactic {
|
|||
add_def(args[1], m_bv_util.mk_bv_mul(m_bv_util.mk_numeral(inv, s), r));
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
app * process_extract(func_decl * f, expr * arg) {
|
||||
if (!uncnstr(arg))
|
||||
return 0;
|
||||
return nullptr;
|
||||
app * r;
|
||||
if (!mk_fresh_uncnstr_var_for(f, arg, r))
|
||||
return r;
|
||||
|
@ -523,14 +523,14 @@ class elim_uncnstr_tactic : public tactic {
|
|||
add_def(arg2, m_bv_util.mk_numeral(rational(1), s));
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
app * process_concat(func_decl * f, unsigned num, expr * const * args) {
|
||||
if (num == 0)
|
||||
return 0;
|
||||
return nullptr;
|
||||
if (!uncnstr(num, args))
|
||||
return 0;
|
||||
return nullptr;
|
||||
app * r;
|
||||
if (!mk_fresh_uncnstr_var_for(f, num, args, r))
|
||||
return r;
|
||||
|
@ -553,7 +553,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
// The result of bv_le is not just introducing a new fresh name,
|
||||
// we need a side condition.
|
||||
// TODO: the correct proof step
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
if (uncnstr(arg1)) {
|
||||
// v <= t
|
||||
|
@ -593,7 +593,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
add_def(v, m().mk_ite(r, t, m_bv_util.mk_bv_sub(t, m_bv_util.mk_numeral(rational(1), bv_sz))));
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
app * process_bv_app(func_decl * f, unsigned num, expr * const * args) {
|
||||
|
@ -630,7 +630,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
add_def(args[0], m().mk_app(f, r));
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
case OP_BOR:
|
||||
if (num > 0 && uncnstr(num, args)) {
|
||||
sort * s = m().get_sort(args[0]);
|
||||
|
@ -641,9 +641,9 @@ class elim_uncnstr_tactic : public tactic {
|
|||
add_defs(num, args, r, m_bv_util.mk_numeral(rational(0), s));
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
default:
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -660,7 +660,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
add_def(args[0], m_ar_util.mk_const_array(s, r));
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
case OP_STORE:
|
||||
if (uncnstr(args[0]) && uncnstr(args[num-1])) {
|
||||
app * r;
|
||||
|
@ -673,7 +673,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
return r;
|
||||
}
|
||||
default:
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -700,7 +700,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
func_decl * c = m_dt_util.get_accessor_constructor(f);
|
||||
for (unsigned i = 0; i < c->get_arity(); i++)
|
||||
if (!m().is_fully_interp(c->get_domain(i)))
|
||||
return 0;
|
||||
return nullptr;
|
||||
app * u;
|
||||
if (!mk_fresh_uncnstr_var_for(f, num, args, u))
|
||||
return u;
|
||||
|
@ -730,7 +730,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
return u;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
br_status reduce_app(func_decl * f, unsigned num, expr * const * args, expr_ref & result, proof_ref & result_pr) {
|
||||
|
@ -745,7 +745,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
return BR_FAILED; // non-ground terms are not handled.
|
||||
}
|
||||
|
||||
app * u = 0;
|
||||
app * u = nullptr;
|
||||
|
||||
if (fid == m().get_basic_family_id())
|
||||
u = process_basic_app(f, num, args);
|
||||
|
@ -758,7 +758,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
else if (fid == m_dt_util.get_family_id())
|
||||
u = process_datatype_app(f, num, args);
|
||||
|
||||
if (u == 0)
|
||||
if (u == nullptr)
|
||||
return BR_FAILED;
|
||||
|
||||
result = u;
|
||||
|
@ -806,7 +806,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
|
||||
void init_mc(bool produce_models) {
|
||||
if (!produce_models) {
|
||||
m_mc = 0;
|
||||
m_mc = nullptr;
|
||||
return;
|
||||
}
|
||||
m_mc = alloc(mc, m());
|
||||
|
@ -821,7 +821,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
bool produce_models = g->models_enabled();
|
||||
bool produce_proofs = g->proofs_enabled();
|
||||
|
||||
|
@ -867,7 +867,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
}
|
||||
if (!modified) {
|
||||
if (round == 0) {
|
||||
mc = 0;
|
||||
mc = nullptr;
|
||||
}
|
||||
else {
|
||||
app_ref_vector & fresh_vars = m_rw->cfg().m_fresh_vars;
|
||||
|
@ -879,11 +879,11 @@ class elim_uncnstr_tactic : public tactic {
|
|||
mc = concat(fmc, m_mc.get());
|
||||
}
|
||||
else {
|
||||
mc = 0;
|
||||
mc = nullptr;
|
||||
}
|
||||
}
|
||||
m_mc = 0;
|
||||
m_rw = 0;
|
||||
m_mc = nullptr;
|
||||
m_rw = nullptr;
|
||||
TRACE("elim_uncnstr", if (mc) mc->display(tout););
|
||||
result.push_back(g.get());
|
||||
g->inc_depth();
|
||||
|
|
|
@ -149,7 +149,7 @@ class injectivity_tactic : public tactic {
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(goal->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
tactic_report report("injectivity", *goal);
|
||||
fail_if_unsat_core_generation("injectivity", goal); // TODO: Support UNSAT cores
|
||||
fail_if_proof_generation("injectivity", goal);
|
||||
|
|
|
@ -33,13 +33,13 @@ class nnf_tactic : public tactic {
|
|||
}
|
||||
|
||||
~set_nnf() {
|
||||
m_owner.m_nnf = 0;
|
||||
m_owner.m_nnf = nullptr;
|
||||
}
|
||||
};
|
||||
public:
|
||||
nnf_tactic(params_ref const & p):
|
||||
m_params(p),
|
||||
m_nnf(0) {
|
||||
m_nnf(nullptr) {
|
||||
TRACE("nnf", tout << "nnf_tactic constructor: " << p << "\n";);
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ public:
|
|||
expr_dependency_ref & core) override {
|
||||
TRACE("nnf", tout << "params: " << m_params << "\n"; g->display(tout););
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
tactic_report report("nnf", *g);
|
||||
bool produce_proofs = g->proofs_enabled();
|
||||
|
||||
|
@ -89,9 +89,9 @@ public:
|
|||
sz = defs.size();
|
||||
for (unsigned i = 0; i < sz; i++) {
|
||||
if (produce_proofs)
|
||||
g->assert_expr(defs.get(i), def_prs.get(i), 0);
|
||||
g->assert_expr(defs.get(i), def_prs.get(i), nullptr);
|
||||
else
|
||||
g->assert_expr(defs.get(i), 0, 0);
|
||||
g->assert_expr(defs.get(i), nullptr, nullptr);
|
||||
}
|
||||
g->inc_depth();
|
||||
result.push_back(g.get());
|
||||
|
|
|
@ -68,7 +68,7 @@ class occf_tactic : public tactic {
|
|||
expr * m_bvar;
|
||||
unsigned m_gen_pos:1;
|
||||
unsigned m_gen_neg:1;
|
||||
bvar_info():m_bvar(0), m_gen_pos(false), m_gen_neg(false) {}
|
||||
bvar_info():m_bvar(nullptr), m_gen_pos(false), m_gen_neg(false) {}
|
||||
bvar_info(expr * var, bool sign):
|
||||
m_bvar(var),
|
||||
m_gen_pos(!sign),
|
||||
|
@ -86,20 +86,20 @@ class occf_tactic : public tactic {
|
|||
}
|
||||
|
||||
cnstr2bvar::obj_map_entry * entry = c2b.find_core(cnstr);
|
||||
if (entry == 0)
|
||||
return 0;
|
||||
if (entry == nullptr)
|
||||
return nullptr;
|
||||
bvar_info & info = entry->get_data().m_value;
|
||||
if (sign) {
|
||||
if (!info.m_gen_neg) {
|
||||
info.m_gen_neg = true;
|
||||
g->assert_expr(m.mk_or(info.m_bvar, m.mk_not(cnstr)), 0, 0);
|
||||
g->assert_expr(m.mk_or(info.m_bvar, m.mk_not(cnstr)), nullptr, nullptr);
|
||||
}
|
||||
return m.mk_not(info.m_bvar);
|
||||
}
|
||||
else {
|
||||
if (!info.m_gen_pos) {
|
||||
info.m_gen_pos = true;
|
||||
g->assert_expr(m.mk_or(m.mk_not(info.m_bvar), cnstr), 0, 0);
|
||||
g->assert_expr(m.mk_or(m.mk_not(info.m_bvar), cnstr), nullptr, nullptr);
|
||||
}
|
||||
return info.m_bvar;
|
||||
}
|
||||
|
@ -113,16 +113,16 @@ class occf_tactic : public tactic {
|
|||
}
|
||||
|
||||
SASSERT(!c2b.contains(cnstr));
|
||||
expr * bvar = m.mk_fresh_const(0, m.mk_bool_sort());
|
||||
expr * bvar = m.mk_fresh_const(nullptr, m.mk_bool_sort());
|
||||
if (produce_models)
|
||||
m_mc->insert(to_app(bvar)->get_decl());
|
||||
c2b.insert(cnstr, bvar_info(bvar, sign));
|
||||
if (sign) {
|
||||
g->assert_expr(m.mk_or(bvar, m.mk_not(cnstr)), 0, 0);
|
||||
g->assert_expr(m.mk_or(bvar, m.mk_not(cnstr)), nullptr, nullptr);
|
||||
return m.mk_not(bvar);
|
||||
}
|
||||
else {
|
||||
g->assert_expr(m.mk_or(m.mk_not(bvar), cnstr), 0, 0);
|
||||
g->assert_expr(m.mk_or(m.mk_not(bvar), cnstr), nullptr, nullptr);
|
||||
return bvar;
|
||||
}
|
||||
}
|
||||
|
@ -133,14 +133,14 @@ class occf_tactic : public tactic {
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
|
||||
fail_if_proof_generation("occf", g);
|
||||
|
||||
bool produce_models = g->models_enabled();
|
||||
tactic_report report("occf", *g);
|
||||
|
||||
m_mc = 0;
|
||||
m_mc = nullptr;
|
||||
|
||||
ptr_vector<expr> new_lits;
|
||||
|
||||
|
@ -160,17 +160,17 @@ class occf_tactic : public tactic {
|
|||
m_mc = alloc(filter_model_converter, m);
|
||||
mc = m_mc;
|
||||
}
|
||||
expr * keep = 0;
|
||||
expr * keep = nullptr;
|
||||
new_lits.reset();
|
||||
unsigned num = cls->get_num_args();
|
||||
for (unsigned j = 0; j < num; j++) {
|
||||
expr * l = cls->get_arg(j);
|
||||
if (is_constraint(l)) {
|
||||
expr * new_l = get_aux_lit(c2b, l, g);
|
||||
if (new_l != 0) {
|
||||
if (new_l != nullptr) {
|
||||
new_lits.push_back(new_l);
|
||||
}
|
||||
else if (keep == 0) {
|
||||
else if (keep == nullptr) {
|
||||
keep = l;
|
||||
}
|
||||
else {
|
||||
|
@ -182,9 +182,9 @@ class occf_tactic : public tactic {
|
|||
new_lits.push_back(l);
|
||||
}
|
||||
}
|
||||
if (keep != 0)
|
||||
if (keep != nullptr)
|
||||
new_lits.push_back(keep);
|
||||
g->update(i, m.mk_or(new_lits.size(), new_lits.c_ptr()), 0, d);
|
||||
g->update(i, m.mk_or(new_lits.size(), new_lits.c_ptr()), nullptr, d);
|
||||
}
|
||||
g->inc_depth();
|
||||
result.push_back(g.get());
|
||||
|
|
|
@ -148,7 +148,7 @@ public:
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
SASSERT(g->is_well_sorted());
|
||||
pc = 0; core = 0;
|
||||
pc = nullptr; core = nullptr;
|
||||
|
||||
if (g->proofs_enabled()) {
|
||||
throw tactic_exception("pb-preprocess does not support proofs");
|
||||
|
@ -250,7 +250,7 @@ public:
|
|||
if (!to_ge(g->form(k), args2, coeffs2, k2)) continue;
|
||||
if (subsumes(args1, coeffs1, k1, args2, coeffs2, k2)) {
|
||||
IF_VERBOSE(3, verbose_stream() << "replace " << mk_pp(g->form(k), m) << "\n";);
|
||||
g->update(k, m.mk_true(), 0, m.mk_join(g->dep(m_ge[i]), g->dep(k)));
|
||||
g->update(k, m.mk_true(), nullptr, m.mk_join(g->dep(m_ge[i]), g->dep(k)));
|
||||
m_progress = true;
|
||||
}
|
||||
}
|
||||
|
@ -328,12 +328,12 @@ private:
|
|||
for (unsigned j = 0; j < cuts.size(); ++j) {
|
||||
unsigned end = cuts[j];
|
||||
fml1 = decompose_cut(a, start, end, cut_args, cut_coeffs);
|
||||
g->assert_expr(fml1, 0, g->dep(i));
|
||||
g->assert_expr(fml1, nullptr, g->dep(i));
|
||||
start = end;
|
||||
TRACE("pb", tout << fml1 << "\n";);
|
||||
}
|
||||
fml2 = pb.mk_ge(cut_args.size(), cut_coeffs.c_ptr(), cut_args.c_ptr(), pb.get_k(e));
|
||||
g->update(i, fml2, 0, g->dep(i));
|
||||
g->update(i, fml2, nullptr, g->dep(i));
|
||||
TRACE("pb", tout << fml2 << "\n";);
|
||||
}
|
||||
}
|
||||
|
@ -578,8 +578,8 @@ private:
|
|||
tout << "resolve: " << mk_pp(fml1, m) << "\n" << mk_pp(fml2, m) << "\n" << tmp1 << "\n";
|
||||
tout << "to\n" << mk_pp(fml2, m) << " -> " << tmp2 << "\n";);
|
||||
|
||||
g->update(idx2, tmp2, 0, m.mk_join(g->dep(idx1), g->dep(idx2)));
|
||||
g->update(idx1, m.mk_true(), 0, 0);
|
||||
g->update(idx2, tmp2, nullptr, m.mk_join(g->dep(idx1), g->dep(idx2)));
|
||||
g->update(idx1, m.mk_true(), nullptr, nullptr);
|
||||
m_progress = true;
|
||||
//IF_VERBOSE(0, if (!g->inconsistent()) display_annotation(verbose_stream(), g););
|
||||
}
|
||||
|
@ -651,7 +651,7 @@ private:
|
|||
}
|
||||
}
|
||||
}
|
||||
m_r.set_substitution(0);
|
||||
m_r.set_substitution(nullptr);
|
||||
}
|
||||
|
||||
bool subsumes(expr_ref_vector const& args1,
|
||||
|
|
|
@ -38,7 +38,7 @@ class propagate_values_tactic : public tactic {
|
|||
imp(ast_manager & m, params_ref const & p):
|
||||
m(m),
|
||||
m_r(m, p),
|
||||
m_goal(0),
|
||||
m_goal(nullptr),
|
||||
m_occs(m, true /* track atoms */) {
|
||||
updt_params_core(p);
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ class propagate_values_tactic : public tactic {
|
|||
if (m_goal->unsat_core_enabled()) {
|
||||
new_d = m_goal->dep(m_idx);
|
||||
expr_dependency * used_d = m_r.get_used_dependencies();
|
||||
if (used_d != 0) {
|
||||
if (used_d != nullptr) {
|
||||
new_d = m.mk_join(new_d, used_d);
|
||||
m_r.reset_used_dependencies();
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ class propagate_values_tactic : public tactic {
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
tactic_report report("propagate-values", *g);
|
||||
m_goal = g.get();
|
||||
|
||||
|
@ -210,7 +210,7 @@ class propagate_values_tactic : public tactic {
|
|||
SASSERT(m_goal->is_well_sorted());
|
||||
TRACE("propagate_values", tout << "end\n"; m_goal->display(tout););
|
||||
TRACE("propagate_values_core", m_goal->display_with_dependencies(tout););
|
||||
m_goal = 0;
|
||||
m_goal = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ struct reduce_args_tactic::imp {
|
|||
}
|
||||
|
||||
static bool may_be_unique(ast_manager& m, bv_util& bv, expr* e, expr*& base) {
|
||||
base = 0;
|
||||
base = nullptr;
|
||||
return m.is_unique_value(e) || is_var_plus_offset(m, bv, e, base);
|
||||
}
|
||||
|
||||
|
@ -341,7 +341,7 @@ struct reduce_args_tactic::imp {
|
|||
}
|
||||
|
||||
br_status reduce_app(func_decl * f, unsigned num, expr * const * args, expr_ref & result, proof_ref & result_pr) {
|
||||
result_pr = 0;
|
||||
result_pr = nullptr;
|
||||
if (f->get_arity() == 0)
|
||||
return BR_FAILED; // ignore constants
|
||||
if (f->get_family_id() != null_family_id)
|
||||
|
@ -357,7 +357,7 @@ struct reduce_args_tactic::imp {
|
|||
}
|
||||
|
||||
app_ref tmp(m.mk_app(f, num, args), m);
|
||||
func_decl *& new_f = map->insert_if_not_there2(tmp, 0)->get_data().m_value;
|
||||
func_decl *& new_f = map->insert_if_not_there2(tmp, nullptr)->get_data().m_value;
|
||||
if (!new_f) {
|
||||
// create fresh symbol
|
||||
ptr_buffer<sort> domain;
|
||||
|
@ -401,7 +401,7 @@ struct reduce_args_tactic::imp {
|
|||
for (; it != end; ++it) {
|
||||
func_decl * f = it->m_key;
|
||||
arg2func * map = it->m_value;
|
||||
expr * def = 0;
|
||||
expr * def = nullptr;
|
||||
SASSERT(decl2args.contains(f));
|
||||
bit_vector & bv = decl2args.find(f);
|
||||
new_vars.reset();
|
||||
|
@ -419,7 +419,7 @@ struct reduce_args_tactic::imp {
|
|||
f_mc->insert(new_def);
|
||||
SASSERT(new_def->get_arity() == new_args.size());
|
||||
app * new_t = m_manager.mk_app(new_def, new_args.size(), new_args.c_ptr());
|
||||
if (def == 0) {
|
||||
if (def == nullptr) {
|
||||
def = new_t;
|
||||
}
|
||||
else {
|
||||
|
@ -494,7 +494,7 @@ void reduce_args_tactic::operator()(goal_ref const & g,
|
|||
SASSERT(g->is_well_sorted());
|
||||
fail_if_proof_generation("reduce-args", g);
|
||||
fail_if_unsat_core_generation("reduce-args", g);
|
||||
mc = 0; pc = 0; core = 0; result.reset();
|
||||
mc = nullptr; pc = nullptr; core = nullptr; result.reset();
|
||||
m_imp->operator()(*(g.get()), mc);
|
||||
g->inc_depth();
|
||||
result.push_back(g.get());
|
||||
|
|
|
@ -101,7 +101,7 @@ void simplify_tactic::operator()(goal_ref const & in,
|
|||
(*m_imp)(*(in.get()));
|
||||
in->inc_depth();
|
||||
result.push_back(in.get());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
}
|
||||
catch (rewriter_exception & ex) {
|
||||
throw tactic_exception(ex.msg());
|
||||
|
|
|
@ -53,12 +53,12 @@ class solve_eqs_tactic : public tactic {
|
|||
imp(ast_manager & m, params_ref const & p, expr_replacer * r, bool owner):
|
||||
m_manager(m),
|
||||
m_r(r),
|
||||
m_r_owner(r == 0 || owner),
|
||||
m_r_owner(r == nullptr || owner),
|
||||
m_a_util(m),
|
||||
m_num_steps(0),
|
||||
m_num_eliminated_vars(0) {
|
||||
updt_params(p);
|
||||
if (m_r == 0)
|
||||
if (m_r == nullptr)
|
||||
m_r = mk_default_expr_replacer(m);
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ class solve_eqs_tactic : public tactic {
|
|||
if (is_uninterp_const(lhs) && !m_candidate_vars.is_marked(lhs) && !occurs(lhs, rhs) && check_occs(lhs)) {
|
||||
var = to_app(lhs);
|
||||
def = rhs;
|
||||
pr = 0;
|
||||
pr = nullptr;
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
@ -333,7 +333,7 @@ class solve_eqs_tactic : public tactic {
|
|||
}
|
||||
|
||||
bool solve(expr * f, app_ref & var, expr_ref & def, proof_ref & pr) {
|
||||
expr* arg1 = 0, *arg2 = 0;
|
||||
expr* arg1 = nullptr, *arg2 = nullptr;
|
||||
if (m().is_eq(f, arg1, arg2)) {
|
||||
if (trivial_solve(arg1, arg2, var, def, pr))
|
||||
return true;
|
||||
|
@ -393,7 +393,7 @@ class solve_eqs_tactic : public tactic {
|
|||
void collect(goal const & g) {
|
||||
m_subst->reset();
|
||||
m_norm_subst->reset();
|
||||
m_r->set_substitution(0);
|
||||
m_r->set_substitution(nullptr);
|
||||
m_candidate_vars.reset();
|
||||
m_candidate_set.reset();
|
||||
m_candidates.reset();
|
||||
|
@ -499,7 +499,7 @@ class solve_eqs_tactic : public tactic {
|
|||
|
||||
// Must save t and its definition.
|
||||
// See comment in the beginning of the function
|
||||
expr * def = 0;
|
||||
expr * def = nullptr;
|
||||
proof * pr;
|
||||
expr_dependency * dep;
|
||||
m_subst->find(to_app(t), def, pr, dep);
|
||||
|
@ -513,7 +513,7 @@ class solve_eqs_tactic : public tactic {
|
|||
else {
|
||||
visiting.mark(t);
|
||||
fr.second = 1;
|
||||
expr * def = 0;
|
||||
expr * def = nullptr;
|
||||
proof * pr;
|
||||
expr_dependency * dep;
|
||||
m_subst->find(to_app(t), def, pr, dep);
|
||||
|
@ -587,9 +587,9 @@ class solve_eqs_tactic : public tactic {
|
|||
for (unsigned idx = 0; idx < size; idx++) {
|
||||
checkpoint();
|
||||
expr * v = m_ordered_vars[idx];
|
||||
expr * def = 0;
|
||||
proof * pr = 0;
|
||||
expr_dependency * dep = 0;
|
||||
expr * def = nullptr;
|
||||
proof * pr = nullptr;
|
||||
expr_dependency * dep = nullptr;
|
||||
m_subst->find(v, def, pr, dep);
|
||||
SASSERT(def != 0);
|
||||
m_r->operator()(def, new_def, new_pr, new_dep);
|
||||
|
@ -645,7 +645,7 @@ class solve_eqs_tactic : public tactic {
|
|||
// so, we must remove remove the mark before doing the update
|
||||
m_candidate_set.mark(f, false);
|
||||
SASSERT(!m_candidate_set.is_marked(f));
|
||||
g.update(idx, m().mk_true(), m().mk_true_proof(), 0);
|
||||
g.update(idx, m().mk_true(), m().mk_true_proof(), nullptr);
|
||||
m_num_steps ++;
|
||||
continue;
|
||||
}
|
||||
|
@ -681,10 +681,10 @@ class solve_eqs_tactic : public tactic {
|
|||
IF_VERBOSE(100, if (!m_ordered_vars.empty()) verbose_stream() << "num. eliminated vars: " << m_ordered_vars.size() << "\n";);
|
||||
m_num_eliminated_vars += m_ordered_vars.size();
|
||||
if (m_produce_models) {
|
||||
if (mc.get() == 0)
|
||||
if (mc.get() == nullptr)
|
||||
mc = alloc(gmc, m());
|
||||
for (app* v : m_ordered_vars) {
|
||||
expr * def = 0;
|
||||
expr * def = nullptr;
|
||||
proof * pr;
|
||||
expr_dependency * dep;
|
||||
m_norm_subst->find(v, def, pr, dep);
|
||||
|
@ -748,7 +748,7 @@ class solve_eqs_tactic : public tactic {
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
tactic_report report("solve_eqs", *g);
|
||||
m_produce_models = g->models_enabled();
|
||||
m_produce_proofs = g->proofs_enabled();
|
||||
|
@ -768,7 +768,7 @@ class solve_eqs_tactic : public tactic {
|
|||
normalize();
|
||||
substitute(*(g.get()));
|
||||
if (g->inconsistent()) {
|
||||
mc = 0;
|
||||
mc = nullptr;
|
||||
break;
|
||||
}
|
||||
save_elim_vars(mc);
|
||||
|
@ -823,7 +823,7 @@ public:
|
|||
ast_manager & m = m_imp->m();
|
||||
expr_replacer * r = m_imp->m_r;
|
||||
if (r)
|
||||
r->set_substitution(0);
|
||||
r->set_substitution(nullptr);
|
||||
bool owner = m_imp->m_r_owner;
|
||||
m_imp->m_r_owner = false; // stole replacer
|
||||
|
||||
|
@ -844,7 +844,7 @@ public:
|
|||
};
|
||||
|
||||
tactic * mk_solve_eqs_tactic(ast_manager & m, params_ref const & p, expr_replacer * r) {
|
||||
if (r == 0)
|
||||
if (r == nullptr)
|
||||
return clean(alloc(solve_eqs_tactic, m, p, mk_expr_simp_replacer(m, p), true));
|
||||
else
|
||||
return clean(alloc(solve_eqs_tactic, m, p, r, false));
|
||||
|
|
|
@ -24,7 +24,7 @@ class ast_manager;
|
|||
class tactic;
|
||||
class expr_replacer;
|
||||
|
||||
tactic * mk_solve_eqs_tactic(ast_manager & m, params_ref const & p = params_ref(), expr_replacer * r = 0);
|
||||
tactic * mk_solve_eqs_tactic(ast_manager & m, params_ref const & p = params_ref(), expr_replacer * r = nullptr);
|
||||
|
||||
/*
|
||||
ADD_TACTIC("solve-eqs", "eliminate variables by solving equations.", "mk_solve_eqs_tactic(m, p)")
|
||||
|
|
|
@ -111,7 +111,7 @@ public:
|
|||
SASSERT(in->is_well_sorted());
|
||||
tactic_report report("split-clause", *in);
|
||||
TRACE("before_split_clause", in->display(tout););
|
||||
pc = 0; mc = 0; core = 0;
|
||||
pc = nullptr; mc = nullptr; core = nullptr;
|
||||
ast_manager & m = in->m();
|
||||
unsigned cls_pos = select_clause(m, in);
|
||||
if (cls_pos == UINT_MAX) {
|
||||
|
@ -131,7 +131,7 @@ public:
|
|||
else
|
||||
subgoal_i = alloc(goal, *in);
|
||||
expr * lit_i = cls->get_arg(i);
|
||||
proof * pr_i = 0;
|
||||
proof * pr_i = nullptr;
|
||||
if (produce_proofs)
|
||||
pr_i = m.mk_hypothesis(lit_i);
|
||||
subgoal_i->update(cls_pos, lit_i, pr_i, cls_dep);
|
||||
|
|
|
@ -88,7 +88,7 @@ struct ac_rewriter_cfg : public default_rewriter_cfg {
|
|||
bool rewrite_patterns() const { return false; }
|
||||
bool flat_assoc(func_decl * f) const { return false; }
|
||||
br_status reduce_app(func_decl * f, unsigned num, expr * const * args, expr_ref & result, proof_ref & result_pr) {
|
||||
result_pr = 0;
|
||||
result_pr = nullptr;
|
||||
return m_r.mk_app_core(f, num, args, result);
|
||||
}
|
||||
ac_rewriter_cfg(ast_manager & m):m_r(m) {}
|
||||
|
@ -475,7 +475,7 @@ private:
|
|||
T.reset();
|
||||
ptr_vector<expr> todo;
|
||||
todo.push_back(fml);
|
||||
app* t = 0;
|
||||
app* t = nullptr;
|
||||
while (!todo.empty()) {
|
||||
fml = todo.back();
|
||||
todo.pop_back();
|
||||
|
@ -490,24 +490,24 @@ private:
|
|||
bool is_range_restriction(expr* form, term_set const& C, app*& t) {
|
||||
if (!m().is_or(form)) return false;
|
||||
unsigned sz = to_app(form)->get_num_args();
|
||||
t = 0;
|
||||
t = nullptr;
|
||||
for (unsigned i = 0; i < sz; ++i) {
|
||||
expr* e = to_app(form)->get_arg(i);
|
||||
expr* e1, *e2;
|
||||
if (!m().is_eq(e, e1, e2)) return false;
|
||||
if (!is_app(e1) || !is_app(e2)) return false;
|
||||
app* a1 = to_app(e1), *a2 = to_app(e2);
|
||||
if (C.contains(a1) && (t == 0 || t == a2)) {
|
||||
if (C.contains(a1) && (t == nullptr || t == a2)) {
|
||||
t = a2;
|
||||
}
|
||||
else if (C.contains(a2) && (t == 0 || t == a1)) {
|
||||
else if (C.contains(a2) && (t == nullptr || t == a1)) {
|
||||
t = a1;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return t != 0;
|
||||
return t != nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -641,7 +641,7 @@ void symmetry_reduce_tactic::operator()(goal_ref const & g,
|
|||
expr_dependency_ref & core) {
|
||||
fail_if_proof_generation("symmetry_reduce", g);
|
||||
fail_if_unsat_core_generation("symmetry_reduce", g);
|
||||
mc = 0; pc = 0; core = 0; result.reset();
|
||||
mc = nullptr; pc = nullptr; core = nullptr; result.reset();
|
||||
(*m_imp)(*(g.get()));
|
||||
g->inc_depth();
|
||||
result.push_back(g.get());
|
||||
|
|
|
@ -177,7 +177,7 @@ class tseitin_cnf_tactic : public tactic {
|
|||
goto start;
|
||||
case OP_OR:
|
||||
case OP_IFF:
|
||||
l = 0;
|
||||
l = nullptr;
|
||||
m_cache.find(to_app(n), l);
|
||||
SASSERT(l != 0);
|
||||
mk_lit(l, sign, r);
|
||||
|
@ -185,7 +185,7 @@ class tseitin_cnf_tactic : public tactic {
|
|||
case OP_ITE:
|
||||
case OP_EQ:
|
||||
if (m.is_bool(to_app(n)->get_arg(1))) {
|
||||
l = 0;
|
||||
l = nullptr;
|
||||
m_cache.find(to_app(n), l);
|
||||
SASSERT(l != 0);
|
||||
mk_lit(l, sign, r);
|
||||
|
@ -341,7 +341,7 @@ class tseitin_cnf_tactic : public tactic {
|
|||
|
||||
app * mk_fresh() {
|
||||
m_num_aux_vars++;
|
||||
app * v = m.mk_fresh_const(0, m.mk_bool_sort());
|
||||
app * v = m.mk_fresh_const(nullptr, m.mk_bool_sort());
|
||||
m_fresh_vars.push_back(v);
|
||||
if (m_mc)
|
||||
m_mc->insert(v->get_decl());
|
||||
|
@ -804,7 +804,7 @@ class tseitin_cnf_tactic : public tactic {
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
tactic_report report("tseitin-cnf", *g);
|
||||
fail_if_proof_generation("tseitin-cnf", g);
|
||||
m_produce_models = g->models_enabled();
|
||||
|
@ -819,12 +819,12 @@ class tseitin_cnf_tactic : public tactic {
|
|||
if (m_produce_models)
|
||||
m_mc = alloc(filter_model_converter, m);
|
||||
else
|
||||
m_mc = 0;
|
||||
m_mc = nullptr;
|
||||
|
||||
unsigned size = g->size();
|
||||
for (unsigned idx = 0; idx < size; idx++) {
|
||||
process(g->form(idx), g->dep(idx));
|
||||
g->update(idx, m.mk_true(), 0, 0); // to save memory
|
||||
g->update(idx, m.mk_true(), nullptr, nullptr); // to save memory
|
||||
}
|
||||
|
||||
SASSERT(!m_produce_unsat_cores || m_clauses.size() == m_deps.size());
|
||||
|
@ -838,14 +838,14 @@ class tseitin_cnf_tactic : public tactic {
|
|||
continue;
|
||||
added.mark(cls);
|
||||
if (m_produce_unsat_cores)
|
||||
g->assert_expr(cls, 0, m_deps.get(i));
|
||||
g->assert_expr(cls, nullptr, m_deps.get(i));
|
||||
else
|
||||
g->assert_expr(cls);
|
||||
}
|
||||
if (m_produce_models && !m_fresh_vars.empty())
|
||||
mc = m_mc.get();
|
||||
else
|
||||
mc = 0;
|
||||
mc = nullptr;
|
||||
g->inc_depth();
|
||||
result.push_back(g.get());
|
||||
TRACE("tseitin_cnf", g->display(tout););
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
protected:
|
||||
fpa2bv_model_converter(ast_manager & m) :
|
||||
m(m),
|
||||
m_bv2fp(0) {}
|
||||
m_bv2fp(nullptr) {}
|
||||
|
||||
void convert(model_core * mc, model * float_mdl);
|
||||
};
|
||||
|
|
|
@ -56,7 +56,7 @@ class fpa2bv_tactic : public tactic {
|
|||
m_produce_models = g->models_enabled();
|
||||
m_produce_unsat_cores = g->unsat_core_enabled();
|
||||
|
||||
mc = 0; pc = 0; core = 0; result.reset();
|
||||
mc = nullptr; pc = nullptr; core = nullptr; result.reset();
|
||||
tactic_report report("fpa2bv", *g);
|
||||
m_rw.reset();
|
||||
|
||||
|
|
|
@ -137,10 +137,10 @@ void goal::push_back(expr * f, proof * pr, expr_dependency * d) {
|
|||
}
|
||||
|
||||
void goal::quick_process(bool save_first, expr_ref& f, expr_dependency * d) {
|
||||
expr* g = 0;
|
||||
expr* g = nullptr;
|
||||
if (!m().is_and(f) && !(m().is_not(f, g) && m().is_or(g))) {
|
||||
if (!save_first) {
|
||||
push_back(f, 0, d);
|
||||
push_back(f, nullptr, d);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ void goal::quick_process(bool save_first, expr_ref& f, expr_dependency * d) {
|
|||
save_first = false;
|
||||
}
|
||||
else {
|
||||
push_back(curr, 0, d);
|
||||
push_back(curr, nullptr, d);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ void goal::assert_expr(expr * f, proof * pr, expr_dependency * d) {
|
|||
}
|
||||
|
||||
void goal::assert_expr(expr * f, expr_dependency * d) {
|
||||
assert_expr(f, proofs_enabled() ? m().mk_asserted(f) : 0, d);
|
||||
assert_expr(f, proofs_enabled() ? m().mk_asserted(f) : nullptr, d);
|
||||
}
|
||||
|
||||
void goal::get_formulas(ptr_vector<expr> & result) {
|
||||
|
@ -289,7 +289,7 @@ void goal::update(unsigned i, expr * f, proof * pr, expr_dependency * d) {
|
|||
quick_process(true, fr, d);
|
||||
if (!m_inconsistent) {
|
||||
if (m().is_false(fr)) {
|
||||
push_back(f, 0, d);
|
||||
push_back(f, nullptr, d);
|
||||
}
|
||||
else {
|
||||
m().set(m_forms, i, fr);
|
||||
|
@ -575,7 +575,7 @@ void goal::elim_redundancies() {
|
|||
if (neg_lits.is_marked(atom))
|
||||
continue;
|
||||
if (pos_lits.is_marked(atom)) {
|
||||
proof * p = 0;
|
||||
proof * p = nullptr;
|
||||
if (proofs_enabled()) {
|
||||
proof * prs[2] = { pr(get_idx(atom)), pr(i) };
|
||||
p = m().mk_unit_resolution(2, prs);
|
||||
|
@ -592,7 +592,7 @@ void goal::elim_redundancies() {
|
|||
if (pos_lits.is_marked(f))
|
||||
continue;
|
||||
if (neg_lits.is_marked(f)) {
|
||||
proof * p = 0;
|
||||
proof * p = nullptr;
|
||||
if (proofs_enabled()) {
|
||||
proof * prs[2] = { pr(get_not_idx(f)), pr(i) };
|
||||
p = m().mk_unit_resolution(2, prs);
|
||||
|
|
|
@ -107,17 +107,17 @@ public:
|
|||
void assert_expr(expr * f, proof * pr, expr_dependency * d);
|
||||
void assert_expr(expr * f, expr_dependency * d);
|
||||
void assert_expr(expr * f, expr * d) { assert_expr(f, m().mk_leaf(d)); }
|
||||
void assert_expr(expr * f) { assert_expr(f, static_cast<expr_dependency*>(0)); }
|
||||
void assert_expr(expr * f) { assert_expr(f, static_cast<expr_dependency*>(nullptr)); }
|
||||
|
||||
unsigned size() const { return m().size(m_forms); }
|
||||
|
||||
unsigned num_exprs() const;
|
||||
|
||||
expr * form(unsigned i) const { return m().get(m_forms, i); }
|
||||
proof * pr(unsigned i) const { return proofs_enabled() ? static_cast<proof*>(m().get(m_proofs, i)) : 0; }
|
||||
expr_dependency * dep(unsigned i) const { return unsat_core_enabled() ? m().get(m_dependencies, i) : 0; }
|
||||
proof * pr(unsigned i) const { return proofs_enabled() ? static_cast<proof*>(m().get(m_proofs, i)) : nullptr; }
|
||||
expr_dependency * dep(unsigned i) const { return unsat_core_enabled() ? m().get(m_dependencies, i) : nullptr; }
|
||||
|
||||
void update(unsigned i, expr * f, proof * pr = 0, expr_dependency * dep = 0);
|
||||
void update(unsigned i, expr * f, proof * pr = nullptr, expr_dependency * dep = nullptr);
|
||||
|
||||
void get_formulas(ptr_vector<expr> & result);
|
||||
|
||||
|
|
|
@ -47,9 +47,9 @@ public:
|
|||
};
|
||||
|
||||
model_converter * concat(model_converter * mc1, model_converter * mc2) {
|
||||
if (mc1 == 0)
|
||||
if (mc1 == nullptr)
|
||||
return mc2;
|
||||
if (mc2 == 0)
|
||||
if (mc2 == nullptr)
|
||||
return mc1;
|
||||
return alloc(concat_model_converter, mc1, mc2);
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ model_converter * concat(model_converter * mc1, unsigned num, model_converter *
|
|||
return concat(mc1, mc2s[0]);
|
||||
unsigned i;
|
||||
for (i = 0; i < num; i++) {
|
||||
if (mc2s[i] != 0)
|
||||
if (mc2s[i] != nullptr)
|
||||
break;
|
||||
}
|
||||
if (i == num) {
|
||||
|
@ -162,14 +162,14 @@ public:
|
|||
};
|
||||
|
||||
model_converter * model2model_converter(model * m) {
|
||||
if (m == 0)
|
||||
return 0;
|
||||
if (m == nullptr)
|
||||
return nullptr;
|
||||
return alloc(model2mc, m);
|
||||
}
|
||||
|
||||
model_converter * model_and_labels2model_converter(model * m, buffer<symbol> & r) {
|
||||
if (m == 0)
|
||||
return 0;
|
||||
if (m == nullptr)
|
||||
return nullptr;
|
||||
return alloc(model2mc, m, r);
|
||||
}
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ public:
|
|||
m_interface_cache.insert(arg, arg);
|
||||
return arg;
|
||||
}
|
||||
r = m.mk_fresh_const(0, u().mk_real());
|
||||
r = m.mk_fresh_const(nullptr, u().mk_real());
|
||||
m_new_reals.push_back(to_app(r));
|
||||
m_owner.m_fmc->insert(to_app(r)->get_decl());
|
||||
m_interface_cache.insert(arg, r);
|
||||
|
@ -156,7 +156,7 @@ public:
|
|||
void mk_interface_bool(func_decl * f, unsigned num, expr* const* args, expr_ref& result, proof_ref& pr) {
|
||||
expr_ref old_pred(m.mk_app(f, num, args), m);
|
||||
polarity_t pol = m_polarities.find(old_pred);
|
||||
result = m.mk_fresh_const(0, m.mk_bool_sort());
|
||||
result = m.mk_fresh_const(nullptr, m.mk_bool_sort());
|
||||
m_polarities.insert(result, pol);
|
||||
m_new_preds.push_back(to_app(result));
|
||||
m_owner.m_fmc->insert(to_app(result)->get_decl());
|
||||
|
@ -425,8 +425,8 @@ private:
|
|||
|
||||
void core2result(expr_dependency_ref & lcore, goal_ref const& g, goal_ref_buffer& result) {
|
||||
result.reset();
|
||||
proof * pr = 0;
|
||||
lcore = 0;
|
||||
proof * pr = nullptr;
|
||||
lcore = nullptr;
|
||||
g->reset();
|
||||
obj_hashtable<expr>::iterator it = m_used_asms.begin(), end = m_used_asms.end();
|
||||
for (; it != end; ++it) {
|
||||
|
@ -488,7 +488,7 @@ private:
|
|||
nums.push_back(r);
|
||||
if (num2var.find(r, v)) {
|
||||
if (!m_eq_pairs.find(v, w, pred)) {
|
||||
pred = m.mk_fresh_const(0, m.mk_bool_sort());
|
||||
pred = m.mk_fresh_const(nullptr, m.mk_bool_sort());
|
||||
m_eq_preds.push_back(pred);
|
||||
m_eq_values.push_back(l_true);
|
||||
m_fmc->insert(to_app(pred)->get_decl());
|
||||
|
@ -558,7 +558,7 @@ private:
|
|||
}
|
||||
|
||||
void translate(expr_safe_replace& num2num, expr* e, expr_ref& result) {
|
||||
result = 0;
|
||||
result = nullptr;
|
||||
if (e) {
|
||||
num2num(e, result);
|
||||
}
|
||||
|
@ -699,9 +699,9 @@ public:
|
|||
m(m),
|
||||
m_util(m),
|
||||
m_params(p),
|
||||
m_fmc(0),
|
||||
m_fmc(nullptr),
|
||||
m_nl_tac(mk_nlsat_tactic(m, p)),
|
||||
m_nl_g(0),
|
||||
m_nl_g(nullptr),
|
||||
m_solver(mk_smt_solver(m, p, symbol::null)),
|
||||
m_eq_preds(m),
|
||||
m_new_reals(m),
|
||||
|
@ -754,7 +754,7 @@ public:
|
|||
TRACE("nlsat_smt", g->display(tout););
|
||||
|
||||
m_produce_proofs = g->proofs_enabled();
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
|
||||
fail_if_proof_generation("qfufnra-purify", g);
|
||||
// fail_if_unsat_core_generation("qfufnra-purify", g);
|
||||
|
|
|
@ -167,7 +167,7 @@ public:
|
|||
|
||||
// translate bit-vector consequences back to integer values
|
||||
for (unsigned i = 0; i < consequences.size(); ++i) {
|
||||
expr* a = 0, *b = 0, *u = 0, *v = 0;
|
||||
expr* a = nullptr, *b = nullptr, *u = nullptr, *v = nullptr;
|
||||
func_decl* f;
|
||||
rational num;
|
||||
unsigned bvsize;
|
||||
|
|
|
@ -114,7 +114,7 @@ public:
|
|||
|
||||
// translate enumeration constants to bit-vectors.
|
||||
for (unsigned i = 0; i < vars.size(); ++i) {
|
||||
func_decl* f = 0;
|
||||
func_decl* f = nullptr;
|
||||
if (is_app(vars[i]) && is_uninterp_const(vars[i]) && m_rewriter.enum2bv().find(to_app(vars[i])->get_decl(), f)) {
|
||||
bvars.push_back(m.mk_const(f));
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ public:
|
|||
|
||||
// translate bit-vector consequences back to enumeration types
|
||||
for (unsigned i = 0; i < consequences.size(); ++i) {
|
||||
expr* a = 0, *b = 0, *u = 0, *v = 0;
|
||||
expr* a = nullptr, *b = nullptr, *u = nullptr, *v = nullptr;
|
||||
func_decl* f;
|
||||
rational num;
|
||||
unsigned bvsize;
|
||||
|
|
|
@ -104,7 +104,7 @@ tactic * mk_tactic_for_logic(ast_manager & m, params_ref const & p, symbol const
|
|||
static solver* mk_special_solver_for_logic(ast_manager & m, params_ref const & p, symbol const& logic) {
|
||||
if ((logic == "QF_FD" || logic == "SAT") && !m.proofs_enabled())
|
||||
return mk_fd_solver(m, p);
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static solver* mk_solver_for_logic(ast_manager & m, params_ref const & p, symbol const& logic) {
|
||||
|
|
|
@ -411,7 +411,7 @@ class num_consts_probe : public probe {
|
|||
family_id m_fid;
|
||||
unsigned m_counter;
|
||||
proc(ast_manager & _m, bool b, char const * family):m(_m), m_bool(b), m_counter(0) {
|
||||
if (family != 0)
|
||||
if (family != nullptr)
|
||||
m_fid = m.mk_family_id(family);
|
||||
else
|
||||
m_fid = null_family_id;
|
||||
|
@ -454,11 +454,11 @@ public:
|
|||
};
|
||||
|
||||
probe * mk_num_consts_probe() {
|
||||
return alloc(num_consts_probe, false, 0);
|
||||
return alloc(num_consts_probe, false, nullptr);
|
||||
}
|
||||
|
||||
probe * mk_num_bool_consts_probe() {
|
||||
return alloc(num_consts_probe, true, 0);
|
||||
return alloc(num_consts_probe, true, nullptr);
|
||||
}
|
||||
|
||||
probe * mk_num_arith_consts_probe() {
|
||||
|
|
|
@ -38,9 +38,9 @@ public:
|
|||
};
|
||||
|
||||
proof_converter * concat(proof_converter * pc1, proof_converter * pc2) {
|
||||
if (pc1 == 0)
|
||||
if (pc1 == nullptr)
|
||||
return pc2;
|
||||
if (pc2 == 0)
|
||||
if (pc2 == nullptr)
|
||||
return pc1;
|
||||
return alloc(concat_proof_converter, pc1, pc2);
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ proof_converter * concat(proof_converter * pc1, unsigned num, proof_converter *
|
|||
return concat(pc1, pc2s[0]);
|
||||
unsigned i;
|
||||
for (i = 0; i < num; i++) {
|
||||
if (pc2s[i] != 0)
|
||||
if (pc2s[i] != nullptr)
|
||||
break;
|
||||
}
|
||||
if (i == num) {
|
||||
|
@ -128,8 +128,8 @@ public:
|
|||
};
|
||||
|
||||
proof_converter * proof2proof_converter(ast_manager & m, proof * pr) {
|
||||
if (pr == 0)
|
||||
return 0;
|
||||
if (pr == nullptr)
|
||||
return nullptr;
|
||||
return alloc(proof2pc, m, pr);
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,7 @@ void apply(ast_manager & m, proof_converter_ref & pc1, proof_converter_ref_buffe
|
|||
for (unsigned i = 0; i < sz; i++) {
|
||||
proof_ref pr(m);
|
||||
SASSERT(pc2s[i]); // proof production is enabled
|
||||
pc2s[i]->operator()(m, 0, 0, pr);
|
||||
pc2s[i]->operator()(m, 0, nullptr, pr);
|
||||
prs.push_back(pr);
|
||||
}
|
||||
(*pc1)(m, sz, prs.c_ptr(), result);
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
replace_map(ast_manager& m): map_proc(m) {}
|
||||
|
||||
void insert(expr* src, expr* dst) {
|
||||
m_map.insert(src, dst, 0);
|
||||
m_map.insert(src, dst, nullptr);
|
||||
}
|
||||
|
||||
void operator()(var* v) { visit(v); }
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
|
||||
TRACE("sine", g->display(tout););
|
||||
TRACE("sine", tout << g->size(););
|
||||
|
@ -62,7 +62,7 @@ public:
|
|||
TRACE("sine", tout << new_forms.size(););
|
||||
g->reset();
|
||||
for (unsigned i = 0; i < new_forms.size(); i++) {
|
||||
g->assert_expr(new_forms.get(i), 0, 0);
|
||||
g->assert_expr(new_forms.get(i), nullptr, nullptr);
|
||||
}
|
||||
g->inc_depth();
|
||||
g->updt_prec(goal::OVER);
|
||||
|
|
|
@ -43,7 +43,7 @@ bvsls_opt_engine::optimization_result bvsls_opt_engine::optimize(
|
|||
m_hard_tracker.initialize(m_assertions);
|
||||
setup_opt_tracker(objective, _maximize);
|
||||
|
||||
if (initial_model.get() != 0) {
|
||||
if (initial_model.get() != nullptr) {
|
||||
TRACE("sls_opt", tout << "Initial model provided: " << std::endl;
|
||||
for (unsigned i = 0; i < initial_model->get_num_constants(); i++) {
|
||||
func_decl * fd = initial_model->get_constant(i);
|
||||
|
|
|
@ -537,7 +537,7 @@ bailout:
|
|||
|
||||
void sls_engine::operator()(goal_ref const & g, model_converter_ref & mc) {
|
||||
if (g->inconsistent()) {
|
||||
mc = 0;
|
||||
mc = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -565,7 +565,7 @@ void sls_engine::operator()(goal_ref const & g, model_converter_ref & mc) {
|
|||
g->reset();
|
||||
}
|
||||
else
|
||||
mc = 0;
|
||||
mc = nullptr;
|
||||
}
|
||||
|
||||
lbool sls_engine::operator()() {
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0; result.reset();
|
||||
mc = nullptr; pc = nullptr; core = nullptr; result.reset();
|
||||
|
||||
TRACE("sls", g->display(tout););
|
||||
tactic_report report("sls", *g);
|
||||
|
|
|
@ -40,7 +40,7 @@ class sls_tracker {
|
|||
mpz m_zero, m_one, m_two;
|
||||
|
||||
struct value_score {
|
||||
value_score() : m(0), value(unsynch_mpz_manager::mk_z(0)), score(0.0), score_prune(0.0), has_pos_occ(0), has_neg_occ(0), distance(0), touched(1) {};
|
||||
value_score() : m(nullptr), value(unsynch_mpz_manager::mk_z(0)), score(0.0), score_prune(0.0), has_pos_occ(0), has_neg_occ(0), distance(0), touched(1) {};
|
||||
value_score(value_score && other) :
|
||||
m(other.m),
|
||||
value(std::move(other.value)),
|
||||
|
@ -1038,7 +1038,7 @@ public:
|
|||
if (m_mpz_manager.neq(get_value(as[0]), m_one))
|
||||
return as[0];
|
||||
else
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
m_temp_constants.reset();
|
||||
|
||||
|
@ -1061,7 +1061,7 @@ public:
|
|||
}
|
||||
}
|
||||
if (pos == static_cast<unsigned>(-1))
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
m_touched++;
|
||||
m_scores.find(as[pos]).touched++;
|
||||
|
@ -1082,7 +1082,7 @@ public:
|
|||
for (unsigned i = 0; i < sz; i++)
|
||||
if (m_mpz_manager.neq(get_value(as[i]), m_one) && (get_random_uint(16) % ++cnt_unsat == 0)) pos = i;
|
||||
if (pos == static_cast<unsigned>(-1))
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
m_last_pos = pos;
|
||||
|
@ -1092,7 +1092,7 @@ public:
|
|||
expr * get_new_unsat_assertion(ptr_vector<expr> const & as) {
|
||||
unsigned sz = as.size();
|
||||
if (sz == 1)
|
||||
return 0;
|
||||
return nullptr;
|
||||
m_temp_constants.reset();
|
||||
|
||||
unsigned cnt_unsat = 0, pos = -1;
|
||||
|
@ -1100,7 +1100,7 @@ public:
|
|||
if ((i != m_last_pos) && m_mpz_manager.neq(get_value(as[i]), m_one) && (get_random_uint(16) % ++cnt_unsat == 0)) pos = i;
|
||||
|
||||
if (pos == static_cast<unsigned>(-1))
|
||||
return 0;
|
||||
return nullptr;
|
||||
return as[pos];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -58,7 +58,7 @@ public:
|
|||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
mc = 0;
|
||||
mc = nullptr;
|
||||
ast_manager& m(g->m());
|
||||
tactic_report report("qfufbv_ackr", *g);
|
||||
fail_if_unsat_core_generation("qfufbv_ackr", g);
|
||||
|
@ -111,7 +111,7 @@ private:
|
|||
bool m_inc_use_sat;
|
||||
|
||||
solver* setup_sat() {
|
||||
solver * sat(NULL);
|
||||
solver * sat(nullptr);
|
||||
if (m_use_sat) {
|
||||
if (m_inc_use_sat) {
|
||||
sat = mk_inc_sat_solver(m_m, m_p);
|
||||
|
|
|
@ -53,7 +53,7 @@ tactic_report::tactic_report(char const * id, goal const & g) {
|
|||
if (get_verbosity_level() >= TACTIC_VERBOSITY_LVL)
|
||||
m_imp = alloc(imp, id, g);
|
||||
else
|
||||
m_imp = 0;
|
||||
m_imp = nullptr;
|
||||
}
|
||||
|
||||
tactic_report::~tactic_report() {
|
||||
|
@ -74,9 +74,9 @@ void skip_tactic::operator()(goal_ref const & in,
|
|||
expr_dependency_ref & core) {
|
||||
result.reset();
|
||||
result.push_back(in.get());
|
||||
mc = 0;
|
||||
pc = 0;
|
||||
core = 0;
|
||||
mc = nullptr;
|
||||
pc = nullptr;
|
||||
core = nullptr;
|
||||
}
|
||||
|
||||
tactic * mk_skip_tactic() {
|
||||
|
@ -179,9 +179,9 @@ lbool check_sat(tactic & t, goal_ref & g, model_ref & md, labels_vec & labels, p
|
|||
bool models_enabled = g->models_enabled();
|
||||
bool proofs_enabled = g->proofs_enabled();
|
||||
bool cores_enabled = g->unsat_core_enabled();
|
||||
md = 0;
|
||||
pr = 0;
|
||||
core = 0;
|
||||
md = nullptr;
|
||||
pr = nullptr;
|
||||
core = nullptr;
|
||||
ast_manager & m = g->m();
|
||||
goal_ref_buffer r;
|
||||
model_converter_ref mc;
|
||||
|
|
|
@ -122,9 +122,9 @@ public:
|
|||
proof_converter_ref pc1;
|
||||
expr_dependency_ref core1(m);
|
||||
result.reset();
|
||||
mc = 0;
|
||||
pc = 0;
|
||||
core = 0;
|
||||
mc = nullptr;
|
||||
pc = nullptr;
|
||||
core = nullptr;
|
||||
m_t1->operator()(in, r1, mc1, pc1, core1);
|
||||
SASSERT(!is_decided(r1) || (!pc1 && !core1)); // the pc and core of decided goals is 0
|
||||
unsigned r1_size = r1.size();
|
||||
|
@ -176,7 +176,7 @@ public:
|
|||
// pc2 and core2 must be 0.
|
||||
SASSERT(!pc2);
|
||||
SASSERT(!core2);
|
||||
if (models_enabled) mc_buffer.push_back(0);
|
||||
if (models_enabled) mc_buffer.push_back(nullptr);
|
||||
if (proofs_enabled) pc_buffer.push_back(proof2proof_converter(m, r2[0]->pr(0)));
|
||||
if (models_enabled || proofs_enabled) sz_buffer.push_back(0);
|
||||
if (cores_enabled) core = m.mk_join(core.get(), r2[0]->dep(0));
|
||||
|
@ -200,7 +200,7 @@ public:
|
|||
apply(m, pc1, pc_buffer, pr);
|
||||
SASSERT(cores_enabled || core == 0);
|
||||
in->assert_expr(m.mk_false(), pr, core);
|
||||
core = 0;
|
||||
core = nullptr;
|
||||
result.push_back(in.get());
|
||||
SASSERT(!mc); SASSERT(!pc); SASSERT(!core);
|
||||
}
|
||||
|
@ -380,9 +380,9 @@ public:
|
|||
for (i = 0; i < sz; i++) {
|
||||
tactic * t = m_ts[i];
|
||||
result.reset();
|
||||
mc = 0;
|
||||
pc = 0;
|
||||
core = 0;
|
||||
mc = nullptr;
|
||||
pc = nullptr;
|
||||
core = nullptr;
|
||||
SASSERT(sz > 0);
|
||||
if (i < sz - 1) {
|
||||
try {
|
||||
|
@ -536,8 +536,8 @@ public:
|
|||
for (unsigned k = 0; k < _result.size(); k++) {
|
||||
result.push_back(_result[k]->translate(translator));
|
||||
}
|
||||
mc = _mc ? _mc->translate(translator) : 0;
|
||||
pc = _pc ? _pc->translate(translator) : 0;
|
||||
mc = _mc ? _mc->translate(translator) : nullptr;
|
||||
pc = _pc ? _pc->translate(translator) : nullptr;
|
||||
expr_dependency_translation td(translator);
|
||||
core = td(_core);
|
||||
}
|
||||
|
@ -562,7 +562,7 @@ public:
|
|||
}
|
||||
}
|
||||
if (finished_id == UINT_MAX) {
|
||||
mc = 0;
|
||||
mc = nullptr;
|
||||
switch (ex_kind) {
|
||||
case ERROR_EX: throw z3_error(error_code);
|
||||
case TACTIC_EX: throw tactic_exception(ex_msg.c_str());
|
||||
|
@ -626,9 +626,9 @@ public:
|
|||
proof_converter_ref pc1;
|
||||
expr_dependency_ref core1(m);
|
||||
result.reset();
|
||||
mc = 0;
|
||||
pc = 0;
|
||||
core = 0;
|
||||
mc = nullptr;
|
||||
pc = nullptr;
|
||||
core = nullptr;
|
||||
m_t1->operator()(in, r1, mc1, pc1, core1);
|
||||
SASSERT(!is_decided(r1) || (!pc1 && !core1)); // the pc and core of decided goals is 0
|
||||
unsigned r1_size = r1.size();
|
||||
|
@ -759,7 +759,7 @@ public:
|
|||
result.push_back(r2[0]->translate(translator));
|
||||
if (models_enabled) {
|
||||
// mc2 contains the actual model
|
||||
mc2 = mc2 ? mc2->translate(translator) : 0;
|
||||
mc2 = mc2 ? mc2->translate(translator) : nullptr;
|
||||
model_ref md;
|
||||
md = alloc(model, m);
|
||||
apply(mc2, md, 0);
|
||||
|
@ -776,12 +776,12 @@ public:
|
|||
SASSERT(!pc2);
|
||||
SASSERT(!core2);
|
||||
|
||||
if (models_enabled) mc_buffer.set(i, 0);
|
||||
if (models_enabled) mc_buffer.set(i, nullptr);
|
||||
if (proofs_enabled) {
|
||||
proof * pr = r2[0]->pr(0);
|
||||
pc_buffer.push_back(proof2proof_converter(m, pr));
|
||||
}
|
||||
if (cores_enabled && r2[0]->dep(0) != 0) {
|
||||
if (cores_enabled && r2[0]->dep(0) != nullptr) {
|
||||
expr_dependency_ref * new_dep = alloc(expr_dependency_ref, new_m);
|
||||
*new_dep = r2[0]->dep(0);
|
||||
core_buffer.set(i, new_dep);
|
||||
|
@ -815,12 +815,12 @@ public:
|
|||
if (found_solution)
|
||||
return;
|
||||
|
||||
core = 0;
|
||||
core = nullptr;
|
||||
sbuffer<unsigned> sz_buffer;
|
||||
for (unsigned i = 0; i < r1_size; i++) {
|
||||
ast_translation translator(*(managers[i]), m, false);
|
||||
goal_ref_buffer * r = goals_vect[i];
|
||||
if (r != 0) {
|
||||
if (r != nullptr) {
|
||||
for (unsigned k = 0; k < r->size(); k++) {
|
||||
result.push_back((*r)[k]->translate(translator));
|
||||
}
|
||||
|
@ -829,12 +829,12 @@ public:
|
|||
else {
|
||||
sz_buffer.push_back(0);
|
||||
}
|
||||
if (mc_buffer[i] != 0)
|
||||
if (mc_buffer[i] != nullptr)
|
||||
mc_buffer.set(i, mc_buffer[i]->translate(translator));
|
||||
if (pc_buffer[i] != 0)
|
||||
if (pc_buffer[i] != nullptr)
|
||||
pc_buffer.set(i, pc_buffer[i]->translate(translator));
|
||||
expr_dependency_translation td(translator);
|
||||
if (core_buffer[i] != 0) {
|
||||
if (core_buffer[i] != nullptr) {
|
||||
expr_dependency_ref curr_core(m);
|
||||
curr_core = td(*(core_buffer[i]));
|
||||
core = m.mk_join(curr_core, core);
|
||||
|
@ -850,7 +850,7 @@ public:
|
|||
apply(m, pc1, pc_buffer, pr);
|
||||
SASSERT(cores_enabled || core == 0);
|
||||
in->assert_expr(m.mk_false(), pr, core);
|
||||
core = 0;
|
||||
core = nullptr;
|
||||
result.push_back(in.get());
|
||||
SASSERT(!mc); SASSERT(!pc); SASSERT(!core);
|
||||
}
|
||||
|
@ -936,9 +936,9 @@ class repeat_tactical : public unary_tactical {
|
|||
// TODO: implement a non-recursive version.
|
||||
if (depth > m_max_depth) {
|
||||
result.push_back(in.get());
|
||||
mc = 0;
|
||||
pc = 0;
|
||||
core = 0;
|
||||
mc = nullptr;
|
||||
pc = nullptr;
|
||||
core = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -952,9 +952,9 @@ class repeat_tactical : public unary_tactical {
|
|||
proof_converter_ref pc1;
|
||||
expr_dependency_ref core1(m);
|
||||
result.reset();
|
||||
mc = 0;
|
||||
pc = 0;
|
||||
core = 0;
|
||||
mc = nullptr;
|
||||
pc = nullptr;
|
||||
core = nullptr;
|
||||
{
|
||||
goal orig_in(in->m(), proofs_enabled, models_enabled, cores_enabled);
|
||||
orig_in.copy_from(*(in.get()));
|
||||
|
@ -1014,7 +1014,7 @@ class repeat_tactical : public unary_tactical {
|
|||
SASSERT(is_decided_unsat(r2));
|
||||
SASSERT(!pc2);
|
||||
SASSERT(!core2);
|
||||
if (models_enabled) mc_buffer.push_back(0);
|
||||
if (models_enabled) mc_buffer.push_back(nullptr);
|
||||
if (proofs_enabled) pc_buffer.push_back(proof2proof_converter(m, r2[0]->pr(0)));
|
||||
if (models_enabled || proofs_enabled) sz_buffer.push_back(0);
|
||||
if (cores_enabled) core = m.mk_join(core.get(), r2[0]->dep(0));
|
||||
|
@ -1038,7 +1038,7 @@ class repeat_tactical : public unary_tactical {
|
|||
apply(m, pc1, pc_buffer, pr);
|
||||
SASSERT(cores_enabled || core == 0);
|
||||
in->assert_expr(m.mk_false(), pr, core);
|
||||
core = 0;
|
||||
core = nullptr;
|
||||
result.push_back(in.get());
|
||||
SASSERT(!mc); SASSERT(!pc); SASSERT(!core);
|
||||
}
|
||||
|
@ -1087,9 +1087,9 @@ public:
|
|||
m_t->operator()(in, result, mc, pc, core);
|
||||
if (result.size() > m_threshold) {
|
||||
result.reset();
|
||||
mc = 0;
|
||||
pc = 0;
|
||||
core = 0;
|
||||
mc = nullptr;
|
||||
pc = nullptr;
|
||||
core = nullptr;
|
||||
throw tactic_exception("failed-if-branching tactical");
|
||||
}
|
||||
};
|
||||
|
@ -1282,9 +1282,9 @@ public:
|
|||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
mc = 0;
|
||||
pc = 0;
|
||||
core = 0;
|
||||
mc = nullptr;
|
||||
pc = nullptr;
|
||||
core = nullptr;
|
||||
if (m_p->operator()(*(in.get())).is_true()) {
|
||||
throw tactic_exception("fail-if tactic");
|
||||
}
|
||||
|
@ -1314,7 +1314,7 @@ public:
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
if (in->proofs_enabled()) {
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
result.reset();
|
||||
result.push_back(in.get());
|
||||
}
|
||||
|
@ -1336,7 +1336,7 @@ public:
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
if (in->unsat_core_enabled()) {
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
result.reset();
|
||||
result.push_back(in.get());
|
||||
}
|
||||
|
@ -1358,7 +1358,7 @@ public:
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) override {
|
||||
if (in->models_enabled()) {
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
result.reset();
|
||||
result.push_back(in.get());
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ class macro_finder_tactic : public tactic {
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
tactic_report report("macro-finder", *g);
|
||||
|
||||
bool produce_proofs = g->proofs_enabled();
|
||||
|
@ -66,8 +66,8 @@ class macro_finder_tactic : public tactic {
|
|||
g->reset();
|
||||
for (unsigned i = 0; i < new_forms.size(); i++)
|
||||
g->assert_expr(new_forms.get(i),
|
||||
produce_proofs ? new_proofs.get(i) : 0,
|
||||
unsat_core_enabled ? new_deps.get(i) : 0);
|
||||
produce_proofs ? new_proofs.get(i) : nullptr,
|
||||
unsat_core_enabled ? new_deps.get(i) : nullptr);
|
||||
|
||||
extension_model_converter * evmc = alloc(extension_model_converter, mm.get_manager());
|
||||
unsigned num = mm.get_num_macros();
|
||||
|
|
|
@ -41,7 +41,7 @@ class quasi_macros_tactic : public tactic {
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
tactic_report report("quasi-macros", *g);
|
||||
|
||||
bool produce_proofs = g->proofs_enabled();
|
||||
|
@ -78,8 +78,8 @@ class quasi_macros_tactic : public tactic {
|
|||
g->reset();
|
||||
for (unsigned i = 0; i < new_forms.size(); i++)
|
||||
g->assert_expr(forms.get(i),
|
||||
produce_proofs ? proofs.get(i) : 0,
|
||||
produce_unsat_cores ? deps.get(i) : 0);
|
||||
produce_proofs ? proofs.get(i) : nullptr,
|
||||
produce_unsat_cores ? deps.get(i) : nullptr);
|
||||
|
||||
extension_model_converter * evmc = alloc(extension_model_converter, mm.get_manager());
|
||||
unsigned num = mm.get_num_macros();
|
||||
|
|
|
@ -37,7 +37,7 @@ class ufbv_rewriter_tactic : public tactic {
|
|||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
mc = nullptr; pc = nullptr; core = nullptr;
|
||||
tactic_report report("ufbv-rewriter", *g);
|
||||
fail_if_unsat_core_generation("ufbv-rewriter", g);
|
||||
|
||||
|
@ -58,9 +58,9 @@ class ufbv_rewriter_tactic : public tactic {
|
|||
|
||||
g->reset();
|
||||
for (unsigned i = 0; i < new_forms.size(); i++)
|
||||
g->assert_expr(new_forms.get(i), produce_proofs ? new_proofs.get(i) : 0, 0);
|
||||
g->assert_expr(new_forms.get(i), produce_proofs ? new_proofs.get(i) : nullptr, nullptr);
|
||||
|
||||
mc = 0; // CMW: Remark: The demodulator could potentially remove all references to a variable.
|
||||
mc = nullptr; // CMW: Remark: The demodulator could potentially remove all references to a variable.
|
||||
|
||||
g->inc_depth();
|
||||
result.push_back(g.get());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue