mirror of
https://github.com/Z3Prover/z3
synced 2025-06-29 17:38:45 +00:00
Use nullptr.
This commit is contained in:
parent
f01328c65f
commit
76eb7b9ede
625 changed files with 4639 additions and 4639 deletions
|
@ -50,15 +50,15 @@ namespace smt {
|
|||
bound * l = lower(v);
|
||||
bound * u = upper(v);
|
||||
const inf_numeral & val = get_value(v);
|
||||
if (l != 0 && u != 0) {
|
||||
if (l != nullptr && u != nullptr) {
|
||||
if (val != l->get_value() && val != u->get_value())
|
||||
set_value(v, l->get_value());
|
||||
}
|
||||
else if (l != 0) {
|
||||
else if (l != nullptr) {
|
||||
if (val != l->get_value())
|
||||
set_value(v, l->get_value());
|
||||
}
|
||||
else if (u != 0) {
|
||||
else if (u != nullptr) {
|
||||
if (val != u->get_value())
|
||||
set_value(v, u->get_value());
|
||||
}
|
||||
|
@ -245,12 +245,12 @@ namespace smt {
|
|||
numeral const_coeff(0);
|
||||
|
||||
bound* l = lower(b), *u = upper(b);
|
||||
if (l != 0 && get_value(b) - inf_numeral(1) < l->get_value()) {
|
||||
if (l != nullptr && get_value(b) - inf_numeral(1) < l->get_value()) {
|
||||
SASSERT(l->get_value() <= get_value(b));
|
||||
is_tight = true;
|
||||
const_coeff = l->get_value().get_rational();
|
||||
}
|
||||
else if (u != 0 && get_value(b) + inf_numeral(1) > u->get_value()) {
|
||||
else if (u != nullptr && get_value(b) + inf_numeral(1) > u->get_value()) {
|
||||
SASSERT(get_value(b) <= u->get_value());
|
||||
is_tight = true;
|
||||
const_coeff = u->get_value().get_rational();
|
||||
|
@ -1074,7 +1074,7 @@ namespace smt {
|
|||
derived_bound * new_bound = alloc(derived_bound, v, inf_numeral(k), lower ? B_LOWER : B_UPPER);
|
||||
t.m_tmp_lit_set.reset();
|
||||
t.m_tmp_eq_set.reset();
|
||||
if (old_bound != 0) {
|
||||
if (old_bound != nullptr) {
|
||||
t.accumulate_justification(*old_bound, *new_bound, numeral(0) /* refine for proof gen */, t.m_tmp_lit_set, t.m_tmp_eq_set);
|
||||
}
|
||||
unsigned_vector::const_iterator it = js.begin();
|
||||
|
@ -1174,8 +1174,8 @@ namespace smt {
|
|||
c2 = rational(c);
|
||||
TRACE("euclidean_solver_new", tout << "new fixed: " << c2 << "\n";);
|
||||
propagated = true;
|
||||
mk_lower(v, c2, 0, m_js);
|
||||
mk_upper(v, c2, 0, m_js);
|
||||
mk_lower(v, c2, nullptr, m_js);
|
||||
mk_upper(v, c2, nullptr, m_js);
|
||||
}
|
||||
else {
|
||||
TRACE("euclidean_solver", tout << "inequality can be tightned, since all coefficients are multiple of: " << g << "\n";);
|
||||
|
@ -1187,7 +1187,7 @@ namespace smt {
|
|||
bound * l = t.lower(v);
|
||||
bound * u = t.upper(v);
|
||||
c2 = rational(c);
|
||||
if (l != 0) {
|
||||
if (l != nullptr) {
|
||||
rational l_old = l->get_value().get_rational().to_rational();
|
||||
rational l_new = g*ceil((l_old - c2)/g) + c2;
|
||||
TRACE("euclidean_solver_new", tout << "new lower: " << l_new << " old: " << l_old << "\n";
|
||||
|
@ -1197,7 +1197,7 @@ namespace smt {
|
|||
mk_lower(v, l_new, l, m_js);
|
||||
}
|
||||
}
|
||||
if (u != 0) {
|
||||
if (u != nullptr) {
|
||||
rational u_old = u->get_value().get_rational().to_rational();
|
||||
rational u_new = g*floor((u_old - c2)/g) + c2;
|
||||
TRACE("euclidean_solver_new", tout << "new upper: " << u_new << " old: " << u_old << "\n";);
|
||||
|
@ -1223,7 +1223,7 @@ namespace smt {
|
|||
continue; // skip equations...
|
||||
if (!t.is_int(v))
|
||||
continue; // skip non integer definitions...
|
||||
if (t.lower(v) == 0 && t.upper(v) == 0)
|
||||
if (t.lower(v) == nullptr && t.upper(v) == nullptr)
|
||||
continue; // there is nothing to be tightned
|
||||
if (tight_bounds(v))
|
||||
propagated = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue