Intrinsic Verification of Parsers and Formal Grammar Theory in Dependent Lambek Calculus
We present Dependent Lambek Calculus~($\textrm{Lambek}^D$), a domain-specific dependent type theory for verified parsing and formal grammar theory. In $\textrm{Lambek}^D$, 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 $\textrm{Lambek}^D$ using a shallow embedding in the Agda proof assistant. All of our examples parsers have been implemented in this prototype implementation.
Thu 19 JunDisplayed time zone: Seoul change
14:00 - 15:00 | Automata TheoryPLDI Research Papers at Grand Ball Room 2 Chair(s): Umang Mathur National University of Singapore | ||
14:00 20mTalk | A Uniform Framework for Handling Position Constraints in String Solving PLDI Research Papers Yu-Fang Chen Academia Sinica, Vojtěch Havlena Brno University of Technology, Michal Hečko Brno University of Technology, Lukáš Holík Brno University of Technology; Aalborg University, Ondřej Lengál Brno University of Technology DOI | ||
14:20 20mTalk | Intrinsic Verification of Parsers and Formal Grammar Theory in Dependent Lambek Calculus PLDI Research Papers Steven Schaefer University of Michigan, Nathan Varner University of Michigan, Pedro H. Azevedo de Amorim University of Oxford, Max S. New University of Michigan DOI Pre-print | ||
14:40 20mTalk | Verifying Solutions to Semantics-Guided Synthesis Problems PLDI Research Papers Charlie Murphy Amazon Web Services, USA, Keith J.C. Johnson University of Wisconsin-Madison, Thomas Reps University of Wisconsin-Madison, Loris D'Antoni University of California at San Diego DOI |