Typed and unambiguous pattern matching on strings using regular expressions
- ,
- Jakob G. Thomsen
- Aarhus University
Research Output:
Conference Article in Proceeding or Book/Report chapter
Article in proceedings
Peer-reviewOpen access
Publication Information
Output type
Research Output:
Conference Article in Proceeding or Book/Report chapter
Article in proceedings
Peer-reviewOriginal language
EnglishPages from-to (Number of pages)
Pages 243-254 (12 pages)Publication milestones
- Published - 2010
Publication status
Published - 2010
Publisher
Association for Computing Machinery, United StatesISBN (Print)
978-1-4503-0132-9Publication IDs
- Scopus: 77956259528
Host publication title
Proceedings of the 12th international ACM SIGPLAN symposium on Principles and practice of declarative programmingAbstract
We show how to achieve typed and unambiguous declarative
pattern matching on strings using regular expressions
extended with a simple recording operator.
We give a characterization of ambiguity of regular expressions
that leads to a sound and complete static analysis. The
analysis is capable of pinpointing all ambiguities in terms of
the structure of the regular expression and report shortest
ambiguous strings. We also show how pattern matching can
be integrated into statically typed programming languages
for deconstructing strings and reproducing typed and structured
values.
We validate our approach by giving a full implementation
of the approach presented in this paper. The resulting tool,
reg-exp-rec, adds typed and unambiguous pattern matching
to Java in a stand-alone and non-intrusive manner. We
evaluate the approach using several realistic examples.
pattern matching on strings using regular expressions
extended with a simple recording operator.
We give a characterization of ambiguity of regular expressions
that leads to a sound and complete static analysis. The
analysis is capable of pinpointing all ambiguities in terms of
the structure of the regular expression and report shortest
ambiguous strings. We also show how pattern matching can
be integrated into statically typed programming languages
for deconstructing strings and reproducing typed and structured
values.
We validate our approach by giving a full implementation
of the approach presented in this paper. The resulting tool,
reg-exp-rec, adds typed and unambiguous pattern matching
to Java in a stand-alone and non-intrusive manner. We
evaluate the approach using several realistic examples.
Publication metrics
PlumX
Citations
11
Captures
10
Related Event
Title
International Conference on Principles and Practice of Declarative Programming (PPDP 2010)
Event type
ConferenceDegree of recognition
International eventDate
26/07/2010 - 28/07/2010Location
HagenbergAustria
