paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Practical Subtyping for Curry-Style Languages

Curry 风格语言的实用子类型系统
TOPLAS 41(1)2019匹配度 2/10 · 该论文属于类型论/程序语言理论的核心工作(Curry 风格子类型、归纳与余归纳类型的大小不变量、终止性证明),与用户关注的静态分析在 ML/Agent 程序中的应用、LLM 与静态分析/形式化验证的交叉、浮点程序分析及贝叶斯程序分析等方向均无直接关联。其“理论形式化 + 实现”的风格虽符合用户的部分偏好,但研究问题本身不在画像范围内。引用 9 inbox
Rodolphe Lepigre, Christophe Raffalli
crossref: 2026-09-10

AI 速览

一句话:提出面向 Curry 风格语言的语法导向子类型框架,用带大小不变量的(余)归纳类型证明递归程序终止。

本文提出一个面向 Curry 风格类型系统、以语法为导向的子类型框架,旨在以较简单的理论与实现支持丰富特性。系统包含和类型、积类型、全称与存在量化,以及归纳与余归纳类型;后两者可携带大小不变量,用于证明递归程序终止,例如通过说明 quicksort 的分区不增加列表大小来推出其终止。关键思想是将大小与递归分离:不直接检查程序终止,而是证明其循环类型推导良基,再借助标准语义归一化证明得到终止。系统可处理归纳与余归纳混合、多态与(余)归纳混合的复杂程序。作者实现了该系统,并接受文中所有示例,说明其可行性。

问题
如何为 Curry 风格语言设计一个既支持子类型、和/积类型、量化与(余)归纳类型,又能处理大小不变量与递归程序终止证明的类型系统,同时保持理论与实现简单实用?
方法
提出语法导向的子类型框架,将大小与递归分离;不直接验证终止,而是构造带大小信息的循环类型推导并证明其良基,进而通过语义归一化证明终止。
评估
实现该类型系统并运行文章中讨论的示例(包括混合归纳/余归纳与多态的程序,如 quicksort),所有示例均被接受,以验证框架的实用性。
原文摘要(Abstract)

We present a new, syntax-directed framework for Curry-style type systems with subtyping. It supports a rich set of features, and allows for a reasonably simple theory and implementation. The system we consider has sum and product types, universal and existential quantifiers, and inductive and coinductive types. The latter two may carry size invariants that can be used to establish the termination of recursive programs. For example, the termination of quicksort can be derived by showing that partitioning a list does not increase its size. The system deals with complex programs involving mixed induction and coinduction, or even mixed polymorphism and (co-)induction. One of the key ideas is to separate the notion of size from recursion. We do not check the termination of programs directly, but rather show that their (circular) typing proofs are well-founded. Termination is then obtained using a standard (semantic) normalisation proof. To demonstrate the practicality of the system, we provide an implementation accepting all the examples discussed in the article.

链接与引用

DOI 原文 ·

BibTeX
@article{paperbot717,
  title = {Practical Subtyping for Curry-Style Languages},
  author = {Rodolphe Lepigre and Christophe Raffalli},
  journal = {ACM Transactions on Programming Languages and Systems},
  volume = {41},
  number = {1},
  year = {2019},
  doi = {10.1145/3285955}
}