paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Qualified Types with Boolean Algebras

基于布尔代数的限定类型
OOPSLA 9(OOPSLA2)2025匹配度 2/10 · 该论文属于纯类型系统/效果系统形式化工作,与用户核心关注的 PL×AI、LLM 辅助静态分析/形式化验证、浮点程序分析、贝叶斯程序分析均无直接交叉;虽涉及静态类型与效果分析,但未涉及 LLM/Agent、浮点或贝叶斯方法。引用 0 inbox
Edward Lee, Jonathan Lindegaard Starup, Ondřej Lhoták, Magnus Madsen
crossref: 2026-09-10

AI 速览

一句话:提出基于布尔代数的类型限定符,扩展 System F<: 并奠定 Flix 效果系统的形式基础。

传统带类型限定符的系统多基于格,难以表达排除关系。论文主张布尔代数能自然表达排除,是限定符的实用域,并提出 System F<:B:在 System F<: 上增加布尔代数限定符,支持否定、限定符多态和子限定。作者进一步给出类型与效果系统设计配方 System F<:BE,支持效果多态、子效果及多态效果排除,并用其为 Flix 语言的效果系统建立形式基础。实现层面提出并实现 abstraction-site subeffecting 这一实用子效果形式。实验表明,该机制可消除当前 Flix 标准库中的所有效果上转(effect upcasts)。

问题
传统类型限定符通常基于格,但格无法表达排除关系,限制了限定符域的表达能力;Flix 的类型与效果系统也需要更精确的子效果机制。
方法
提出基于布尔代数的类型限定符,构造 System F<:B,并扩展为支持效果多态、子效果和多态效果排除的 System F<:BE,用于形式化 Flix 的类型与效果系统。
评估
在 Flix 中实现 abstraction-site subeffecting,并通过实验评估其在 Flix Standard Library 上消除 effect upcasts 的效果。
原文摘要(Abstract)

We propose type qualifiers based on Boolean algebras. Traditional type systems with type qualifiers have been based on lattices, but lattices lack the ability to express exclusion . We argue that Boolean algebras, which permit exclusion, are a practical and useful choice of domain for qualifiers. In this paper, we present a calculus System F <:B that extends System F <: with type qualifiers over Boolean algebras and has support for negation, qualifier polymorphism, and subqualification. We illustrate how System F <:B can be used as a design recipe for a type and effect system, System F <:BE , with effect polymorphism, subeffecting, and polymorphic effect exclusion. We use System F <:BE to establish formal foundations of the type and effect system of the Flix programming language. We also pinpoint and implement a practical form of subeffecting: abstraction-site subeffecting. Experimental results show that abstraction-site subeffecting allows us to eliminate all effect upcasts present in the current Flix Standard Library.

链接与引用

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

BibTeX
@article{paperbot2981,
  title = {Qualified Types with Boolean Algebras},
  author = {Edward Lee and Jonathan Lindegaard Starup and Ondřej Lhoták and Magnus Madsen},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {OOPSLA2},
  year = {2025},
  doi = {10.1145/3763096}
}