mirror of
https://github.com/Z3Prover/z3
synced 2025-06-29 17:38:45 +00:00
merge with master
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
commit
c513f3ca09
883 changed files with 13979 additions and 16480 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());
|
||||
}
|
||||
|
@ -247,12 +247,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();
|
||||
|
@ -474,7 +474,7 @@ namespace smt {
|
|||
bounds.num_params(), bounds.params("gomory-cut")) {
|
||||
}
|
||||
// Remark: the assignment must be propagated back to arith
|
||||
virtual theory_id get_from_theory() const { return null_theory_id; }
|
||||
theory_id get_from_theory() const override { return null_theory_id; }
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1076,7 +1076,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();
|
||||
|
@ -1176,8 +1176,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";);
|
||||
|
@ -1189,7 +1189,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";
|
||||
|
@ -1199,7 +1199,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";);
|
||||
|
@ -1225,7 +1225,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