3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-13 06:30:54 +00:00
* rename ul_pair to column

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* t

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* simple test passed

* remove an assert

* relax an assertion

* remove an obsolete function

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* access a term by the term column

* remove the column index from colunm.h

* remove an unused method

* remove debug code

* fix the build of lp_tst

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

---------

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
Co-authored-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Nikolaj Bjorner 2024-01-24 16:05:18 -08:00 committed by GitHub
parent 133546625c
commit bdb9106f99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 587 additions and 973 deletions

View file

@ -20,7 +20,7 @@ namespace lp {
lra(lia.lra),
m_settings(lia.settings()),
m_abs_max(zero_of_type<mpq>()),
m_var_register(false) {}
m_var_register() {}
bool hnf_cutter::is_full() const {
return
@ -50,7 +50,7 @@ namespace lp {
m_constraints_for_explanation.push_back(ci);
for (lar_term::ival p : *t) {
m_var_register.add_var(p.column().index(), true); // hnf only deals with integral variables for now
m_var_register.add_var(p.j(), true); // hnf only deals with integral variables for now
mpq t = abs(ceil(p.coeff()));
if (t > m_abs_max)
m_abs_max = t;
@ -227,12 +227,12 @@ branch y_i >= ceil(y0_i) is impossible.
svector<unsigned> hnf_cutter::vars() const { return m_var_register.vars(); }
void hnf_cutter::try_add_term_to_A_for_hnf(tv const &i) {
void hnf_cutter::try_add_term_to_A_for_hnf(lpvar j) {
mpq rs;
const lar_term& t = lra.get_term(i);
const lar_term& t = lra.get_term(j);
u_dependency* dep;
bool upper_bound;
if (!is_full() && lra.get_equality_and_right_side_for_term_on_current_x(i, rs, dep, upper_bound)) {
if (!is_full() && lra.get_equality_and_right_side_for_term_on_current_x(j, rs, dep, upper_bound)) {
add_term(&t, rs, dep, upper_bound);
}
}
@ -243,8 +243,8 @@ branch y_i >= ceil(y0_i) is impossible.
bool hnf_cutter::init_terms_for_hnf_cut() {
clear();
for (unsigned i = 0; i < lra.terms().size() && !is_full(); i++)
try_add_term_to_A_for_hnf(tv::term(i));
for (const lar_term* t: lra.terms())
try_add_term_to_A_for_hnf(t->j());
return hnf_has_var_with_non_integral_value();
}