paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Kinds are calling conventions

Kind 即调用约定
ICFP 4(ICFP)2020匹配度 3/10 · 论文属于编译器与类型系统方向,研究中间语言中通过 Kind 编码调用约定以支持高效多态编译;这与用户关注的静态分析、LLM/Agent 交叉、浮点程序分析或贝叶斯程序分析没有直接关联,仅在广义 PL 方向上边缘相关。引用 11 inbox
Paul Downen, Zena M. Ariola, Simon Peyton Jones, Richard A. Eisenberg
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出一种新的中间语言,将调用约定编码在类型的 Kind 中,从而兼顾灵活多态与高效静态编译。

支持多态的语言让程序员可以一次表达复杂想法并在多种场景复用函数,但多态也给编译器带来挑战:要在多态代码中高效操作具体值并不容易。本文提出一种新的中间语言,在支持灵活多态的同时实现高效静态编译。其多态不仅覆盖值的类型,还覆盖值的表示、原语机器函数的元数以及参数的求值顺序,这三者在实际编译中都很重要。核心思想是把关于值调用约定的信息编码到其类型的 Kind 中,而不是编码在类型本身中。这样,编译器可以在 Kind 层面获知表示、元数与求值顺序等编译所需信息,从而生成高效代码。摘要未给出具体实验评估。

问题
多态有利于代码复用,却使编译器难以生成高效操作具体值的代码,尤其是需要多态于值表示、机器函数元数和求值顺序时。
方法
提出新的中间语言,将值的调用约定(表示、原语机器函数元数、参数求值顺序)编码到类型的 Kind 中,而非类型本身,以支持高效静态编译与灵活多态。
评估
摘要未报告实验或基准测试评估;论文通过中间语言设计与论证说明其如何兼顾多态与高效静态编译。
原文摘要(Abstract)

A language supporting polymorphism is a boon to programmers: they can express complex ideas once and reuse functions in a variety of situations. However, polymorphism is pain for compilers tasked with producing efficient code that manipulates concrete values. This paper presents a new intermediate language that allows for efficient static compilation, while still supporting flexible polymorphism. Specifically, it permits polymorphism over not only the types of values, but also the representation of values, the arity of primitive machine functions, and the evaluation order of arguments---all three of which are useful in practice. The key insight is to encode information about a value's calling convention in the kind of its type, rather than in the type itself.

链接与引用

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

BibTeX
@article{DownenAJE20,
  title = {Kinds are calling conventions},
  author = {Paul Downen and Zena M. Ariola and Simon Peyton Jones and Richard A. Eisenberg},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {4},
  number = {ICFP},
  year = {2020},
  doi = {10.1145/3408986}
}