mirror of
https://github.com/Z3Prover/z3
synced 2025-07-23 04:38:53 +00:00
update model during Lex
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
519c9dba25
commit
53f82e3239
3 changed files with 11 additions and 5 deletions
|
@ -204,7 +204,7 @@ namespace opt {
|
||||||
set_conflict(0, justification(justification::AXIOM));
|
set_conflict(0, justification(justification::AXIOM));
|
||||||
}
|
}
|
||||||
else if (sz == 1) {
|
else if (sz == 1) {
|
||||||
IF_VERBOSE(1, verbose_stream() << "unit literal : " << S[0] << " " << val << "\n";);
|
IF_VERBOSE(2, verbose_stream() << "unit literal : " << S[0] << " " << val << "\n";);
|
||||||
assign(S[0], val, justification(justification::AXIOM));
|
assign(S[0], val, justification(justification::AXIOM));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -221,6 +221,7 @@ namespace opt {
|
||||||
inc_score(clause_id);
|
inc_score(clause_id);
|
||||||
}
|
}
|
||||||
TRACE("opt", display(tout, j););
|
TRACE("opt", display(tout, j););
|
||||||
|
IF_VERBOSE(1, if (!sign) display(verbose_stream(), j););
|
||||||
if (!sign && m_enable_simplex) {
|
if (!sign && m_enable_simplex) {
|
||||||
add_simplex_row(!sign, sz, S);
|
add_simplex_row(!sign, sz, S);
|
||||||
}
|
}
|
||||||
|
@ -246,6 +247,7 @@ namespace opt {
|
||||||
pop(scope_lvl());
|
pop(scope_lvl());
|
||||||
|
|
||||||
|
|
||||||
|
IF_VERBOSE(1, verbose_stream() << "(hsmax.negated-size: " << fsz << ")\n";);
|
||||||
#if 0
|
#if 0
|
||||||
// garbage collect agressively on exit.
|
// garbage collect agressively on exit.
|
||||||
// all learned clases for negative branches are
|
// all learned clases for negative branches are
|
||||||
|
|
|
@ -269,6 +269,9 @@ namespace opt {
|
||||||
if (r == l_true && !get_lower_as_num(i).is_finite()) {
|
if (r == l_true && !get_lower_as_num(i).is_finite()) {
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
if (r == l_true && i + 1 < m_objectives.size()) {
|
||||||
|
update_lower(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
DEBUG_CODE(if (r == l_true) validate_lex(););
|
DEBUG_CODE(if (r == l_true) validate_lex(););
|
||||||
return r;
|
return r;
|
||||||
|
@ -841,6 +844,7 @@ namespace opt {
|
||||||
switch(obj.m_type) {
|
switch(obj.m_type) {
|
||||||
case O_MAXSMT: {
|
case O_MAXSMT: {
|
||||||
rational r = m_maxsmts.find(obj.m_id)->get_upper();
|
rational r = m_maxsmts.find(obj.m_id)->get_upper();
|
||||||
|
TRACE("opt", tout << "maxsmt: " << r << " negate: " << obj.m_neg << " offset: " << obj.m_offset << "\n";);
|
||||||
if (obj.m_neg) r.neg();
|
if (obj.m_neg) r.neg();
|
||||||
r += obj.m_offset;
|
r += obj.m_offset;
|
||||||
return inf_eps(r);
|
return inf_eps(r);
|
||||||
|
|
|
@ -701,9 +701,9 @@ namespace opt {
|
||||||
TRACE("opt", tout << "no more cores\n";);
|
TRACE("opt", tout << "no more cores\n";);
|
||||||
m_lower = m_upper;
|
m_lower = m_upper;
|
||||||
return l_true;
|
return l_true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return l_true;
|
return l_true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue