Skip to content

Possible change in the src/main/java/com/endava/cats/generator/RegexGenerator.java class to optimize the handling of complex patterns through Regex segmentation and recombination #160

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

Open
Jorge-33 opened this issue Mar 9, 2025 · 1 comment

Comments

@Jorge-33
Copy link

Jorge-33 commented Mar 9, 2025

Introduce a preprocessor for regular expressions that decomposes complex patterns into smaller, manageable subexpressions. This enhancement could allow CATS to:

Improve test case variability by ensuring that no part of a complex regex pattern is ignored or overly simplified.

Enhance performance by generating test data in smaller, more efficient chunks and recombining them.

Leverage the dk.brics.automaton library in Java to analyze and decompose regex patterns. This can be integrated into the RegexGenerator module to ensure efficient handling of large regex expressions.

Here is an example of how this feature could be implemented in the attached pdf:

RegexProcessor.pdf

@en-milie
Copy link
Contributor

Hi @Jorge-33. You can raise a pull request with the changes and make sure all existing unit tests are passing.

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

No branches or pull requests

2 participants