Type-Preserving Flat Closure Optimization
Adam T. Geller, Sean Bocirnea, Chester J. F. Gould, Paulette Koronkevich, William J. Bowman
Abstract
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.
CCS Concepts: • Theory of computation → Type structures; • Software and its engineering → Formal software verification; Software performance.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f2441e67-0bb2-49e0-a317-92b244388ca9Builds on1
Related papers
- Solver-based gradual type migrationLuna Phipps-Costin, Carolyn Jane Anderson, Michael Greenberg, Arjun GuhaOOPSLA 2021 · 16 citations
- Flow-Analysis-Based Closure OptimizationJohn H. Reppy, Olin Shivers, Byron ZhongPLDI 2026 · 1 citation
- Type stability in Julia: avoiding performance pathologies in JIT compilationArtem Pelenitsyn, Julia Belyakova, Benjamin Chung, Ross Tate et al.OOPSLA 2021 · 13 citations
- Formally verified speculation and deoptimization in a JIT compilerAurèle Barrière, Sandrine Blazy, Olivier Flückiger, David Pichardie et al.POPL 2021 · 38 citations
- Non-interference Preserving Optimising CompilationJulian Rosemann, Sebastian Hack, Deepak GargOOPSLA 2025 · 1 citation
