Reference. Greedy regular expression matching

This paper studies the problem of matching sequences against regular expressions in order to produce structured values.

Cite

Cite as @frischCardelli (helia, typst) · \cite{frischCardelli} (LaTeX)
BibTeX
bibtex · 16 lines
@inproceedings{frischCardelli,
 title = {Greedy Regular Expression Matching},
 author = {Frisch, Alain
and Cardelli, Luca},
 year = {2004},
 isbn = {978-3-540-27836-8},
 booktitle = {Automata, Languages and Programming},
 editor = {D{\'i}az, Josep
and Karhum{\"a}ki, Juhani
and Lepist{\"o}, Arto
and Sannella, Donald},
 pages = {618--629},
 publisher = {Springer Berlin Heidelberg},
 address = {Berlin, Heidelberg},
 abstract = {This paper studies the problem of matching sequences against regular expressions in order to produce structured values.}
}
hayagriva YAML (typst)
yaml · 22 lines
frischCardelli:
  type: article
  title: Greedy Regular Expression Matching
  author:
  - Frisch, Alain
  - Cardelli, Luca
  date: 2004
  editor:
  - Díaz, Josep
  - Karhumäki, Juhani
  - Lepistö, Arto
  - Sannella, Donald
  page-range: 618-629
  serial-number:
    isbn: 978-3-540-27836-8
  abstract: This paper studies the problem of matching sequences against regular expressions in order to produce structured values.
  parent:
    type: proceedings
    title: Automata, Languages and Programming
    publisher:
      name: Springer Berlin Heidelberg
      location: Berlin, Heidelberg
Cited by (2)

Intrinsic Verification of Parsers and Formal Grammar Theory in Dependent Lambek Calculus intrinsic-verification-of-parsers

We present Dependent Lambek Calculus (Lambek𝙳), a domain-specific dependent type theory for verified parsing and formal grammar theory. In Lambek𝙳, linear types are used as a syntax for formal grammars, and parsers can be written as linear terms. The linear typing restriction provides a form of intrinsic verification that a parser yields only valid parse trees for the input string. We demonstrate the expressivity of this system by showing that the combination of inductive linear types and dependency on non-linear data can be used to encode commonly used grammar formalisms such as regular and context-free grammars as well as traces of various types of automata. Using these encodings, we define parsers for regular expressions using deterministic automata, as well as examples of verified parsers of context-free grammars.

We present a denotational semantics of our type theory that interprets the linear types as functions from strings to sets of abstract parse trees and terms as parse transformers. Based on this denotational semantics, we have made a prototype implementation of Lambek𝙳 using a shallow embedding in the Agda proof assistant. All of our examples parsers have been implemented in this prototype implementation.

PDF · DOI · arXiv (extended version) · Source code · pldb

Regular expression containment: Coinductive axiomatization and computational interpretation henglein_regular_2011

We present a new sound and complete axiomatization of regular expression containment. It consists of the conventional axiomatization of concatenation, alternation, empty set and (the singleton set containing) the empty string as an idempotent semiring, the fixed- point rule E* = 1 + E × E* for Kleene-star, and a general coinduction rule as the only additional rule. Our axiomatization gives rise to a natural computational interpretation of regular expressions as simple types that represent parse trees, and of containment proofs as coercions. This gives the axiom- atization a Curry-Howard-style constructive interpretation: Containment proofs do not only certify a language-theoretic contain- ment, but, under our computational interpretation, constructively transform a membership proof of a string in one regular expression into a membership proof of the same string in another regular expression. We show how to encode regular expression equivalence proofs in Salomaa’s, Kozen’s and Grabmayer’s axiomatizations into our containment system, which equips their axiomatizations with a computational interpretation and implies completeness of our axiomatization. To ensure its soundness, we require that the computational interpretation of the coinduction rule be a hereditarily total function. Hereditary totality can be considered the mother of syn- tactic side conditions: it “explains” their soundness, yet cannot be used as a conventional side condition in its own right since it turns out to be undecidable. We discuss application of regular expressions as types to bit coding of strings and hint at other applications to the wide-spread use of regular expressions for substring matching, where classical automata-theoretic techniques are a priori inapplicable. Neither regular expressions as types nor subtyping interpreted coercively are novel per se. Somewhat surprisingly, this seems to be the first investigation of a general proof-theoretic framework for the latter in the context of the former, however.
PDF · DOI · pldb
Cites 21 works (0 here)
External (21)
frischCardelli reference entries/refs/frischCardelli/frischCardelli.hel