mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 18:31:49 +00:00
more agressive freeing memory from nla_grobner
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
62dc731b5b
commit
13ff96b40b
|
@ -220,18 +220,24 @@ bool grobner_core::compute_basis_step() {
|
|||
return true;
|
||||
}
|
||||
m_stats.m_compute_steps++;
|
||||
simplify_using_to_superpose(*eq);
|
||||
|
||||
if (equation_is_too_complex(eq))
|
||||
unsigned mem_size = m_nex_creator.size();
|
||||
simplify_eq_by_using_to_superpose(*eq);
|
||||
if (equation_is_too_complex(eq)) {
|
||||
m_nex_creator.pop(mem_size);
|
||||
return false;
|
||||
}
|
||||
mem_size = m_nex_creator.size();
|
||||
if (!simplify_to_superpose_with_eq(eq)) {
|
||||
m_nex_creator.pop(mem_size);
|
||||
return false;
|
||||
}
|
||||
TRACE("grobner", tout << "eq = "; display_equation(tout, *eq););
|
||||
mem_size = m_nex_creator.size();
|
||||
superpose(eq);
|
||||
if (equation_is_too_complex(eq)) {
|
||||
if (equation_is_too_complex(eq)) {
|
||||
TRACE("grobner", display_equation(tout, *eq) << " is too complex: deleting it\n;";);
|
||||
del_equation(eq);
|
||||
m_nex_creator.pop(mem_size);
|
||||
return false;
|
||||
}
|
||||
insert_to_superpose(eq);
|
||||
|
@ -259,7 +265,7 @@ grobner_core::equation* grobner_core::pick_next() {
|
|||
return r;
|
||||
}
|
||||
|
||||
void grobner_core::simplify_using_to_superpose(equation& eq) {
|
||||
void grobner_core::simplify_eq_by_using_to_superpose(equation& eq) {
|
||||
bool simplified;
|
||||
TRACE("grobner", tout << "simplifying: "; display_equation(tout, eq); tout << "using equalities of m_to_superpose of size " << m_to_superpose.size() << "\n";);
|
||||
do {
|
||||
|
|
|
@ -121,7 +121,7 @@ private:
|
|||
bool compute_basis_step();
|
||||
|
||||
bool simplify_source_target(equation const& source, equation& target);
|
||||
void simplify_using_to_superpose(equation &);
|
||||
void simplify_eq_by_using_to_superpose(equation &);
|
||||
bool simplify_target_monomials(equation const& source, equation& target);
|
||||
void process_simplified_target(equation* target, ptr_buffer<equation>& to_remove);
|
||||
bool simplify_to_superpose_with_eq(equation*);
|
||||
|
|
Loading…
Reference in a new issue