mirror of
https://github.com/Z3Prover/z3
synced 2026-02-16 05:41:43 +00:00
optionally call add_zero_assumption on a vanishing discriminant
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
ac58f53703
commit
784ea42521
4 changed files with 14 additions and 0 deletions
|
|
@ -48,6 +48,7 @@ namespace nlsat {
|
|||
bool m_minimize_cores;
|
||||
bool m_factor;
|
||||
bool m_add_all_coeffs;
|
||||
bool m_add_zero_disc;
|
||||
bool m_signed_project;
|
||||
bool m_cell_sample;
|
||||
|
||||
|
|
@ -159,6 +160,7 @@ namespace nlsat {
|
|||
m_full_dimensional = false;
|
||||
m_minimize_cores = false;
|
||||
m_add_all_coeffs = true;
|
||||
m_add_zero_disc = true;
|
||||
m_signed_project = false;
|
||||
}
|
||||
|
||||
|
|
@ -456,6 +458,7 @@ namespace nlsat {
|
|||
TRACE(nlsat_explain, tout << "lc: " << lc << " reduct: " << reduct << "\n";);
|
||||
insert_fresh_factors_in_todo(lc);
|
||||
if (!is_zero(lc) && sign(lc)) {
|
||||
insert_fresh_factors_in_todo(lc);
|
||||
TRACE(nlsat_explain, tout << "lc does no vaninsh\n";);
|
||||
return;
|
||||
}
|
||||
|
|
@ -830,6 +833,9 @@ namespace nlsat {
|
|||
TRACE(nlsat_explain, tout << "done, psc is a constant\n";);
|
||||
return;
|
||||
}
|
||||
if (m_add_zero_disc && !sign(s)) {
|
||||
add_zero_assumption(s);
|
||||
}
|
||||
TRACE(nlsat_explain,
|
||||
tout << "adding v-psc of\n";
|
||||
display(tout, p);
|
||||
|
|
@ -1897,6 +1903,10 @@ namespace nlsat {
|
|||
m_imp->m_add_all_coeffs = f;
|
||||
}
|
||||
|
||||
void explain::set_add_zero_disc(bool f) {
|
||||
m_imp->m_add_zero_disc = f;
|
||||
}
|
||||
|
||||
void explain::set_signed_project(bool f) {
|
||||
m_imp->m_signed_project = f;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue