mirror of
https://github.com/Z3Prover/z3
synced 2025-08-10 05:00:51 +00:00
add shortcut filter to avoid traversing model reconstruction trail if there are no intersections with model
This commit is contained in:
parent
6d8d8f1971
commit
8495be11f9
3 changed files with 43 additions and 10 deletions
|
@ -22,20 +22,26 @@ Author:
|
|||
|
||||
// accumulate a set of dependent exprs, updating m_trail to exclude loose
|
||||
// substitutions that use variables from the dependent expressions.
|
||||
// TODO: add filters to skip sections of the trail that do not touch the current free variables.
|
||||
|
||||
void model_reconstruction_trail::replay(unsigned qhead, expr_ref_vector& assumptions, dependent_expr_state& st) {
|
||||
TRACE("simplifier",
|
||||
for (unsigned i = qhead; i < st.qtail(); ++i)
|
||||
tout << mk_bounded_pp(st[i].fml(), m) << "\n";
|
||||
);
|
||||
|
||||
ast_mark free_vars;
|
||||
m_intersects_with_model = false;
|
||||
scoped_ptr<expr_replacer> rp = mk_default_expr_replacer(m, false);
|
||||
for (unsigned i = qhead; i < st.qtail(); ++i)
|
||||
add_vars(st[i], free_vars);
|
||||
for (expr* a : assumptions)
|
||||
add_vars(a, free_vars);
|
||||
|
||||
TRACE("simplifier",
|
||||
tout << "intersects " << m_intersects_with_model << "\n";
|
||||
for (unsigned i = qhead; i < st.qtail(); ++i)
|
||||
tout << mk_bounded_pp(st[i].fml(), m) << "\n";
|
||||
);
|
||||
|
||||
if (!m_intersects_with_model)
|
||||
return;
|
||||
|
||||
for (auto& t : m_trail) {
|
||||
TRACE("simplifier", tout << " active " << t->m_active << " hide " << t->is_hide() << " intersects " << t->intersects(free_vars) << "\n");
|
||||
if (!t->m_active)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue