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 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.
Authors
- Adam T. Geller (ORCID: https://orcid.org/0009-0008-8137-7577)
- William J. Bowman (ORCID: https://orcid.org/0000-0002-6402-4840)
- Paulette Koronkevich (ORCID: https://orcid.org/0000-0003-0325-3305)
- Sean Bocirnea
- Chester J. F. Gould
Institutions
- University of British Columbia (CA)
Publication Details
- Journal
- Proceedings of the ACM on Programming Languages
- Published
- 2025-04-09
- DOI
- https://doi.org/10.1145/3720437
- Primary Topic
- Logic, programming, and type systems
- Type
- article
- Field-Weighted Citation Impact
- 0.00