3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 19:35:50 +00:00

fixes to mostly solver arith/euf and backtracking scopes

This commit is contained in:
Nikolaj Bjorner 2020-10-26 11:06:34 -07:00
parent 1ee2ba2a9b
commit 8d76470a8a
25 changed files with 189 additions and 93 deletions

View file

@ -39,14 +39,27 @@ namespace arith {
auto t = get_tv(v);
auto vi = lp().external_to_column_index(v);
out << "v" << v << " ";
if (t.is_null()) out << "null"; else out << (t.is_term() ? "t" : "j") << vi;
if (m_nla && m_nla->use_nra_model() && can_get_ivalue(v)) {
scoped_anum an(m_nla->am());
m_nla->am().display(out << " = ", nl_value(v, an));
if (is_bool(v)) {
euf::enode* n = var2enode(v);
api_bound* b = nullptr;
if (m_bool_var2bound.find(n->bool_var(), b)) {
sat::literal lit = b->get_lit();
out << lit << " " << s().value(lit);
}
}
else {
if (t.is_null())
out << "null";
else
out << (t.is_term() ? "t" : "j") << vi;
if (m_nla && m_nla->use_nra_model() && can_get_ivalue(v)) {
scoped_anum an(m_nla->am());
m_nla->am().display(out << " = ", nl_value(v, an));
}
else if (can_get_value(v)) out << " = " << get_value(v);
if (is_int(v)) out << ", int";
if (ctx.is_shared(var2enode(v))) out << ", shared";
}
else if (can_get_value(v)) out << " = " << get_value(v);
if (is_int(v)) out << ", int";
if (ctx.is_shared(var2enode(v))) out << ", shared";
out << " := " << mk_bounded_pp(var2expr(v), m) << "\n";
}
return out;