paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Decidable Subtyping of Existential Types for Julia

面向 Julia 的存在类型可判定子类型
PLDI 8(PLDI)2024匹配度 2/10 · 该论文研究 Julia 子类型系统的可判定性,属于偏基础的 PL 类型理论工作;与用户当前关注的 PL↔AI(LLM/Agent 静态分析)、浮点程序分析、贝叶斯程序分析等核心方向没有直接交集。引用 2 inbox
Julia Belyakova, Benjamin Chung, Ross Tate, Jan Vitek
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:证明 Julia 子类型不可判定,并提出将方法签名与值类型分层的限制以恢复可判定性。

Julia 通过多重分派实现泛型库,方法声明上的类型标注在运行时用于判定方法是否适用,因此其子类型关系对语言实现至关重要。本文首先证明 Julia 的子类型判定是不可判定的;随后提出一种类型限制:将类型分层为方法签名与值类型,前者可自由使用有界存在类型,后者仅允许使用使用点方差(use-site variance),从而恢复子类型关系的可判定性。作者还进行了真实代码语料库分析,结果表明实践中几乎所有的 Julia 程序都已经满足这一限制。

问题
Julia 在运行时依赖子类型来判定多重分派方法的适用性,但其存在类型与子类型关系的可判定性此前并不清楚。
方法
先证明 Julia 原始子类型判定不可判定,再通过将类型分层为方法签名与值类型、并限制值类型只使用使用点方差(use-site variance)来设计可判定的子类型系统。
评估
对真实 Julia 代码语料库进行分析,发现几乎全部实际程序都符合所提出的类型限制。
原文摘要(Abstract)

Julia is a modern scientific-computing language that relies on multiple dispatch to implement generic libraries. While the language does not have a static type system, method declarations are decorated with expressive type annotations to determine when they are applicable. To find applicable methods, the implementation uses subtyping at run-time. We show that Julia’s subtyping is undecidable, and we propose a restriction on types to recover decidability by stratifying types into method signatures over value types—where the former can freely use bounded existential types but the latter are restricted to use-site variance. A corpus analysis suggests that nearly all Julia programs written in practice already conform to this restriction.

链接与引用

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

BibTeX
@article{BelyakovaCTV24,
  title = {Decidable Subtyping of Existential Types for Julia},
  author = {Julia Belyakova and Benjamin Chung and Ross Tate and Jan Vitek},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {PLDI},
  year = {2024},
  doi = {10.1145/3656421}
}