Reference. Greedy regular expression matching
Cite
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.
Regular expression containment: Coinductive axiomatization and computational interpretation henglein_regular_2011
Cites 21 works (0 here)
External (21)
- Regular Tree Language Recognition with Static Information (2004)
- CDuce (2003)
- XQuery 1.0: An XML Query Language (W3C Working Draft) (2003)
- Regular Object Types (2003)
- XDuce (2003)
- Compiling regular patterns (2003)
- Regular Expression Types for Strings in a Text Processing Language (2003)
- Regular expressions pattern matching: a simpler design (Hosoya, unpublished manuscript) (2003)
- Unifying tables, objects, and documents (Meijer, Schulte; DP-COOL 2003) (2003)
- Unique pattern matching in strings (Vansummeren) (2003)
- CLI Partition I - Architecture (ECMA) (2002)
- Regular expression pattern matching for XML (2001)
- Regular Expression Types for XML (Hosoya, PhD thesis, Univ. of Tokyo) (2001)
- Efficient submatch addressing for regular expressions (Laurikari, Master's thesis) (2001)
- XML Schema (W3C Recommendation) (2001)
- Dependent types for program termination verification (LICS 2001) (2001)
- Efficiently building a parse tree from a regular expression (2000)
- Regular expression types for XML (2000)
- Extensible Markup Language (XML) 1.0 (W3C Recommendation) (2000)
- Proof-directed debugging (1999)
- Extending regular expressions with context operators and parse extraction (1991)