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
|
@ -57,11 +57,11 @@ void simple_check_sat_result::get_model(model_ref & m) {
|
|||
if (m_status != l_false)
|
||||
m = m_model;
|
||||
else
|
||||
m = 0;
|
||||
m = nullptr;
|
||||
}
|
||||
|
||||
proof * simple_check_sat_result::get_proof() {
|
||||
return m_status == l_false ? m_proof.get() : 0;
|
||||
return m_status == l_false ? m_proof.get() : nullptr;
|
||||
}
|
||||
|
||||
std::string simple_check_sat_result::reason_unknown() const {
|
||||
|
|
|
@ -136,7 +136,7 @@ struct mus::imp {
|
|||
|
||||
// use correction sets
|
||||
lbool get_mus2(expr_ref_vector& mus) {
|
||||
expr* lit = 0;
|
||||
expr* lit = nullptr;
|
||||
lbool is_sat;
|
||||
ptr_vector<expr> unknown(m_lit2expr.size(), m_lit2expr.c_ptr());
|
||||
while (!unknown.empty()) {
|
||||
|
@ -163,7 +163,7 @@ struct mus::imp {
|
|||
expr_ref_vector nmcs(m);
|
||||
expr_set core, min_core, nmcs_set;
|
||||
bool min_core_valid = false;
|
||||
expr* min_lit = 0;
|
||||
expr* min_lit = nullptr;
|
||||
while (!unknown.empty()) {
|
||||
expr* lit = unknown.back();
|
||||
unknown.pop_back();
|
||||
|
|
|
@ -31,7 +31,7 @@ unsigned solver::get_num_assertions() const {
|
|||
|
||||
expr * solver::get_assertion(unsigned idx) const {
|
||||
NOT_IMPLEMENTED_YET();
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::ostream& solver::display(std::ostream & out, unsigned n, expr* const* assumptions) const {
|
||||
|
@ -156,7 +156,7 @@ lbool solver::find_mutexes(expr_ref_vector const& vars, vector<expr_ref_vector>&
|
|||
}
|
||||
|
||||
lbool solver::preferred_sat(expr_ref_vector const& asms, vector<expr_ref_vector>& cores) {
|
||||
return check_sat(0, 0);
|
||||
return check_sat(0, nullptr);
|
||||
}
|
||||
|
||||
bool solver::is_literal(ast_manager& m, expr* e) {
|
||||
|
|
|
@ -34,7 +34,7 @@ void extract_clauses_and_dependencies(goal_ref const& g, expr_ref_vector& clause
|
|||
for (unsigned i = 0; i < sz; i++) {
|
||||
expr * f = g->form(i);
|
||||
expr_dependency * d = g->dep(i);
|
||||
if (d == 0 || !g->unsat_core_enabled()) {
|
||||
if (d == nullptr || !g->unsat_core_enabled()) {
|
||||
clauses.push_back(f);
|
||||
}
|
||||
else {
|
||||
|
@ -58,9 +58,9 @@ void extract_clauses_and_dependencies(goal_ref const& g, expr_ref_vector& clause
|
|||
}
|
||||
else {
|
||||
// must normalize assumption
|
||||
expr * b = 0;
|
||||
expr * b = nullptr;
|
||||
if (!dep2bool.find(d, b)) {
|
||||
b = m.mk_fresh_const(0, m.mk_bool_sort());
|
||||
b = m.mk_fresh_const(nullptr, m.mk_bool_sort());
|
||||
dep2bool.insert(d, b);
|
||||
bool2dep.insert(b, d);
|
||||
assumptions.push_back(b);
|
||||
|
@ -106,7 +106,7 @@ public:
|
|||
/* out */ model_converter_ref & mc,
|
||||
/* out */ proof_converter_ref & pc,
|
||||
/* out */ expr_dependency_ref & core) override {
|
||||
pc = 0; mc = 0; core = 0;
|
||||
pc = nullptr; mc = nullptr; core = nullptr;
|
||||
expr_ref_vector clauses(m);
|
||||
expr2expr_map bool2dep;
|
||||
ptr_vector<expr> assumptions;
|
||||
|
@ -128,8 +128,8 @@ public:
|
|||
break;
|
||||
case l_false: {
|
||||
in->reset();
|
||||
proof* pr = 0;
|
||||
expr_dependency* lcore = 0;
|
||||
proof* pr = nullptr;
|
||||
expr_dependency* lcore = nullptr;
|
||||
if (in->proofs_enabled()) {
|
||||
pr = local_solver->get_proof();
|
||||
pc = proof2proof_converter(m, pr);
|
||||
|
|
|
@ -31,7 +31,7 @@ solver_na2as::solver_na2as(ast_manager & m):
|
|||
solver_na2as::~solver_na2as() {}
|
||||
|
||||
void solver_na2as::assert_expr(expr * t, expr * a) {
|
||||
if (a == 0) {
|
||||
if (a == nullptr) {
|
||||
assert_expr(t);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -105,12 +105,12 @@ void tactic2solver::collect_param_descrs(param_descrs & r) {
|
|||
|
||||
void tactic2solver::assert_expr(expr * t) {
|
||||
m_assertions.push_back(t);
|
||||
m_result = 0;
|
||||
m_result = nullptr;
|
||||
}
|
||||
|
||||
void tactic2solver::push_core() {
|
||||
m_scopes.push_back(m_assertions.size());
|
||||
m_result = 0;
|
||||
m_result = nullptr;
|
||||
}
|
||||
|
||||
void tactic2solver::pop_core(unsigned n) {
|
||||
|
@ -118,11 +118,11 @@ void tactic2solver::pop_core(unsigned n) {
|
|||
unsigned old_sz = m_scopes[new_lvl];
|
||||
m_assertions.shrink(old_sz);
|
||||
m_scopes.shrink(new_lvl);
|
||||
m_result = 0;
|
||||
m_result = nullptr;
|
||||
}
|
||||
|
||||
lbool tactic2solver::check_sat_core(unsigned num_assumptions, expr * const * assumptions) {
|
||||
if (m_tactic.get() == 0)
|
||||
if (m_tactic.get() == nullptr)
|
||||
return l_false;
|
||||
ast_manager & m = m_assertions.m();
|
||||
m_result = alloc(simple_check_sat_result, m);
|
||||
|
@ -187,7 +187,7 @@ lbool tactic2solver::check_sat_core(unsigned num_assumptions, expr * const * ass
|
|||
solver* tactic2solver::translate(ast_manager& m, params_ref const& p) {
|
||||
tactic* t = m_tactic->translate(m);
|
||||
tactic2solver* r = alloc(tactic2solver, m, t, p, m_produce_proofs, m_produce_models, m_produce_unsat_cores, m_logic);
|
||||
r->m_result = 0;
|
||||
r->m_result = nullptr;
|
||||
if (!m_scopes.empty()) {
|
||||
throw default_exception("translation of contexts is only supported at base level");
|
||||
}
|
||||
|
@ -220,7 +220,7 @@ proof * tactic2solver::get_proof() {
|
|||
if (m_result.get())
|
||||
return m_result->get_proof();
|
||||
else
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::string tactic2solver::reason_unknown() const {
|
||||
|
|
|
@ -30,7 +30,7 @@ class solver;
|
|||
class solver_factory;
|
||||
|
||||
solver * mk_tactic2solver(ast_manager & m,
|
||||
tactic * t = 0,
|
||||
tactic * t = nullptr,
|
||||
params_ref const & p = params_ref(),
|
||||
bool produce_proofs = false,
|
||||
bool produce_models = true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue