3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-29 17:38:45 +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

@ -121,7 +121,7 @@ namespace smt {
bool visited = true;
family_id fid = to_app(n)->get_family_id();
theory * th = m_theories.get_plugin(fid);
bool def_int = th == 0 || th->default_internalizer();
bool def_int = th == nullptr || th->default_internalizer();
if (!def_int) {
ptr_buffer<expr> descendants;
get_foreign_descendants(to_app(n), fid, descendants);
@ -301,7 +301,7 @@ namespace smt {
e->mark_as_interpreted();
app_ref eq(m_manager.mk_eq(fapp, val), m_manager);
TRACE("assert_distinct", tout << "eq: " << mk_pp(eq, m_manager) << "\n";);
assert_default(eq, 0);
assert_default(eq, nullptr);
mark_as_relevant(eq.get());
// TODO: we may want to hide the auxiliary values val and the function f from the model.
}
@ -695,7 +695,7 @@ namespace smt {
void context::internalize_term(app * n) {
if (e_internalized(n)) {
theory * th = m_theories.get_plugin(n->get_family_id());
if (th != 0) {
if (th != nullptr) {
// This code is necessary because some theories may decide
// not to create theory variables for a nested application.
// Example:
@ -1271,7 +1271,7 @@ namespace smt {
case CLS_AUX: {
literal_buffer simp_lits;
if (!simplify_aux_clause_literals(num_lits, lits, simp_lits))
return 0; // clause is equivalent to true;
return nullptr; // clause is equivalent to true;
DEBUG_CODE({
for (unsigned i = 0; i < simp_lits.size(); i++) {
SASSERT(get_assignment(simp_lits[i]) == l_true);
@ -1284,7 +1284,7 @@ namespace smt {
}
case CLS_AUX_LEMMA: {
if (!simplify_aux_lemma_literals(num_lits, lits))
return 0; // clause is equivalent to true
return nullptr; // clause is equivalent to true
// simplify_aux_lemma_literals does not delete literals assigned to false, so
// it is not necessary to create a unit_resolution_justification
break;
@ -1303,14 +1303,14 @@ namespace smt {
if (j && !j->in_region())
m_justifications.push_back(j);
TRACE("mk_clause", tout << "empty clause... setting conflict\n";);
set_conflict(j == 0 ? b_justification::mk_axiom() : b_justification(j));
set_conflict(j == nullptr ? b_justification::mk_axiom() : b_justification(j));
SASSERT(inconsistent());
return 0;
return nullptr;
case 1:
if (j && !j->in_region())
m_justifications.push_back(j);
assign(lits[0], j);
return 0;
return nullptr;
case 2:
if (use_binary_clause_opt(lits[0], lits[1], lemma)) {
literal l1 = lits[0];
@ -1321,7 +1321,7 @@ namespace smt {
assign(l1, b_justification(~l2));
m_stats.m_num_mk_bin_clause++;
return 0;
return nullptr;
}
default: {
m_stats.m_num_mk_clause++;
@ -1404,7 +1404,7 @@ namespace smt {
}
void context::mk_th_axiom(theory_id tid, unsigned num_lits, literal * lits, unsigned num_params, parameter * params) {
justification * js = 0;
justification * js = nullptr;
TRACE("mk_th_axiom",
display_literals_verbose(tout, num_lits, lits);
tout << "\n";);
@ -1449,12 +1449,12 @@ namespace smt {
void context::mk_gate_clause(unsigned num_lits, literal * lits) {
if (m_manager.proofs_enabled()) {
proof * pr = mk_clause_def_axiom(num_lits, lits, 0);
proof * pr = mk_clause_def_axiom(num_lits, lits, nullptr);
TRACE("gate_clause", tout << mk_ll_pp(pr, m_manager););
mk_clause(num_lits, lits, mk_justification(justification_proof_wrapper(*this, pr)));
}
else {
mk_clause(num_lits, lits, 0);
mk_clause(num_lits, lits, nullptr);
}
}
@ -1487,7 +1487,7 @@ namespace smt {
mk_clause(num_lits, lits, mk_justification(justification_proof_wrapper(*this, pr)));
}
else {
mk_clause(num_lits, lits, 0);
mk_clause(num_lits, lits, nullptr);
}
}