mirror of
https://github.com/Z3Prover/z3
synced 2025-04-13 12:28:44 +00:00
fix bcd2
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
c3b7c738f8
commit
182fea2d7b
|
@ -91,7 +91,7 @@ namespace opt {
|
|||
rational r = m_lower;
|
||||
if (m_msolver) {
|
||||
rational q = m_msolver->get_lower();
|
||||
if (r < q) r = q;
|
||||
if (q > r) r = q;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ namespace opt {
|
|||
rational r = m_upper;
|
||||
if (m_msolver) {
|
||||
rational q = m_msolver->get_upper();
|
||||
if (r > q) r = q;
|
||||
if (q < r) r = q;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
|
|
@ -612,7 +612,6 @@ namespace opt {
|
|||
return mk_objective_fn(index, O_MAXSMT, num_fmls, fmls);
|
||||
}
|
||||
|
||||
|
||||
void context::from_fmls(expr_ref_vector const& fmls) {
|
||||
TRACE("opt",
|
||||
for (unsigned i = 0; i < fmls.size(); ++i) {
|
||||
|
@ -625,7 +624,7 @@ namespace opt {
|
|||
app_ref tr(m);
|
||||
expr_ref_vector terms(m);
|
||||
vector<rational> weights;
|
||||
rational offset;
|
||||
rational offset(0);
|
||||
unsigned index;
|
||||
symbol id;
|
||||
bool neg;
|
||||
|
@ -737,7 +736,7 @@ namespace opt {
|
|||
}
|
||||
}
|
||||
if (ok) {
|
||||
m_maxsmts.find(obj.m_id)->update_lower(r, override);
|
||||
m_maxsmts.find(obj.m_id)->update_upper(r, override);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -749,7 +748,6 @@ namespace opt {
|
|||
|
||||
}
|
||||
|
||||
|
||||
void context::display_assignment(std::ostream& out) {
|
||||
for (unsigned i = 0; i < m_objectives.size(); ++i) {
|
||||
objective const& obj = m_objectives[i];
|
||||
|
@ -763,7 +761,6 @@ namespace opt {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void context::display_objective(std::ostream& out, objective const& obj) const {
|
||||
switch(obj.m_type) {
|
||||
case O_MAXSMT: {
|
||||
|
|
|
@ -300,6 +300,7 @@ namespace opt {
|
|||
unsigned s = *subC.begin();
|
||||
wcore& c_s = m_cores[s];
|
||||
c_s.m_lower = refine(c_s.m_R, c_s.m_mid);
|
||||
c_s.m_mid = div(c_s.m_lower + c_s.m_upper, rational(2));
|
||||
}
|
||||
else {
|
||||
wcore c_s;
|
||||
|
|
Loading…
Reference in a new issue