3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-06 07:15:47 +00:00

fixes/debugging

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2021-11-02 14:48:19 -07:00
parent 4c81f8676c
commit 3f3bd5948f
5 changed files with 41 additions and 30 deletions

View file

@ -147,20 +147,26 @@ namespace polysat {
auto c2 = s.ule(y, pddm.mk_val(y_lo));
new_constraints.insert(c1);
new_constraints.insert(c2);
LOG("bounded " << bound << " : " << c1 << " " << c2);
LOG("bounded " << bound << " : " << x << " " << x_max << " " << y << " " << y_max << " " << c1 << " " << c2);
}
rational inf_saturate::max_value(pdd const& x) {
if (x.is_var())
return s.m_viable.max_viable(x.var());
else if (x.is_val())
return x.val();
else
return x.manager().max_value();
}
// determine worst case upper bounds for x, y
// then extract premises for a non-worst-case bound.
void inf_saturate::push_omega(vector<signed_constraint>& new_constraints, pdd const& x, pdd const& y) {
auto& pddm = x.manager();
rational x_max = pddm.max_value();
rational y_max = pddm.max_value();
rational x_max = max_value(x);
rational y_max = max_value(y);
if (x.is_var())
x_max = s.m_viable.max_viable(x.var());
if (y.is_var())
y_max = s.m_viable.max_viable(y.var());
LOG("pushing " << x << " " << y);
if (x_max * y_max > pddm.max_value())
push_omega_bisect(new_constraints, x, x_max, y, y_max);