paperbot · PL 论文追踪

全部论文 待读 收藏

P2 The Essence of Generalized Algebraic Data Types

广义代数数据类型(GADTs)的本质
POPL 8(POPL)2024匹配度 2/10 · 论文属于纯类型论与形式语义研究,聚焦GADT在System Fω扩展中的编码、类型可靠性与关系模型,与用户关注的LLM/Agent改进静态分析、浮点程序分析、贝叶斯程序分析等核心方向无直接交集;虽涉及形式化验证基础,但未涉及LLM、静态分析工具或工业落地。引用 7 inbox
Filip Sieczkowski, Sergei Stepanenko, Jonathan Sterling, Lars Birkedal
crossref: 2026-09-10

AI 速览

一句话:在带递归类型和内部化类型等式的 System Fω 扩展中直接编码 GADTs,并给出类型可靠性与关系模型。

本文研究广义代数数据类型(GADTs)在一个极简 λ 演算中的直接编码。作者将 System Fω 扩展为带递归类型、内部化类型等式以及单射常量类型构造子的系统,并展示 GADTs 及相应模式匹配可直接在该演算中表达,从而把它视为理想化的现代函数式语言。文章证明内部化类型等式与单射规则通过一个在 Fω 中的非宏可表达性结果提升了表达能力,并以语法论证证明类型可靠。作者还构造了两类关系模型:简单的 unary 模型展示处理等式约束所需的新颖两阶段解释技术;更精细的 binary 模型则首次支持在配备 GADTs 的演算中对数据抽象进行形式推理。

问题
如何为 GADTs 提供一个最小 λ 演算核心,使其可直接编码 GADTs 与模式匹配并解释其类型等式与数据抽象。
方法
扩展 System Fω,加入递归类型、内部化类型等式和单射常量类型构造子,给出 GADTs 的直接编码,并用语法论证与两类关系模型分析系统。
评估
通过 Fω 中的非宏可表达性结果说明新等式/单射规则增强表达能力,证明类型可靠,并构造 unary 与 binary 关系模型验证语义与数据抽象推理。
原文摘要(Abstract)

This paper considers direct encodings of generalized algebraic data types (GADTs) in a minimal suitable lambda-calculus. To this end, we develop an extension of System F ω with recursive types and internalized type equalities with injective constant type constructors. We show how GADTs and associated pattern-matching constructs can be directly expressed in the calculus, thus showing that it may be treated as a highly idealized modern functional programming language. We prove that the internalized type equalities in conjunction with injectivity rules increase the expressive power of the calculus by establishing a non-macro-expressibility result in F ω , and prove the system type-sound via a syntactic argument. Finally, we build two relational models of our calculus: a simple, unary model that illustrates a novel, two-stage interpretation technique, necessary to account for the equational constraints; and a more sophisticated, binary model that relaxes the construction to allow, for the first time, formal reasoning about data-abstraction in a calculus equipped with GADTs.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot2583,
  title = {The Essence of Generalized Algebraic Data Types},
  author = {Filip Sieczkowski and Sergei Stepanenko and Jonathan Sterling and Lars Birkedal},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {POPL},
  year = {2024},
  doi = {10.1145/3632866}
}