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.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
它引用的顶会 Paper4
- 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 次
- Making a Type Difference: Subtraction on Intersection Types as Generalized Record OperationsHan Xu, Xuejing Huang, Bruno C. d. S. OliveiraPOPL 2023 · 被引用 7 次
- Resolution as intersection subtyping via Modus PonensKoar Marntirosian, Tom Schrijvers, Bruno C. d. S. Oliveira, Georgios KarachaliasOOPSLA 2020 · 被引用 5 次
- Imperative Compositional Programming: Type Sound Distributive Intersection Subtyping with References via Bidirectional TypingWenjia Ye, Yaozhu Sun, Bruno C. d. S. OliveiraOOPSLA 2024 · 被引用 1 次
相关 Paper
- Merging Gradual TypingWenjia Ye, Bruno C. d. S. Oliveira, Matías ToroOOPSLA 2024 · 被引用 2 次
- Polymorphic Type Inference for Dynamic LanguagesGiuseppe Castagna, Mickaël Laurent, Kim NguyenPOPL 2024 · 被引用 12 次
- Polymorphic Records for Dynamic LanguagesGiuseppe Castagna, Loïc PeyrotOOPSLA 2025 · 被引用 2 次
- AdapTT: Functoriality for Dependent Type CastsArthur Adjedj, Meven Lennon-Bertrand, Thibaut Benjamin, Kenji MaillardPOPL 2026 · 被引用 1 次
- MLstruct: principal type inference in a Boolean algebra of structural typesLionel Parreaux, Chun Yin ChauOOPSLA 2022 · 被引用 31 次
