Type-Preserving Flat Closure Optimization

Type-preserving compilation seeks to make intent as much as a part of compilation as computation. Specifications of intent in the form of types are preserved and exploited during compilation and linking, alongside the mere computation of a program. This provides lightweight guarantees for compilatio...

Full description

Saved in:
Bibliographic Details
Published inProceedings of ACM on programming languages Vol. 9; no. OOPSLA1; pp. 649 - 675
Main Authors Geller, Adam T., Bocirnea, Sean, Gould, Chester J. F., Koronkevich, Paulette, Bowman, William J.
Format Journal Article
LanguageEnglish
Published New York, NY, USA ACM 09.04.2025
Subjects
Online AccessGet full text

Cover

Loading…
More Information
Summary:Type-preserving compilation seeks to make intent as much as a part of compilation as computation. Specifications of intent in the form of types are preserved and exploited during compilation and linking, alongside the mere computation of a program. This provides lightweight guarantees for compilation, optimization, and linking. Unfortunately, type-preserving compilation typically interferes with important optimizations. In this paper, we study typed closure representation and optimization. We analyze limitations in prior typed closure conversion representations, and the requirements of many important closure optimizations. We design a new typed closure representation in our Flat-Closure Calculus (FCC) that admits all these optimizations, prove type safety and subject reduction of FCC, prove type preservation from an existing closure converted IR to FCC, and implement common closure optimizations for FCC.
ISSN:2475-1421
2475-1421
DOI:10.1145/3720437