3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-06-07 09:30:54 +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

@ -70,6 +70,13 @@ namespace sls {
bool are_distinct(euf::enode* a, euf::enode* b);
bool eq_args(euf::enode* sto, euf::enode* sel);
euf::enode* mk_select(euf::egraph& g, euf::enode* b, euf::enode* sel);
void resolve_conflict();
size_t* to_ptr(sat::literal l) { return reinterpret_cast<size_t*>((size_t)(l.index() << 4)); };
size_t* to_ptr(expr* t) { return reinterpret_cast<size_t*>((reinterpret_cast<size_t>(t) << 4) + 1); }
bool is_literal(size_t* p) { return (reinterpret_cast<size_t>(p) & 1) == 0; }
sat::literal to_literal(size_t* p) { return sat::to_literal(static_cast<unsigned>(reinterpret_cast<size_t>(p) >> 4)); };
expr* to_expr(size_t* p) { return reinterpret_cast<expr*>(reinterpret_cast<size_t>(p) >> 4); }
public:
array_plugin(context& ctx);