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

fix a bug in Horner heuristic

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2020-04-23 15:58:53 -07:00
parent 8f297666fe
commit 8921ed56b5
16 changed files with 42 additions and 58 deletions

View file

@ -75,7 +75,7 @@ struct imp {
void generate_tang_plane(const point & pl) {
c().add_empty_lemma();
c().add_lemma();
c().negate_relation(m_jx, m_x.rat_sign()*pl.x);
c().negate_relation(m_jy, m_y.rat_sign()*pl.y);
#if Z3DEBUG
@ -95,12 +95,12 @@ struct imp {
}
void generate_two_tang_lines() {
m_tang.add_empty_lemma();
m_tang.add_lemma();
// Should be v = val(m_x)*val(m_y), and val(factor) = factor.rat_sign()*var(factor.var())
c().mk_ineq(m_jx, llc::NE, c().val(m_jx));
c().mk_ineq(m_j, - m_y.rat_sign() * m_xy.x, m_jy, llc::EQ);
m_tang.add_empty_lemma();
m_tang.add_lemma();
c().mk_ineq(m_jy, llc::NE, c().val(m_jy));
c().mk_ineq(m_j, - m_x.rat_sign() * m_xy.y, m_jx, llc::EQ);
}