paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Polymorphic Manifest Contracts, Revised and Resolved

多态 Manifest 契约:修订与解决
TOPLAS 39(1)2017匹配度 1/10 · 论文属于类型系统与形式语义领域,研究多态 manifest 契约、参数性与类型转换关系,未涉及 LLM/Agent、机器学习系统静态分析、浮点程序分析或贝叶斯程序分析,与用户画像的核心方向基本无关。引用 20 inbox
Taro Sekiyama, Atsushi Igarashi, Michael Greenberg
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出首个不依赖猜想、支持关系参数性的多态 manifest 契约演算,并以延迟替换解决既有类型转换关系的缺陷。

Manifest 契约通过在类型中嵌入谓词来精确刻画程序性质,例如 { x : Int | x > 0 } 表示正整数。契约与多态结合可为抽象类型提供强前置/后置条件,同时隐藏实现细节。已有工作并不令人满意:Sage 通过 Type:Type 引入多态但不研究参数性;Belo 等(2011)与 Greenberg(2013)虽研究多态 manifest 契约和参数性,其类型转换关系却依赖后来被证伪的猜想。本文提出新的多态 manifest 契约演算,在 cast 上采用延迟替换(delayed substitution),建立类型可靠性与关系参数性,且不依赖任何猜想,是首个满足上述性质的多态 manifest 契约演算,从而修订并解决了先前演算的元理论问题。

问题
如何在多态 manifest 契约演算中同时支持精确细化类型与抽象类型,并建立类型可靠性和关系参数性,同时避免已有演算在类型转换关系中的元理论缺陷。
方法
设计带延迟替换 cast 的多态 manifest 契约演算,并证明类型可靠性与关系参数性,且不依赖任何猜想。
评估
以元理论证明(类型可靠性、关系参数性)评估,说明新演算解决先前工作遗留问题。
原文摘要(Abstract)

Manifest contracts track precise program properties by refining types with predicates—for example, { x :Int∣ x > 0} denotes the positive integers. Contracts and polymorphism make a natural combination: programmers can give strong contracts to abstract types, precisely stating pre- and post conditions while hiding implementation details— for instance, an abstract type of stacks might specify that the pop operation has input type { x :α Stack ∣ not (empty x )}. This article studies a polymorphic calculus with manifest contracts and establishes fundamental properties including type soundness and relational parametricity. Indeed, this is not the first work on polymorphic manifest contracts, but existing calculi are not very satisfactory. Gronski et al. developed the S age language, which introduces polymorphism through the Type:Type discipline, but they do not study parametricity. Some authors of this article have produced two separate works: Belo et al. [2011] and Greenberg [2013] studied polymorphic manifest contracts and parametricity, but their calculi have metatheoretical problems in the type conversion relations. Indeed, they depend on a few conjectures, which turn out to be false. Our calculus is the first polymorphic manifest calculus with parametricity, depending on no conjectures—it resolves the issues in prior calculi with delayed substitution on casts.

链接与引用

DOI 原文 · DBLP

BibTeX
@article{SekiyamaIG17,
  title = {Polymorphic Manifest Contracts, Revised and Resolved},
  author = {Taro Sekiyama and Atsushi Igarashi and Michael Greenberg},
  journal = {ACM Transactions on Programming Languages and Systems},
  volume = {39},
  number = {1},
  year = {2017},
  doi = {10.1145/2994594}
}