paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Full Iso-Recursive Types

完全同构递归类型
OOPSLA 8(OOPSLA2)2024匹配度 2/10 · 论文是纯类型论/形式化语义工作,讨论递归类型的同构与等值编码、cast 与子类型,属于 PL 基础理论;但用户当前关注的是静态分析/形式化验证与 LLM/Agent 的交叉,以及浮点或贝叶斯程序分析,该论文既不涉及 AI/LLM,也不涉及程序分析工具、工业落地或相关 benchmark。引用 4 inbox
Litao Zhou, Qianyong Wan, Bruno C. d. S. Oliveira
dblp: 2026-09-10crossref: 2026-09-10arxiv: 2026-09-10

AI 速览

一句话:提出完全同构递归类型,以可擦除 cast 编码等值递归类型,消除强制转换开销并简化等价推理。

同构递归类型与等值递归类型在表达力上等价,但 Abadi 和 Fiore 的编码需要显式强制转换,带来额外计算开销并使两种表述的等价性推理复杂化。本文提出完全同构递归类型,用计算无关的 cast 捕获所有类型变换,这些 cast 可在运行时擦除而不影响程序语义,从而无开销地编码等值递归类型程序。作者定义了扩展简单类型 λ 演算的 λF_iμ 演算,证明其类型可靠性,并证明其与等值递归类型演算表达力相同。文章还将结果扩展到子类型,表明等值递归子类型可用带 cast 算子的同构递归子类型表达。

问题
如何在避免显式强制转换开销的前提下,用同构递归类型编码等值递归类型程序,并简化两者等价性推理?
方法
提出完全同构递归类型,将类型变换实现为计算无关、运行时可擦除的 cast;定义 λF_iμ 演算并给出元理论证明,进而扩展至子类型。
评估
通过类型可靠性证明、与等值递归类型演算的表达力等价证明,以及子类型编码证明进行评估;摘要未涉及实验评估。
原文摘要(Abstract)

There are two well-known formulations of recursive types: iso-recursive and equi-recursive types. Abadi and Fiore [LICS 1996] have shown that iso- and equi-recursive types have the same expressive power. However, their encoding of equi-recursive types in terms of iso-recursive types requires explicit coercions. These coercions come with significant additional computational overhead , and complicate reasoning about the equivalence of the two formulations of recursive types. This paper proposes a generalization of iso-recursive types called full iso-recursive types. Full iso-recursive types allow encoding all programs with equi-recursive types without computational overhead. Instead of explicit term coercions, all type transformations are captured by computationally irrelevant casts, which can be erased at runtime without affecting the semantics of the program. Consequently, reasoning about the equivalence between the two approaches can be greatly simplified. We present a calculus called λ F i μ , which extends the simply typed lambda calculus (STLC) with full iso-recursive types. The λ F i μ calculus is proved to be type sound, and shown to have the same expressive power as a calculus with equi-recursive types. We also extend our results to subtyping, and show that equi-recursive subtyping can be expressed in terms of iso-recursive subtyping with cast operators.

链接与引用

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

BibTeX
@article{abs-2407-00941,
  title = {Full Iso-Recursive Types},
  author = {Litao Zhou and Qianyong Wan and Bruno C. d. S. Oliveira},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {OOPSLA2},
  year = {2024},
  doi = {10.1145/3689718}
}