paperbot · PL 论文追踪

RSS

On the Operational Theory of the CPS-Calculus: Towards a Theoretical Foundation for IRs

ICFP 8(ICFP)2024引用 0
Paulo Torrens, Dominic Orchard, Cristiano Vasconcellos

尚未生成 AI 速览(可能缺少 API key 或等待下次运行补跑)。

原文摘要(Abstract)

The continuation-passing style translation often employed by compilers gives rise to a class of intermediate representation languages where functions are not allowed to return anymore. Though the primary use of these intermediate representation languages is to expose details about a program’s control flow, they may be equipped with an equational theory in order to be seen as specialized calculi, which in turn may be related to the original languages by means of a factorization theorem. In this paper, we explore Thielecke’s CPS-calculus, a small theory of continuations inspired by compiler implementations, and study its metatheory. We extend it with a sound reduction semantics that faithfully represents optimization rules used in actual compilers, and prove that it acts as a suitable theoretical foundation for the intermediate representation of Appel’s and Kennedy’s compilers by following the guidelines set out by Plotkin. Finally, we prove that the CPS-calculus is strongly normalizing in the simply typed setting by using a novel proof method for reasoning about reducibility at a distance, from which logical consistency follows. Taken together, these results close a gap in the existing literature, providing a formal theory for reasoning about intermediate representations.

链接与引用

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

BibTeX
@article{TorrensOV24,
  title = {On the Operational Theory of the CPS-Calculus: Towards a Theoretical Foundation for IRs},
  author = {Paulo Torrens and Dominic Orchard and Cristiano Vasconcellos},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {ICFP},
  year = {2024},
  doi = {10.1145/3674630}
}