Lune

OOPSLA2025顶会

Liberating Merges via Apartness and Guarded Subtyping

Han Xu, Xuejing Huang, Bruno C. d. S. Oliveira

摘要

The merge operator is a powerful construct in programming languages, enabling flexible composition of various components such as functions, records, or classes. Unfortunately, its application often leads to ambiguity and non-determinism, especially when dealing with overlapping types. To prevent ambiguity, approaches such as disjoint intersection types have been proposed. However, disjointness imposes strict constraints to ensure determinism, at the cost of limiting expressiveness, particularly for function overloading. This paper introduces a novel concept called type apartness, which relaxes the strict disjointness constraints, while maintaining type safety and determinism. Type apartness allows some overlap for overloaded functions as long as the calling contexts of those functions can be used to disambiguate upcasts in function calls. By incorporating the notion of guarded subtyping to prevent ambiguity when upcasting, our approach is the first to support function overloading, return type overloading, extensible records, and nested composition in a single calculus while preserving determinism. We formalize our calculi and proofs using Coq and prove their type soundness and determinism. Additionally, we demonstrate how type normalization and type difference provide more convenience and help resolve conflicts, enhancing the flexibility and expressiveness of the merge operator.

问 Lune

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

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

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Making a Type Difference: Subtraction on Intersection Types as Generalized Record Operations 引用了 Resolution as intersection subtyping via Modus Ponens
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper4

  1. A Bowtie for a Beast: Overloading, Eta Expansion, and Extensible Data Types in F⋈Nick Rioux, Xuejing Huang, Bruno C. d. S. Oliveira, Steve ZdancewicPOPL 2023 · 10 次引用
  2. Making a Type Difference: Subtraction on Intersection Types as Generalized Record OperationsHan Xu, Xuejing Huang, Bruno C. d. S. OliveiraPOPL 2023 · 7 次引用
  3. Resolution as intersection subtyping via Modus PonensKoar Marntirosian, Tom Schrijvers, Bruno C. d. S. Oliveira, Georgios KarachaliasOOPSLA 2020 · 5 次引用
  4. Imperative Compositional Programming: Type Sound Distributive Intersection Subtyping with References via Bidirectional TypingWenjia Ye, Yaozhu Sun, Bruno C. d. S. OliveiraOOPSLA 2024 · 1 次引用

相关 Paper

  1. Merging Gradual TypingWenjia Ye, Bruno C. d. S. Oliveira, Matías ToroOOPSLA 2024 · 2 次引用
  2. Polymorphic Type Inference for Dynamic LanguagesGiuseppe Castagna, Mickaël Laurent, Kim NguyenPOPL 2024 · 12 次引用
  3. Polymorphic Records for Dynamic LanguagesGiuseppe Castagna, Loïc PeyrotOOPSLA 2025 · 2 次引用
  4. AdapTT: Functoriality for Dependent Type CastsArthur Adjedj, Meven Lennon-Bertrand, Thibaut Benjamin, Kenji MaillardPOPL 2026 · 1 次引用
  5. MLstruct: principal type inference in a Boolean algebra of structural typesLionel Parreaux, Chun Yin ChauOOPSLA 2022 · 31 次引用
黄昏的海面,两侧是细线勾勒的悬崖