3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-01 21:08:55 +00:00

Address PR review: subsumption, is_value, simplify_ite fixes

- Add lightweight structural is_subset for union/inter simplification
- Use m.is_value instead of is_const_char for swap checks
- Move eval_cond to beginning of simplify_ite_rec
- Use path.shrink(sz) instead of copying extended_path
- Fix normalize_reverse stuck case to return mk_reverse(r)
- Expose subsumes() in public API

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Nikolaj Bjorner 2026-06-04 07:45:19 -07:00
parent 3afd83103a
commit ca238a9107
2 changed files with 73 additions and 15 deletions

View file

@ -104,6 +104,9 @@ namespace seq {
// Distribute concatenation through ITE/union in derivative
expr_ref mk_deriv_concat(expr* d, expr* tail);
// Lightweight subsumption check: returns true if L(a) ⊆ L(b)
bool is_subset(expr* a, expr* b);
// Normalize reverse(r) by pushing reverse inward
expr_ref normalize_reverse(expr* r);
@ -135,6 +138,12 @@ namespace seq {
* Convenience: symbolic derivative using de Bruijn var 0.
*/
expr_ref operator()(expr* r);
/**
* Lightweight structural subsumption check: L(a) L(b)?
* Returns true only when provable structurally.
*/
bool subsumes(expr* larger, expr* smaller) { return is_subset(smaller, larger); }
};
}