mirror of
https://github.com/Z3Prover/z3
synced 2025-04-30 04:15:51 +00:00
prep for pragmas
This commit is contained in:
parent
6670cf0b65
commit
dcc01b874a
10 changed files with 124 additions and 78 deletions
|
@ -233,45 +233,46 @@ namespace arith {
|
|||
SASSERT(b1.get_var() == b2.get_var());
|
||||
if (k1 == k2 && kind1 == kind2) return;
|
||||
SASSERT(k1 != k2 || kind1 != kind2);
|
||||
char const* bound_params = "farkas 1 1";
|
||||
|
||||
if (kind1 == lp_api::lower_t) {
|
||||
if (kind2 == lp_api::lower_t) {
|
||||
if (k2 <= k1)
|
||||
add_clause(~l1, l2);
|
||||
add_clause(~l1, l2, bound_params);
|
||||
else
|
||||
add_clause(l1, ~l2);
|
||||
add_clause(l1, ~l2, bound_params);
|
||||
}
|
||||
else if (k1 <= k2)
|
||||
// k1 <= k2, k1 <= x or x <= k2
|
||||
add_clause(l1, l2);
|
||||
else {
|
||||
// k1 > hi_inf, k1 <= x => ~(x <= hi_inf)
|
||||
add_clause(~l1, ~l2);
|
||||
add_clause(~l1, ~l2, bound_params);
|
||||
if (v_is_int && k1 == k2 + rational(1))
|
||||
// k1 <= x or x <= k1-1
|
||||
add_clause(l1, l2);
|
||||
add_clause(l1, l2, bound_params);
|
||||
}
|
||||
}
|
||||
else if (kind2 == lp_api::lower_t) {
|
||||
if (k1 >= k2)
|
||||
// k1 >= lo_inf, k1 >= x or lo_inf <= x
|
||||
add_clause(l1, l2);
|
||||
add_clause(l1, l2, bound_params);
|
||||
else {
|
||||
// k1 < k2, k2 <= x => ~(x <= k1)
|
||||
add_clause(~l1, ~l2);
|
||||
add_clause(~l1, ~l2, bound_params);
|
||||
if (v_is_int && k1 == k2 - rational(1))
|
||||
// x <= k1 or k1+l <= x
|
||||
add_clause(l1, l2);
|
||||
add_clause(l1, l2, bound_params);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// kind1 == A_UPPER, kind2 == A_UPPER
|
||||
if (k1 >= k2)
|
||||
// k1 >= k2, x <= k2 => x <= k1
|
||||
add_clause(l1, ~l2);
|
||||
add_clause(l1, ~l2, bound_params);
|
||||
else
|
||||
// k1 <= hi_sup , x <= k1 => x <= hi_sup
|
||||
add_clause(~l1, l2);
|
||||
add_clause(~l1, l2, bound_params);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -498,8 +499,8 @@ namespace arith {
|
|||
if (x->get_root() == y->get_root())
|
||||
return;
|
||||
reset_evidence();
|
||||
set_evidence(ci1, m_core, m_eqs);
|
||||
set_evidence(ci2, m_core, m_eqs);
|
||||
set_evidence(ci1);
|
||||
set_evidence(ci2);
|
||||
++m_stats.m_fixed_eqs;
|
||||
auto* jst = euf::th_explain::propagate(*this, m_core, m_eqs, x, y);
|
||||
ctx.propagate(x, y, jst->to_index());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue