Skip to content

Commit

Permalink
take care of strategy undecided, Nikolaj's comments
Browse files Browse the repository at this point in the history
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
  • Loading branch information
levnach committed Jan 18, 2024
1 parent 6e9a938 commit d084a19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
10 changes: 2 additions & 8 deletions src/math/lp/lar_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1577,12 +1577,6 @@ namespace lp {
}
}


var_index lar_solver::add_term_undecided(const vector<std::pair<mpq, var_index>>& coeffs) {
push_term(new lar_term(coeffs));
return tv::mask_term(m_terms.size() - 1);
}

#if Z3DEBUG_CHECK_UNIQUE_TERMS
bool lar_solver::term_coeffs_are_ok(const vector<std::pair<mpq, var_index>>& coeffs) {

Expand Down Expand Up @@ -1645,9 +1639,9 @@ namespace lp {
lar_term* t = new lar_term(coeffs);
subst_known_terms(t);
m_term_register.add_var(ext_i, term_is_int(t));
if (strategy_is_undecided())
return add_term_undecided(coeffs);
push_term(t);
if (strategy_is_undecided())
return tv::mask_term(m_terms.size() - 1);
SASSERT(m_terms.size() == m_term_register.size());
unsigned adjusted_term_index = m_terms.size() - 1;
var_index ret = tv::mask_term(adjusted_term_index);
Expand Down
1 change: 0 additions & 1 deletion src/math/lp/lar_solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ class lar_solver : public column_namer {

// terms
bool all_vars_are_registered(const vector<std::pair<mpq, var_index>>& coeffs);
var_index add_term_undecided(const vector<std::pair<mpq, var_index>>& coeffs);
bool term_coeffs_are_ok(const vector<std::pair<mpq, var_index>>& coeffs);
void push_term(lar_term* t);
void add_row_from_term_no_constraint(const lar_term* term, unsigned term_ext_index);
Expand Down

0 comments on commit d084a19

Please sign in to comment.