-
Notifications
You must be signed in to change notification settings - Fork 15
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
DFAs can take wrong actions due to ambiguities #48
Comments
Simplified to
Note in particular that the C pattern is entered once, and then can be exited an arbitrary amount of times with an input like |
Right, so I think I've figured out the problem. Let's have a simple regex
Now, create an NFA using Now convert the NFA to a DFA. The resulting DFA is equivalent to the NFA only in the sense that it recognizes the same inputs. The edges are NOT the same, and consequently, the two epsilon edges, labeled with This is impossible to solve, I think, but it would really be nice if there was some sort of warning or even an error if attempting to convert an NFA that had actions associated to ambiguous transitions to a DFA. Edit: This can be done by modifying the |
Solved by #49 |
Consider the following, highly simplified FASTA format:
By definition of
record
, arecord
MUST contain aheader
, which contains a>
. However see the flowchart produced for this machine by:The state 5 corresponds to
seqline
, and a following newline brings it to state 6. In this state transition, the actionrecord
is executed. But clearly, from the defition, we did not necessarily exitrecord
! This creates a loop between state 5 and 6, such thatrecord
is executed at every newline.This means that
record
can be repeatedly exited, without it being entered, and allows for e.g. arecord
only containingseqline
, against the definition above.The text was updated successfully, but these errors were encountered: