mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
enable parallel under scopes, preview in sequential mode before incurrring copy overhead
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
3da3b41786
commit
566d3070fa
|
@ -22,9 +22,6 @@ void lp_bound_propagator::try_add_bound(mpq const& v, unsigned j, bool is_low, b
|
||||||
if (strict)
|
if (strict)
|
||||||
kind = static_cast<lconstraint_kind>(kind / 2);
|
kind = static_cast<lconstraint_kind>(kind / 2);
|
||||||
|
|
||||||
// static unsigned s_count = 0, a_count = 0;
|
|
||||||
// ++a_count;
|
|
||||||
// if ((a_count % 100000) == 0) std::cout << s_count << " / " << a_count << "\n";
|
|
||||||
if (!bound_is_interesting(j, kind, v))
|
if (!bound_is_interesting(j, kind, v))
|
||||||
return;
|
return;
|
||||||
unsigned k; // index to ibounds
|
unsigned k; // index to ibounds
|
||||||
|
@ -32,12 +29,10 @@ void lp_bound_propagator::try_add_bound(mpq const& v, unsigned j, bool is_low, b
|
||||||
if (try_get_value(m_improved_lower_bounds, j, k)) {
|
if (try_get_value(m_improved_lower_bounds, j, k)) {
|
||||||
auto & found_bound = m_ibounds[k];
|
auto & found_bound = m_ibounds[k];
|
||||||
if (v > found_bound.m_bound || (v == found_bound.m_bound && found_bound.m_strict == false && strict)) {
|
if (v > found_bound.m_bound || (v == found_bound.m_bound && found_bound.m_strict == false && strict)) {
|
||||||
// ++s_count;
|
|
||||||
found_bound = implied_bound(v, j, is_low, coeff_before_j_is_pos, row_or_term_index, strict);
|
found_bound = implied_bound(v, j, is_low, coeff_before_j_is_pos, row_or_term_index, strict);
|
||||||
TRACE("try_add_bound", m_lar_solver.print_implied_bound(found_bound, tout););
|
TRACE("try_add_bound", m_lar_solver.print_implied_bound(found_bound, tout););
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// ++s_count;
|
|
||||||
m_improved_lower_bounds[j] = m_ibounds.size();
|
m_improved_lower_bounds[j] = m_ibounds.size();
|
||||||
m_ibounds.push_back(implied_bound(v, j, is_low, coeff_before_j_is_pos, row_or_term_index, strict));
|
m_ibounds.push_back(implied_bound(v, j, is_low, coeff_before_j_is_pos, row_or_term_index, strict));
|
||||||
TRACE("try_add_bound", m_lar_solver.print_implied_bound(m_ibounds.back(), tout););
|
TRACE("try_add_bound", m_lar_solver.print_implied_bound(m_ibounds.back(), tout););
|
||||||
|
@ -46,12 +41,10 @@ void lp_bound_propagator::try_add_bound(mpq const& v, unsigned j, bool is_low, b
|
||||||
if (try_get_value(m_improved_upper_bounds, j, k)) {
|
if (try_get_value(m_improved_upper_bounds, j, k)) {
|
||||||
auto & found_bound = m_ibounds[k];
|
auto & found_bound = m_ibounds[k];
|
||||||
if (v < found_bound.m_bound || (v == found_bound.m_bound && found_bound.m_strict == false && strict)) {
|
if (v < found_bound.m_bound || (v == found_bound.m_bound && found_bound.m_strict == false && strict)) {
|
||||||
// ++s_count;
|
|
||||||
found_bound = implied_bound(v, j, is_low, coeff_before_j_is_pos, row_or_term_index, strict);
|
found_bound = implied_bound(v, j, is_low, coeff_before_j_is_pos, row_or_term_index, strict);
|
||||||
TRACE("try_add_bound", m_lar_solver.print_implied_bound(found_bound, tout););
|
TRACE("try_add_bound", m_lar_solver.print_implied_bound(found_bound, tout););
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// ++s_count;
|
|
||||||
m_improved_upper_bounds[j] = m_ibounds.size();
|
m_improved_upper_bounds[j] = m_ibounds.size();
|
||||||
m_ibounds.push_back(implied_bound(v, j, is_low, coeff_before_j_is_pos, row_or_term_index, strict));
|
m_ibounds.push_back(implied_bound(v, j, is_low, coeff_before_j_is_pos, row_or_term_index, strict));
|
||||||
TRACE("try_add_bound", m_lar_solver.print_implied_bound(m_ibounds.back(), tout););
|
TRACE("try_add_bound", m_lar_solver.print_implied_bound(m_ibounds.back(), tout););
|
||||||
|
|
|
@ -161,7 +161,6 @@ namespace smt {
|
||||||
src_ctx.pop_to_base_lvl();
|
src_ctx.pop_to_base_lvl();
|
||||||
|
|
||||||
if (!override_base && src_ctx.m_base_lvl > 0) {
|
if (!override_base && src_ctx.m_base_lvl > 0) {
|
||||||
INVOKE_DEBUGGER();
|
|
||||||
throw default_exception("Cloning contexts within a user-scope is not allowed");
|
throw default_exception("Cloning contexts within a user-scope is not allowed");
|
||||||
}
|
}
|
||||||
SASSERT(src_ctx.m_base_lvl == 0 || override_base);
|
SASSERT(src_ctx.m_base_lvl == 0 || override_base);
|
||||||
|
@ -285,8 +284,7 @@ namespace smt {
|
||||||
// m_false_enode->mark_as_interpreted();
|
// m_false_enode->mark_as_interpreted();
|
||||||
}
|
}
|
||||||
|
|
||||||
void context::set_progress_callback(progress_callback *cb)
|
void context::set_progress_callback(progress_callback *cb) {
|
||||||
{
|
|
||||||
m_progress_callback = cb;
|
m_progress_callback = cb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3470,7 +3470,7 @@ bool theory_seq::solve_nc(unsigned idx) {
|
||||||
|
|
||||||
if (m.is_eq(c, a, b)) {
|
if (m.is_eq(c, a, b)) {
|
||||||
literal eq = mk_eq(a, b, false);
|
literal eq = mk_eq(a, b, false);
|
||||||
propagate_lit(deps, 0, nullptr, ~eq);
|
propagate_lit(deps, 0, nullptr, ~eq);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue