Lune

OOPSLA2024顶会

Merging Gradual Typing

Wenjia Ye, Bruno C. d. S. Oliveira, Matías Toro

摘要

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 GT FL ≲ calculus; and show that λM ⋆ satisfies gradual 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.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Abstracting gradual typing moving forward: precise and space-efficient 引用了 Graduality and parametricity: together again for the first time
  • Flexible and Expressive Typed Path Patterns for GQL 引用了 A Gradual Probabilistic Lambda Calculus
  • Flexible and Expressive Typed Path Patterns for GQL 引用了 Abstracting gradual typing moving forward: precise and space-efficient
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper3

  1. A Gradual Probabilistic Lambda CalculusWenjia Ye, Matías Toro, Federico OlmedoOOPSLA 2023 · 3 次引用
  2. Diatom: Polylithic Binary Lifting with Data-Flow Summaries and Type-Aware IR LinkingAnshunkang Zhou, Charles ZhangOOPSLA 2026 · 1 次引用
  3. Flexible and Expressive Typed Path Patterns for GQLWenjia Ye, Matías Toro, Tomás Díaz, Bruno C. d. S. Oliveira 等OOPSLA 2025 · 1 次引用

它引用的 Paper3

  1. Graduality and parametricity: together again for the first timeMax S. New, Dustin Jamner, Amal AhmedPOPL 2020 · 36 次引用
  2. Abstracting gradual typing moving forward: precise and space-efficientFelipe Bañados Schwerter, Alison M. Clark, Khurram A. Jafery, Ronald GarciaPOPL 2021 · 13 次引用
  3. Transitioning from structural to nominal code with efficient gradual typingFabian Muehlboeck, Ross TateOOPSLA 2021 · 8 次引用

相关 Paper

  1. Liberating Merges via Apartness and Guarded SubtypingHan Xu, Xuejing Huang, Bruno C. d. S. OliveiraOOPSLA 2025
  2. Quest Complete: The Holy Grail of Gradual SecurityTianyu Chen, Jeremy G. SiekPLDI 2024 · 6 次引用
  3. Label dependent lambda calculus and gradual typingWeili Fu, Fabian Krause, Peter ThiemannOOPSLA 2021
  4. Resolution as intersection subtyping via Modus PonensKoar Marntirosian, Tom Schrijvers, Bruno C. d. S. Oliveira, Georgios KarachaliasOOPSLA 2020 · 5 次引用
  5. Solver-based gradual type migrationLuna Phipps-Costin, Carolyn Jane Anderson, Michael Greenberg, Arjun GuhaOOPSLA 2021 · 16 次引用
黄昏的海面,两侧是细线勾勒的悬崖