3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-03-01 19:26:53 +00:00

updates to handle bugs exposed by qf-abv for local search

- ctx.is_true(e) - changed to work with expressions that are not literals, but come from top-level assertions
- set fixed in sls_bv_fixed to work with non-zero low order bits
- array plugin to deal with cases where e-graph is inconsistent after a merge.
This commit is contained in:
Nikolaj Bjorner 2025-01-27 10:35:29 -08:00
parent 7ffed8613a
commit b6e7b80704
5 changed files with 92 additions and 38 deletions

View file

@ -288,9 +288,20 @@ namespace sls {
SASSERT(m.is_bool(e));
auto v = m_atom2bool_var.get(e->get_id(), sat::null_bool_var);
if (v != sat::null_bool_var)
return m.is_true(m_plugins[basic_family_id]->get_value(e));
else
return is_true(v);
if (m.is_and(e))
return all_of(*to_app(e), [&](expr* arg) { return is_true(arg); });
if (m.is_or(e))
return any_of(*to_app(e), [&](expr* arg) { return is_true(arg); });
if (m.is_not(e))
return !is_true(to_app(e)->get_arg(0));
if (m.is_implies(e))
return !is_true(to_app(e)->get_arg(0)) || is_true(to_app(e)->get_arg(1));
if (m.is_iff(e))
return is_true(to_app(e)->get_arg(0)) == is_true(to_app(e)->get_arg(1));
if (m.is_ite(e))
return is_true(to_app(e)->get_arg(0)) ? is_true(to_app(e)->get_arg(1)) : is_true(to_app(e)->get_arg(2));
return is_true(mk_literal(e));
}
bool context::is_fixed(expr* e) {