3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 11:25:51 +00:00

use dep_intervals inside of nla_intervals

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2019-12-24 15:44:46 -08:00
parent ee255ef8b3
commit 22bec010ba
10 changed files with 260 additions and 667 deletions

View file

@ -25,7 +25,7 @@
namespace nla {
typedef intervals::interval interv;
horner::horner(core * c, intervals * i) : common(c, i), m_row_sum(m_nex_creator), m_fixed_as_scalars(false) {}
horner::horner(core * c, intervals * i) : common(c, i), m_row_sum(m_nex_creator) {}
template <typename T>
bool horner::row_has_monomial_to_refine(const T& row) const {
@ -72,13 +72,13 @@ 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_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](const nex* n) { return m_intervals->check_nex(n, nullptr); },
[this](unsigned j) { return c().var_is_fixed(j); },
[this]() { return c().random(); }, m_nex_creator);
SASSERT (row_is_interesting(row));
c().clear_and_resize_active_var_set();
create_sum_from_row(row, cn.get_nex_creator(), m_row_sum, m_fixed_as_scalars, nullptr);
create_sum_from_row(row, cn.get_nex_creator(), m_row_sum, nullptr);
set_active_vars_weights(); // without this call the comparisons will be incorrect
nex* e = m_nex_creator.simplify(m_row_sum.mk());
TRACE("nla_horner", tout << "e = " << * e << "\n";);