paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Two Parametricities Versus Three Universal Types

两种参数性与三种 Universal Type
TOPLAS 44(4)2022匹配度 2/10 · 该论文属于纯 PL 类型论/形式语义研究,讨论 System F 的参数性与 universal type,与用户核心方向(ML/Agentic 程序静态分析、LLM 与静态分析/形式化验证交叉、浮点程序分析、贝叶斯程序分析)几乎没有直接交集。虽然形式化验证/types 是 PL 基础,但本文未涉及 LLM、Agent、静态分析工具或工业落地案例。引用 2 inbox
Dominique Devriese, Marco Patrignani, Frank Piessens
crossref: 2026-09-10

AI 速览

一句话:揭示扩展 System F 因类型变量失去词法作用域而产生 universal type,并用类型世界修正参数性、否证两个猜想。

System F 的参数性刻画了多态与抽象数据类型的核心性质。当它被扩展以支持无类型代码、渐进类型、动态 sealing、运行时类型分析(typecase)与类型生成时,参数性的标准表述需借助 step-indexing、Kripke world 或双正交等方法调整,但这些表述的相对能力及扩展语言的表达力仍不清楚。本文指出,这些设置共同不强制或保持类型变量的词法作用域,从而产生 universal type(不同于全称量化类型);作者解释标准参数性为何与其不相容,并说明类型世界如何修正参数性。基于此,作者否定文献中的两个开放猜想,并指出现有 System F 与渐进类型结合方案的一个缺陷。

问题
System F 与无类型代码、渐进类型、动态 sealing、运行时类型分析和类型生成等特性结合时,参数性的标准表述应如何修改,不同修改的相对能力与扩展的表达力仍不清楚。
方法
作者识别出这些扩展共同不保持类型变量的词法作用域,从而导致 universal type 的存在,并用类型世界(type worlds)解释标准参数性为何失效以及如何修正。
评估
基于该分析,作者否证了文献中的两个开放猜想,并指出现有 System F 与渐进类型结合方案的一个缺陷。
原文摘要(Abstract)

The formal calculus System F models the essence of polymorphism and abstract data types, features that exist in many programming languages. The calculus’ core property is parametricity: a theorem expressing the language’s abstractions and validating important principles like information hiding and modularity. When System F is combined with features like recursive types, mutable state, continuations or exceptions, the formulation of parametricity needs to be adapted to follow suit, for example using techniques like step-indexing, Kripke world-indexing or biorthogonality. However, it is less clear how this formulation should change when System F is combined with untyped languages, gradual types, dynamic sealing and runtime type analysis (typecase) alongside type generation. Extensions of System F with these features have been proven to satisfy forms of parametricity (with Kripke worlds carrying semantic interpretations of types). However, the relative power of the modified formulations of parametricity with respect to others and the relative expressiveness of System F with and without these extensions are unknown. In this paper, we explain that the aforementioned different settings have a common characteristic: they do not enforce or preserve the lexical scope of System F’s type variables. Formally, this results in the existence of a universal type (note: this is not the same as a universally-quantified type). We explain why standard parametricity is incompatible with such a type and how type worlds resolve this. Building on these insights, we answer two open conjectures from the literature, negatively, and we point out a deficiency in current proposals for combining System F with gradual types.

链接与引用

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

BibTeX
@article{paperbot1604,
  title = {Two Parametricities Versus Three Universal Types},
  author = {Dominique Devriese and Marco Patrignani and Frank Piessens},
  journal = {ACM Transactions on Programming Languages and Systems},
  volume = {44},
  number = {4},
  year = {2022},
  doi = {10.1145/3539657}
}