3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-22 19:17:53 +00:00

Make Groebner basis computation interruptable. Exponsed in issue #269

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2015-10-28 11:39:59 -07:00
parent 2a95a77706
commit 6b82b949cf
5 changed files with 52 additions and 25 deletions

View file

@ -2227,7 +2227,15 @@ namespace smt {
while (true) {
TRACE("non_linear_gb", tout << "before:\n"; gb.display(tout););
bool r = gb.compute_basis(m_params.m_nl_arith_gb_threshold);
bool r = false;
gb.compute_basis_init();
while (!r && gb.get_num_new_equations() < m_params.m_nl_arith_gb_threshold) {
if (get_context().get_cancel_flag()) {
warn = true;
break;
}
r = gb.compute_basis_step();
}
m_stats.m_gb_simplify += gb.m_stats.m_simplify;
m_stats.m_gb_superpose += gb.m_stats.m_superpose;
m_stats.m_gb_num_processed += gb.m_stats.m_num_processed;