paperbot · PL 论文追踪

全部论文 待读 收藏

P2 A Bowtie for a Beast: Overloading, Eta Expansion, and Extensible Data Types in F⋈

为野兽系上领结:F⋈ 中的重载、eta 展开与可扩展数据类型
POPL 7(POPL)2023匹配度 2/10 · 论文是纯类型系统与语言设计研究,讨论 merge 算子、union/intersection 类型与重载的类型安全和确定性,与用户关注的静态分析+LLM/Agent、浮点程序分析或贝叶斯程序分析没有直接交集。仅作为 PL 理论基础可能有间接参考,但不属于当前研究画像的核心方向。引用 10 inbox
Nick Rioux, Xuejing Huang, Bruno C. d. S. Oliveira, Steve Zdancewic
crossref: 2026-09-10

AI 速览

一句话:提出 F⋈ 核心语言,用对偶不相交关系驯服 merge,使 union、intersection 和重载共存且类型安全、确定。

类型化 merge 算子可实现组合式静态类型编程并自然解决表达式问题,但处理重叠类型合并时会产生歧义。此前的 disjoint merge 依赖 intersection types,扩展到 union types 或重载函数时又会重新引入歧义:union 与重载的消去形式要求值可区分,而 merge 可能构造出违反该要求的奇异值。本文提出核心语言 F⋈,其设计原则是任意两个可居留类型要么支持值的确定性合并,要么支持值的可区分性,但不能同时支持两者。作者将既有 disjointness 概念分解为两个对偶关系,为每对类型选择合适操作,并尊重类型结构的极化。F⋈ 支持 union、intersection 与重载共存,被证明类型安全且具有确定性。

问题
如何在带 merge 算子的类型系统中避免重叠合并造成的歧义,同时支持 union 类型与重载函数,并保持确定性语义。
方法
提出 F⋈ 核心语言;将 disjointness 分解为两个对偶关系,依据类型结构极化让每对类型选择确定性合并或可区分性,从而整合 union、intersection、重载与 merge。
评估
通过形式化定义 F⋈ 并给出证明,验证该语言类型安全且确定。
原文摘要(Abstract)

The typed merge operator offers the promise of a compositional style of statically-typed programming in which solutions to the expression problem arise naturally. This approach, dubbed compositional programming , has recently been demonstrated by Zhang et al. Unfortunately, the merge operator is an unwieldy beast. Merging values from overlapping types may be ambiguous, so disjointness relations have been introduced to rule out undesired nondeterminism and obtain a well-behaved semantics. Past type systems using a disjoint merge operator rely on intersection types, but extending such systems to include union types or overloaded functions is problematic: naively adding either reintroduces ambiguity. In a nutshell: the elimination forms of unions and overloaded functions require values to be distinguishable by case analysis, but the merge operator can create exotic values that violate that requirement. This paper presents F ⋈ , a core language that demonstrates how unions, intersections, and overloading can all coexist with a tame merge operator. The key is an underlying design principle that states that any two inhabited types can support either the deterministic merging of their values, or the ability to distinguish their values, but never both. To realize this invariant, we decompose previously studied notions of disjointness into two new, dual relations that permit the operation that best suits each pair of types. This duality respects the polarization of the type structure, yielding an expressive language that we prove to be both type safe and deterministic.

链接与引用

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

BibTeX
@article{paperbot2048,
  title = {A Bowtie for a Beast: Overloading, Eta Expansion, and Extensible Data Types in F⋈},
  author = {Nick Rioux and Xuejing Huang and Bruno C. d. S. Oliveira and Steve Zdancewic},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {POPL},
  year = {2023},
  doi = {10.1145/3571211}
}