3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-14 21:08:46 +00:00

fix constant offset and handling of ite in difference logic optimizer code-path. Issue #946

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-03-24 02:23:50 -07:00
parent 5d11a1cdb2
commit ec47706226
2 changed files with 10 additions and 3 deletions

View file

@ -273,7 +273,8 @@ namespace opt {
display_benchmark();
IF_VERBOSE(1, verbose_stream() << "(optimize:check-sat)\n";);
lbool is_sat = s.check_sat(0,0);
TRACE("opt", tout << "initial search result: " << is_sat << "\n";);
TRACE("opt", tout << "initial search result: " << is_sat << "\n";
s.display(tout););
if (is_sat != l_false) {
s.get_model(m_model);
s.get_labels(m_labels);
@ -1037,6 +1038,10 @@ namespace opt {
TRACE("opt", tout << "Purifying " << term << "\n";);
term = purify(fm, term);
}
else if (m.is_ite(term)) {
TRACE("opt", tout << "Purifying " << term << "\n";);
term = purify(fm, term);
}
if (fm) {
m_model_converter = concat(m_model_converter.get(), fm.get());
}

View file

@ -868,7 +868,8 @@ namespace smt {
e = ctx.get_enode(to_app(n));
}
else {
e = ctx.mk_enode(to_app(n), false, false, true);
ctx.internalize(n, false);
e = ctx.get_enode(n);
}
v = e->get_th_var(get_id());
if (v == null_theory_var) {
@ -1008,7 +1009,8 @@ namespace smt {
inf_eps result(rational(0), r);
blocker = mk_gt(v, result);
IF_VERBOSE(10, verbose_stream() << blocker << "\n";);
return result;
r += m_objective_consts[v];
return inf_eps(rational(0), r);
}
default:
TRACE("opt", tout << "unbounded\n"; );