3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

integrating changes of Nikolaj with m_empty_clause etc.

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2019-12-09 10:43:03 -10:00
parent 15dff85b22
commit f939a26c86
7 changed files with 34 additions and 22 deletions

View file

@ -72,7 +72,7 @@ bool horner::lemmas_on_expr(cross_nested& cn, nex_sum* e) {
template <typename T>
bool horner::lemmas_on_row(const T& row) {
cross_nested cn(
[this](const nex* n) { return m_intervals->check_cross_nested_expr(n, m_fixed_as_scalars? get_fixed_vars_dep_from_row(c().m_lar_solver.A_r().m_rows[m_row_index], m_intervals->dep_manager()) : nullptr); },
[this](const nex* n) { return m_intervals->check_nex(n, m_fixed_as_scalars? get_fixed_vars_dep_from_row(c().m_lar_solver.A_r().m_rows[m_row_index], m_intervals->dep_manager()) : nullptr); },
[this](unsigned j) { return c().var_is_fixed(j); },
[this]() { return c().random(); }, m_nex_creator);

View file

@ -453,7 +453,7 @@ void nla_grobner::process_simplified_target(equation* target, ptr_buffer<equatio
}
void nla_grobner::check_eq(equation* target) {
if(m_intervals->check_cross_nested_expr(target->expr(), target->dep())) {
if(m_intervals->check_nex(target->expr(), target->dep())) {
TRACE("grobner", tout << "created a lemma for "; display_equation(tout, *target) << "\n";
tout << "vars = \n";
for (lpvar j : get_vars_of_expr(target->expr())) {

View file

@ -244,19 +244,19 @@ intervals::interv intervals::interval_of_mul(const nex_mul* e) {
return a;
}
bool intervals::check_cross_nested_expr(const nex* n, ci_dependency* initial_deps) {
TRACE("nla_intervals", tout << "cross-nested n = " << *n << ", n->type() == " << n->type() << "\n";);
// return true iff the interval of n is does not contain 0
bool intervals::check_nex(const nex* n, ci_dependency* initial_deps) {
TRACE("nla_grobner", tout << "cross-nested n = " << *n << ", n->type() == " << n->type() << "\n";);
m_core->lp_settings().stats().m_cross_nested_forms++;
auto i = interval_of_expr(n, 1);
TRACE("nla_intervals", tout << "callback n = " << *n << "\ni="; display(tout, i) << "\n";);
TRACE("nla_grobner", tout << "callback n = " << *n << "\ni="; display(tout, i) << "\n";);
if (!separated_from_zero(i)) {
reset();
return false;
}
auto interv_wd = interval_of_expr_with_deps(n, 1);
TRACE("nla_intervals", tout << "conflict: interv_wd = "; display(tout, interv_wd ) << *n << "\n";);
TRACE("nla_grobner", tout << "conflict: interv_wd = "; display(tout, interv_wd ) << *n << "\n";);
check_interval_for_conflict_on_zero(interv_wd, initial_deps);
reset(); // clean the memory allocated by the interval bound dependencies
return true;

View file

@ -452,7 +452,7 @@ public:
return false;
}
void reset() { m_alloc.reset(); }
bool check_cross_nested_expr(const nex*, ci_dependency*);
bool check_nex(const nex*, ci_dependency*);
interval interval_of_expr_with_deps(const nex* e, unsigned power);
interval interval_of_expr(const nex* e, unsigned power);
interval interval_of_sum(const nex_sum*);