paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Merging Gradual Typing

融合渐进类型
OOPSLA 8(OOPSLA2)2024匹配度 2/10 · 该论文属于纯类型论/形式语义方向(渐进类型与交类型合并算子),虽与 PL 相关,但既不涉及静态分析工具在 ML/Agent 系统上的应用,也不涉及 LLM/Agent 与静态分析或形式化验证的交叉,与浮点程序分析、贝叶斯程序分析等核心议题无直接关联。引用 3 inbox
Wenjia Ye, Bruno C. d. S. Oliveira, Matías Toro
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出 λ_M^★,将渐进类型与基于交类型的合并算子结合,为支持一等类与动态继承的渐进语言奠定类型基础。

论文研究如何统一两类类型导向机制:渐进类型与基于交类型的合并算子。作者提出演算 λ_M^★,它把渐进类型与合并算子结合,从而为同时支持一等类、动态继承等特性的渐进类型语言提供基础。论文还研究其静态变体 λ_M,证明 λ_M^★ 的类型健全性,并展示 λ_M^★ 可编码 gradual rows 以及 GTFL≲ 类型判定标准下的所有良类型项。由于歧义错误,动态渐进保证(DGG)难以直接成立;作者基于步进索引逻辑关系给出语义精度概念,并建立 DGG 的一个变体。

问题
类型导向机制如渐进类型与交类型合并算子虽各有优势,但通常被独立研究,缺少能同时支持一等类与动态继承的渐进语言基础。
方法
提出 λ_M^★ 演算,将渐进类型与基于交类型的合并算子结合,并研究其静态变体 λ_M;使用类型规则、类型健全性证明及步进索引逻辑关系等语义工具。
评估
证明 λ_M^★ 类型健全;给出 gradual rows 与 GTFL≲ 良类型项的编码;在存在歧义错误的情况下建立基于语义精度的动态渐进保证变体。
原文摘要(Abstract)

Programming language mechanisms with a type-directed semantics are nowadays common and widely used. Such mechanisms include gradual typing, type classes, implicits and intersection types with a merge operator . While sharing common challenges in their design and having complementary strengths, type-directed mechanisms have been mostly independently studied. This paper studies a new calculus, called λ M ★ , which combines two type-directed mechanisms: gradual typing and a merge operator based on intersection types. Gradual typing enables a smooth transition between dynamically and statically typed code, and is available in languages such as TypeScript or Flow. The merge operator generalizes record concatenation to allow merges of values of any two types. Recent work has shown that the merge operator enables modelling expressive OOP features like first-class traits/classes and dynamic inheritance with static type-checking. These features are not found in mainstream statically typed OOP languages, but they can be found in dynamically or gradually typed languages such as JavaScript or TypeScript. In λ M ★ , by exploiting the complementary strengths of gradual typing and the merge operator, we obtain a foundation for modelling gradually typed languages with both first-class classes and dynamic inheritance. We study a static variant of λ M ★ (called λ M ); prove the type-soundness of λ M ★ ; show that λ M ★ can encode gradual rows and all well-typed terms in the GTFL ≲ typing criteria. The dynamic gradual guarantee (DGG) is challenging due to the possibility of ambiguity errors. We establish a variant of the DGG using a semantic notion of precision based on a step-indexed logical relation.

链接与引用

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

BibTeX
@article{YeOT24,
  title = {Merging Gradual Typing},
  author = {Wenjia Ye and Bruno C. d. S. Oliveira and Matías Toro},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {OOPSLA2},
  year = {2024},
  doi = {10.1145/3689734}
}