Reference. 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.

Cite

Cite as @geller-2025-type (helia, typst) · \cite{geller-2025-type} (LaTeX)
BibTeX
bibtex · 1 line
@article{geller-2025-type, title={Type-Preserving Flat Closure Optimization}, volume={9}, ISSN={2475-1421}, url={http://dx.doi.org/10.1145/3720437}, DOI={10.1145/3720437}, number={OOPSLA1}, journal={Proceedings of the ACM on Programming Languages}, publisher={Association for Computing Machinery (ACM)}, author={Geller, Adam T. and Bocirnea, Sean and Gould, Chester J. F. and Koronkevich, Paulette and Bowman, William J.}, year={2025}, month=Apr, pages={649–675} }
hayagriva YAML (typst)
yaml · 21 lines
geller-2025-type:
  type: article
  title: Type-Preserving Flat Closure Optimization
  author:
  - Geller, Adam T.
  - Bocirnea, Sean
  - Gould, Chester J. F.
  - Koronkevich, Paulette
  - Bowman, William J.
  date: 2025-04
  page-range: 649-675
  url: http://dx.doi.org/10.1145/3720437
  serial-number:
    doi: 10.1145/3720437
    issn: 2475-1421
  parent:
    type: periodical
    title: Proceedings of the ACM on Programming Languages
    publisher: Association for Computing Machinery (ACM)
    issue: OOPSLA1
    volume: 9
Cites 36 works (1 here)
With notes (1)

Fully Abstract Compilation via Universal Embedding new_bowman_ahmed_2016

A fully abstract compiler guarantees that two source components are observationally equivalent in the source language if and only if their translations are observationally equivalent in the target. Full abstraction implies the translation is secure: target-language attackers can make no more observations of a compiled component than a source-language attacker interacting with the original source component. Proving full abstraction for realistic compilers is challenging because realistic target languages contain features (such as control effects) unavailable in the source, while proofs of full abstraction require showing that every target context to which a compiled component may be linked can be back-translated to a behaviorally equivalent source context.

We prove the first full abstraction result for a translation whose target language contains exceptions, but the source does not. Our translation—specifically, closure conversion of simply typed λ-calculus with recursive types—uses types at the target level to ensure that a compiled component is never linked with attackers that have more distinguishing power than source-level attackers. We present a new back-translation technique based on a shallow embedding of the target language into the source language at a dynamic type. Then boundaries are inserted that mediate terms between the untyped embedding and the strongly-typed source. This technique allows back-translating non-terminating programs, target features that are untypeable in the source, and well-bracketed effects.

PDF · Web · pldb
External (35)
geller-2025-type reference entries/refs/geller-2025-type/geller-2025-type.hel