mirror of
https://github.com/Z3Prover/z3
synced 2025-05-01 04:45:52 +00:00
fix a bug in nla_expr
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
1e625db84b
commit
87cc5c8d96
6 changed files with 48 additions and 21 deletions
|
@ -277,7 +277,9 @@ std::ostream& core::print_explanation(const lp::explanation& exp, std::ostream&
|
|||
out << "expl: ";
|
||||
for (auto &p : exp) {
|
||||
out << "(" << p.second << ")";
|
||||
m_lar_solver.print_constraint_indices_only(p.second, out);
|
||||
m_lar_solver.print_constraint_indices_only_customized(p.second,
|
||||
[this](lpvar j) { return var_str(j);},
|
||||
out);
|
||||
out << " ";
|
||||
}
|
||||
out << "\n";
|
||||
|
@ -1397,13 +1399,16 @@ std::ostream& core::print_terms(std::ostream& out) const {
|
|||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
std::string core::var_str(lpvar j) const {
|
||||
return is_monomial_var(j)?
|
||||
(product_indices_str(m_emons[j].vars()) + (check_monomial(m_emons[j])? "": "_")) : (std::string("v") + lp::T_to_string(j));
|
||||
}
|
||||
|
||||
std::ostream& core::print_term( const lp::lar_term& t, std::ostream& out) const {
|
||||
return lp::print_linear_combination_customized(
|
||||
t.coeffs_as_vector(),
|
||||
[this](lpvar j) {
|
||||
return is_monomial_var(j)?
|
||||
(product_indices_str(m_emons[j].vars()) + (check_monomial(m_emons[j])? "": "_")) : (std::string("v") + lp::T_to_string(j));
|
||||
},
|
||||
[this](lpvar j) { return var_str(j); },
|
||||
out);
|
||||
}
|
||||
} // end of nla
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue