mirror of
https://github.com/Z3Prover/z3
synced 2025-06-21 21:33:39 +00:00
fix init for nex_grobner()
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
c6e5d434b2
commit
e8f29b3144
3 changed files with 7 additions and 4 deletions
|
@ -1577,7 +1577,7 @@ void core::display_matrix_of_m_rows(std::ostream & out) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void core::init_nex_grobner(nex_creator & nc) {
|
void core::init_nex_grobner(nex_creator & nc) {
|
||||||
TRACE("grobner", tout << "m_rows.size() = " << m_rows.size() << "\n";);
|
m_nex_grobner.init();
|
||||||
set_active_vars_weights(nc);
|
set_active_vars_weights(nc);
|
||||||
for (unsigned i : m_rows) {
|
for (unsigned i : m_rows) {
|
||||||
m_nex_grobner.add_row(m_lar_solver.A_r().m_rows[i]);
|
m_nex_grobner.add_row(m_lar_solver.A_r().m_rows[i]);
|
||||||
|
|
|
@ -36,7 +36,6 @@ grobner::grobner(core *c, intervals *s)
|
||||||
|
|
||||||
void grobner::grobner_lemmas() {
|
void grobner::grobner_lemmas() {
|
||||||
c().lp_settings().stats().m_grobner_calls++;
|
c().lp_settings().stats().m_grobner_calls++;
|
||||||
m_gc.reset();
|
|
||||||
m_reported = 0;
|
m_reported = 0;
|
||||||
TRACE("grobner", tout << "before:\n"; display(tout););
|
TRACE("grobner", tout << "before:\n"; display(tout););
|
||||||
m_gc.compute_basis_loop();
|
m_gc.compute_basis_loop();
|
||||||
|
@ -87,6 +86,10 @@ Each step proceeds as follows:
|
||||||
- simplify A using a
|
- simplify A using a
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
void grobner::init() {
|
||||||
|
m_gc.reset();
|
||||||
|
}
|
||||||
|
|
||||||
bool grobner_core::compute_basis_loop() {
|
bool grobner_core::compute_basis_loop() {
|
||||||
while (!done()) {
|
while (!done()) {
|
||||||
if (compute_basis_step()) {
|
if (compute_basis_step()) {
|
||||||
|
|
|
@ -212,13 +212,13 @@ public:
|
||||||
private:
|
private:
|
||||||
void prepare_rows_and_active_vars();
|
void prepare_rows_and_active_vars();
|
||||||
void add_var_and_its_factors_to_q_and_collect_new_rows(lpvar j, svector<lpvar>& q);
|
void add_var_and_its_factors_to_q_and_collect_new_rows(lpvar j, svector<lpvar>& q);
|
||||||
void init();
|
|
||||||
std::unordered_set<lpvar> get_vars_of_expr_with_opening_terms(const nex* e);
|
std::unordered_set<lpvar> get_vars_of_expr_with_opening_terms(const nex* e);
|
||||||
void display_matrix(std::ostream & out) const;
|
void display_matrix(std::ostream & out) const;
|
||||||
std::ostream& display(std::ostream& out) const { return m_gc.display(out); }
|
std::ostream& display(std::ostream& out) const { return m_gc.display(out); }
|
||||||
public:
|
public:
|
||||||
void add_row(const vector<lp::row_cell<rational>> & row);
|
void add_row(const vector<lp::row_cell<rational>> & row);
|
||||||
void check_eq(grobner_core::equation*);
|
void check_eq(grobner_core::equation*);
|
||||||
|
void init();
|
||||||
nex_creator& get_nex_creator() { return m_nex_creator; }
|
nex_creator& get_nex_creator() { return m_nex_creator; }
|
||||||
}; // end of grobner
|
}; // end of grobner
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue