Reference. Towards Kleene Algebra with recursion
Cite
Cited by (5)
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.
Zippy LL(1) parsing with derivatives EdelmannZippy2020
A typed, algebraic approach to parsing krishnaswami_typed_2019
Infinitary Axiomatization of the Equational Theory of Context-Free Languages grathwohl_infinitary_2013
Context-Free Languages, Coalgebraically winterCFL
Cites 14 works (1 here)
With notes (1)
Action logic and pure induction prattActionLogicPure1991
External (13)
- A completeness theorem for Kleene algebras and the algebra of regular events (1991)
- On Kleene Algebras and Closed Semirings (1990)
- Dynamic Algebras as a well-behaved fragment of Relation Algebras (1990)
- Finite Automata, Their Algebras and Grammars (1988)
- Fixed point characterizations of context-free infinity-languages (1984)
- Elements of the Theory of Computation (1981)
- Introduction to Formal Language Theory (1978)
- Regular Algebra and Finite Machines (1971)
- Formal Languages and their Relation to Automata (1969)
- Two Complete Axiom Systems for the Algebra of Regular Events (1966)
- A New Normal-Form Theorem for Context-Free Phrase Structure Grammars (1965)
- On defining relations for the algebra of regular events (1964)
- Representation of Events in Nerve Nets and Finite Automata (1956)