paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Quotient Polymorphism

商多态
POPL 10(POPL)2026匹配度 1/10 · 该论文属于类型系统与函数式编程中的商类型/多态理论研究,与用户关注的人工智能与程序语言交叉、静态分析、浮点程序分析、贝叶斯程序分析及 LLM/Agent 方向均无直接关联。引用 0 inbox
Brandon Hewer, Graham Hutton
crossref: 2026-09-10

AI 速览

一句话:提出 choice polymorphism,使函数可复用于不同商类型,避免代码重复并接受更多合法定义。

商类型让类型包含等式性质,从而增强类型系统表达力,但现有实现存在两个问题:同一函数常需对每个商重复定义,且包含不尊重商的子项但整体合法的函数会被拒绝。本文提出一种商多态(quotient polymorphism),称为 choice polymorphism,允许函数跨商类型复用并提升表达力。作者给出实用示例,发展其底层理论,并在 Quotient Haskell 中实现。该工作缓解代码重复与过度拒绝问题,为商类型编程提供更灵活的多态机制。

问题
商类型提升类型系统表达力,但函数定义常需按商重复,且合法函数可能因含有不尊重商的子项而被拒绝。
方法
提出 choice polymorphism 形式的商多态,给出实用示例,建立底层理论,并在 Quotient Haskell 中实现。
评估
以实用示例展示用途,并通过 Quotient Haskell 实现验证机制;摘要未报告量化实验评估。
原文摘要(Abstract)

Quotient types increase the power of type systems by allowing types to include equational properties. However, two key practical issues arise: code being duplicated, and valid code being rejected. Specifically, function definitions often need to be repeated for each quotient of a type, and valid functions may be rejected if they include subterms that do not respect the quotient. This article addresses these reusability and expressivity issues by introducing a notion of quotient polymorphism that we call choice polymorphism . We give practical examples of its use, develop the underlying theory, and implement it in Quotient Haskell.

链接与引用

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

BibTeX
@article{HewerH26,
  title = {Quotient Polymorphism},
  author = {Brandon Hewer and Graham Hutton},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {POPL},
  year = {2026},
  doi = {10.1145/3776665}
}