Skip to content

Commit

Permalink
clean m_nla_lemma_vector in nla_solver
Browse files Browse the repository at this point in the history
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
  • Loading branch information
levnach committed Sep 25, 2023
1 parent 87a839c commit 26a9b77
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/math/lp/nla_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2027,11 +2027,12 @@ void core::add_lower_bound_monic(lpvar j, const lp::mpq& v, bool is_strict, std:
}
}

void core::init_bound_propagation() {
void core::init_bound_propagation(vector<nla::lemma>& lemma_vector) {
m_implied_bounds.clear();
m_improved_lower_bounds.reset();
m_improved_upper_bounds.reset();
m_column_types = &lra.get_column_types();
lemma_vector.clear();
}

} // namespace nla
2 changes: 1 addition & 1 deletion src/math/lp/nla_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ class core {
void save_tableau();
bool integrality_holds();
void calculate_implied_bounds_for_monic(lp::lpvar v);
void init_bound_propagation();
void init_bound_propagation(vector<nla::lemma> &);
}; // end of core

struct pp_mon {
Expand Down
4 changes: 2 additions & 2 deletions src/math/lp/nla_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ namespace nla {
m_core->check_bounded_divisions(lemmas);
}

void solver::init_bound_propagation() {
m_core->init_bound_propagation();
void solver::init_bound_propagation(vector<nla::lemma>& nla_lemma_vector) {
m_core->init_bound_propagation(nla_lemma_vector);
}

}
2 changes: 1 addition & 1 deletion src/math/lp/nla_solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ namespace nla {
nlsat::anum const& am_value(lp::var_index v) const;
void collect_statistics(::statistics & st);
void calculate_implied_bounds_for_monic(lp::lpvar v);
void init_bound_propagation();
void init_bound_propagation(vector<nla::lemma>&);
};
}
2 changes: 1 addition & 1 deletion src/smt/theory_lra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2201,7 +2201,7 @@ class theory_lra::imp {
}

void propagate_bounds_for_touched_monomials() {
m_nla->init_bound_propagation();
m_nla->init_bound_propagation(m_nla_lemma_vector);
for (unsigned v : m_nla->monics_with_changed_bounds())
m_nla->calculate_implied_bounds_for_monic(v);

Expand Down

0 comments on commit 26a9b77

Please sign in to comment.