Skip to content

Bug Fix in from_nfa_with_levels_zero #535

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

Merged
merged 3 commits into from
May 27, 2025
Merged

Bug Fix in from_nfa_with_levels_zero #535

merged 3 commits into from
May 27, 2025

Conversation

koniksedy
Copy link
Collaborator

This PR fixes a bug in the from_nfa_with_levels_zero function and closes #534. The bug caused mata::nft::strings::replace_reluctant_regex to fail because it trimmed the resulting Nft. However, the "replace reluctant" algorithm requires these otherwise useless states to function correctly. We should discuss this counterintuitive behavior.

@koniksedy koniksedy requested review from jurajsic and Adda0 May 27, 2025 07:44
@koniksedy koniksedy mentioned this pull request May 27, 2025
@jurajsic
Copy link
Member

Seems to be working.

Copy link
Collaborator

@Adda0 Adda0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging for now. Will review later. It is strange that the trim() breaks the automaton.

@Adda0 Adda0 merged commit 8d307d9 into devel May 27, 2025
15 checks passed
@Adda0 Adda0 deleted the nfa2nft_bug branch May 27, 2025 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in replace_reluctant_regex
3 participants