paperbot · PL 论文追踪

全部论文 待读 收藏

P2 First-Class Constrained Types: Elaboration, Type Inference, Approximation, and a Characterization of Termination

一等约束类型:精化、类型推断、近似与终止性刻画
ICFP 10(ICFP)2026匹配度 2/10 · 该论文属于纯 PL 类型论方向,研究一等约束类型、CBN 终止性和类型推断,并未涉及机器学习系统/Agentic 程序的静态分析、LLM 与静态分析/形式化验证的结合、浮点程序分析或贝叶斯程序分析。虽然类型系统与终止性分析属于 PL/形式化方法,但与用户当前核心研究问题距离较远。引用 1 inbox
Chun Kit Lam, Florent Ferrari, Lionel Parreaux
crossref: 2026-09-10

AI 速览

一句话:提出一等约束类型系统 FCCT,证明可类型性精确刻画 call-by-name 终止,并给出可终止的近似类型推断。

本文将约束类型提升为一等公民,提出在 System F 上支持多态子类型和类型中约束抽象的系统 FCCT:类型 c ⇒ τ 的值可在消解约束 c 后当作 τ 使用。通过精化到 System F,作者证明所有良类型项在 call-by-name 求值下终止,且所有 CBN 终止项均良类型,从而 FCCT 可类型性精确刻画 CBN 终止。作者还给出无近似的主类型推断半算法 FCCT_I,展示其可间接模拟项归约,揭示有界多态类型推断的困难;并扩展该算法以跟踪抽象调用上下文、通过共享多态实例化进行近似,在保持可靠性下保证终止。最后建立约束类型与交集类型系统的联系。

问题
约束类型此前多限于 ML 式多态,缺乏一等处理;论文研究其类型化、推断与终止性刻画。
方法
定义 System FCCT(System F 加多态子类型与类型中约束抽象),通过精化到 System F 证明性质,并设计主类型推断半算法 FCCT_I 及近似扩展。
评估
以形式化推导与算法性质分析进行评估:证明良类型项 CBN 终止且 CBN 终止项良类型,并分析 FCCT_I 对归约的模拟以及近似推断的可靠性与终止性。
原文摘要(Abstract)

We study a first-class treatment of constrained types, which were previously confined mostly to ML-style polymorphism. We define System FCCT, an extension of System F with polymorphic subtyping and constraint abstraction in types. A value of type c ⇒ τ can be used at type τ in any context where the subtyping constraint c can be discharged. We show that FCCT exhibits interesting properties. First, all well-typed FCCT terms terminate under call-by-name evaluation (CBN), which can be shown by elaboration into System F. Second, all CBN-terminating terms are well-typed in FCCT. Together, these two properties mean that typability in System FCCT characterizes call-by-name termination. Third, FCCT admits a principal type inference semi-algorithm, called FCCT I , which makes no approximations and can thus be seen as an idealized “ground truth” of type inference. We show that FCCT I indirectly simulates term reduction, shedding some light on the difficulty of bounded polymorphic type inference. Finally, we extend FCCT I to track abstracted call contexts and perform approximation by sharing polymorphic instantiations, ensuring termination on all input terms while preserving soundness. In addition to making the connection between polymorphic subtype constraint solving and term reduction, this paper also establishes a connection between constrained types and existing intersection type systems, which are known to characterize various normalization properties.

链接与引用

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

BibTeX
@article{LamFP26,
  title = {First-Class Constrained Types: Elaboration, Type Inference, Approximation, and a Characterization of Termination},
  author = {Chun Kit Lam and Florent Ferrari and Lionel Parreaux},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {ICFP},
  year = {2026},
  doi = {10.1145/3828701}
}