-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Three problems about regular expressions #52
Comments
Hi! Since nobody's responded to you I'll do my best.
Not in general since they in the general case make the language not regular and therefore cannot be handled in Ostrich, but @RiccardoDeMasellis and @uuverifiers are working on accommodating some practical use cases. I don't remember how much of that is in the main tree yet though.
That sounds like a bug to me. I know we have had some problems with look-arounds in general so this might be another one. |
Sorry for the delay!
Concerning 2), handling back-references is not something we are
currently working on; adding support for back-references is one of our
long-term goals though.
Concerning 3), I get a correct model for this pattern when using the
function re.from_ecma2020. It is true, however, that we are still
working on full support for anchors and lookarounds, currently there are
still some cases of ECMAScript regular expressions not handled correctly.
|
Thank you for your answers. @amandasystems @pruemmer Supporting backreferences is really difficult since it makes the regex language not regular. For question 3, I wonder if, assuming that the regex is parsed well, i.e., L(r) is converted to an equivalent SMT constraint S. When I solve S using OSTRICH, is its model always consistent with L(r)? Again, thank you for your works. :) |
There are still some cases involving anchors or lookarounds that are not
handled correctly, even with the re.from_ecma2020 function. This is
something we are currently working on, and will hopefully be able to
resolve soon!
|
Hi, I have three questions about regular expressions,
What is the difference between
re. from_ecma2020
andre.from.str
?Does OSTRICH currently support regular expressions with backreferences? E.g.,
(.)\1
.I found that
(?=a).|c
->(model (define-fun w () String "a"))
, but((?=a).|c)
->(model (define-fun w () String "\u{0}"))
, but\u0000
is not accepted by((?=a).|c)
.The text was updated successfully, but these errors were encountered: