3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-14 23:05:26 +00:00

Use nullptr.

This commit is contained in:
Bruce Mitchener 2018-02-12 14:05:55 +07:00
parent f01328c65f
commit 76eb7b9ede
625 changed files with 4639 additions and 4639 deletions

View file

@ -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);

View file

@ -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()() {

View file

@ -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);

View file

@ -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];
}
};