3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-18 17:22:15 +00:00

State graph dgml update and fixes in condition simplifier (#5721)

* improved generated dgml graph

* fixed simplification of negated ranges and did some code cleanup

* do not make loops with lower=upper=0, this is epsilon

* do not add loops with lower=upper=1

* bug fix in normalization: forgotten eps case
This commit is contained in:
Margus Veanes 2021-12-19 11:09:55 -08:00 committed by GitHub
parent bee742111a
commit a7b1db611c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 168 additions and 220 deletions

View file

@ -223,11 +223,6 @@ class seq_rewriter {
expr_ref merge_regex_sets(expr* r1, expr* r2, expr* unit, std::function<bool(expr*, expr*&, expr*&)>& decompose, std::function<expr* (expr*, expr*)>& compose);
// Apply simplifications and keep the representation normalized
// Assuming r1 and r2 are normalized
expr_ref mk_regex_union_normalize(expr* r1, expr* r2);
expr_ref mk_regex_inter_normalize(expr* r1, expr* r2);
// elem is (:var 0) and path a condition that may have (:var 0) as a free variable
// simplify path, e.g., (:var 0) = 'a' & (:var 0) = 'b' is simplified to false
expr_ref simplify_path(expr* elem, expr* path);
@ -423,5 +418,10 @@ public:
// heuristic elimination of element from condition that comes form a derivative.
// special case optimization for conjunctions of equalities, disequalities and ranges.
void elim_condition(expr* elem, expr_ref& cond);
/* Apply simplifications to the union to keep the union normalized (r1 and r2 are not normalized)*/
expr_ref mk_regex_union_normalize(expr* r1, expr* r2);
/* Apply simplifications to the intersection to keep it normalized (r1 and r2 are not normalized)*/
expr_ref mk_regex_inter_normalize(expr* r1, expr* r2);
};