paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Abstracting extensible data types: or, rows by any other name

抽象可扩展数据类型:或,行类型无论何名
POPL 3(POPL)2019匹配度 1/10 · 该论文研究可扩展数据类型的类型系统理论(row theories、qualified types),属于纯编程语言设计与类型论,未涉及静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析等用户核心方向。引用 29 inbox
J. Garrett Morris, James McKinna
crossref: 2026-09-10

AI 速览

一句话:提出 row theories 与 qualified types,统一抽象可扩展记录和变体,并保持 coherence 与主类型。

现有可扩展数据类型系统以行类型和行多态为核心,但缺少对记录拼接/投影与变体注入/分支的统一抽象。本文提出一种新的类型化语言,引入 row theories,即行类型的 monoidal 泛化,为这些操作提供一般解释;并通过 qualified types 将记录和变体的语义抽象到不同 row theories 上。类型限定符的证据具有计算内容,决定记录与变体操作的实现。作者给出从该演算到多态 λ-演算的模块化翻译,并可在多种 row theories 下实例化。结果表明,该方法能为其他系统无法类型化的项赋予类型,同时保持 coherence、principal types 等强元理论性质,并支持模块化组合解释器。

问题
如何泛化和抽象现有的行类型与行多态系统,为可扩展数据类型提供统一类型理论,支持记录拼接/投影和变体注入/分支,同时保持强元理论性质。
方法
引入 row theories 作为行类型的 monoidal 泛化,并用 qualified types 抽象不同 row theories 下记录和变体的解释;类型限定符证据具有计算内容,指导具体实现,并给出到多态 λ-演算的模块化翻译。
评估
通过展示该演算可在多种 row theories 下实例化并翻译到多态 λ-演算,论证其能为其他系统无法类型化的项赋予类型,并保持 coherence 与 principal types。
原文摘要(Abstract)

We present a novel typed language for extensible data types, generalizing and abstracting existing systems of row types and row polymorphism. Extensible data types are a powerful addition to traditional functional programming languages, capturing ideas from OOP-like record extension and polymorphism to modular compositional interpreters. We introduce row theories, a monoidal generalization of row types, giving a general account of record concatenation and projection (dually, variant injection and branching). We realize them via qualified types, abstracting the interpretation of records and variants over different row theories. Our approach naturally types terms untypable in other systems of extensible data types, while maintaining strong metatheoretic properties, such as coherence and principal types. Evidence for type qualifiers has computational content, determining the implementation of record and variant operations; we demonstrate this in giving a modular translation from our calculus, instantiated with various row theories, to polymorphic λ-calculus.

链接与引用

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

BibTeX
@article{paperbot653,
  title = {Abstracting extensible data types: or, rows by any other name},
  author = {J. Garrett Morris and James McKinna},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {3},
  number = {POPL},
  year = {2019},
  doi = {10.1145/3290325}
}