3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-23 03:27:52 +00:00

Regex membership (#7506)

* Make finding a word in the regex iterative

* Fixed gc problem
This commit is contained in:
Clemens Eisenhofer 2025-01-12 02:41:37 +01:00 committed by GitHub
parent 9a237d55ca
commit c572fc2e4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 103 additions and 169 deletions

View file

@ -883,10 +883,13 @@ public:
case OP_SEQ_IN_RE:
if (uncnstr(args[0]) && seq.re.is_ground(args[1]) && seq.is_string(args[0]->get_sort())) {
#if 1
zstring s1, s2;
zstring s1;
expr* re = args[1];
if (!rw.some_string_in_re(re, s1))
return false;
zstring s2;
expr_ref not_re(seq.re.mk_complement(re), m);
if (!rw.some_string_in_re(re, s1) || !rw.some_string_in_re(not_re, s2))
if (!rw.some_string_in_re(not_re, s2))
return false;
mk_fresh_uncnstr_var_for(f, r);