Lune

PLDI2025顶会

Intrinsic Verification of Parsers and Formal Grammar Theory in Dependent Lambek Calculus

Steven Schaefer, Nathan Varner, Pedro Henrique Azevedo de Amorim, Max S. New

摘要

We present Dependent Lambek Calculus (Lambek D ), a domain-specific dependent type theory for verified parsing and formal grammar theory. In 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 Lambek D using a shallow embedding in the Agda proof assistant. All of our examples parsers have been implemented in this prototype implementation.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • CoStar: a verified ALL() parser 引用了 Zippy LL(1) parsing with derivatives
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper1

  1. Intrinsically Correct Algorithms and Recursive CoalgebrasCass Alexandru, Henning Urbat, Thorsten WißmannPLDI 2026

它引用的 Paper3

  1. Multimodal Dependent Type TheoryDaniel Gratzer, G. A. Kavvos, Andreas Nuyts, Lars BirkedalLICS 2020 · 36 次引用
  2. Zippy LL(1) parsing with derivativesRomain Edelmann, Jad Hamza, Viktor KuncakPLDI 2020 · 13 次引用
  3. CoStar: a verified ALL(*) parserSam Lasser, Chris Casinghino, Kathleen Fisher, Cody RouxPLDI 2021 · 10 次引用

相关 Paper

  1. Label dependent lambda calculus and gradual typingWeili Fu, Fabian Krause, Peter ThiemannOOPSLA 2021
  2. Intrinsically typed compilation with nameless labelsArjen Rouvoet, Robbert Krebbers, Eelco VisserPOPL 2021 · 5 次引用
  3. A derivative-based parser generator for visibly Pushdown grammarsXiaodong Jia, Ashish Kumar, Gang TanOOPSLA 2021 · 7 次引用
  4. Formal metatheory of second-order abstract syntaxMarcelo Fiore, Dmitrij SzamozvancevPOPL 2022 · 20 次引用
  5. Undecidability of d<: and its decidable fragmentsJason Z. S. Hu, Ondrej LhotákPOPL 2020 · 9 次引用
黄昏的海面,两侧是细线勾勒的悬崖