Skip to Main content Skip to Navigation
Conference papers

Regenerate: A Language Generator for Extended Regular Expressions with an application to test case generation

Abstract : Regular expressions are part of every programmer's toolbox. They are used for a wide variety of language-related tasks and there are many algorithms for manipulating them. In particular, matching algorithms that detect whether a word belong to the language described by a regular expression is both a well explored area, yet one that still receives frequent contributions. However, there is no satisfactory solution for testing such matchers, which would require generating positive as well as negative examples for the language. We propose an algorithm to generate a language matched by a generalized regular expression with intersection and complement operators. The complement operator allows us to generate both positive and negative example words from a given regular expression. We implement our generator in Haskell and OCaml, and show that its performance is more than adequate for the purpose of testing.
Complete list of metadata

Cited literature [26 references]  Display  Hide  Download

https://hal.archives-ouvertes.fr/hal-01788827
Contributor : Gabriel Radanne <>
Submitted on : Tuesday, January 22, 2019 - 2:51:44 PM
Last modification on : Monday, November 16, 2020 - 12:28:01 PM
Long-term archiving on: : Tuesday, April 23, 2019 - 2:57:13 PM

File

gpce18.pdf
Files produced by the author(s)

Identifiers

Citation

Gabriel Radanne, Peter Thiemann. Regenerate: A Language Generator for Extended Regular Expressions with an application to test case generation. GPCE 2018: 17th International Conference on Generative Programming: Concepts & Experiences, Nov 2018, Boston, United States. pp.202-214, ⟨10.1145/3278122.3278133⟩. ⟨hal-01788827v2⟩

Share

Metrics

Record views

151

Files downloads

2280