3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-19 10:52:02 +00:00

track changed monics efficiently

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2023-09-27 09:09:38 -07:00
parent 42767b9aab
commit 29b5c47a8d
4 changed files with 11 additions and 15 deletions

View file

@ -43,18 +43,17 @@ core::core(lp::lar_solver& s, params_ref const& p, reslimit& lim, std_vector<lp:
m_implied_bounds(implied_bounds) {
m_nlsat_delay = lp_settings().nlsat_delay();
lra.m_find_monics_with_changed_bounds_func = [&](const indexed_uint_set& columns_with_changed_bounds) {
for (const auto& m : m_emons) {
if (columns_with_changed_bounds.contains(m.var())) {
m_monics_with_changed_bounds.push_back(m.var());
continue;
m_monics_with_changed_bounds.reset();
for (lpvar j : columns_with_changed_bounds) {
if (is_monic_var(j))
m_monics_with_changed_bounds.insert(j);
else {
for (const auto & m: m_emons.get_use_list(j)) {
m_monics_with_changed_bounds.insert(m.var());
}
}
}
for (lpvar j : m.vars()) {
if (columns_with_changed_bounds.contains(j)) {
m_monics_with_changed_bounds.push_back(m.var());
break;
}
}
} };
};
}
bool core::compare_holds(const rational& ls, llc cmp, const rational& rs) const {