Closure Conversion, Flat Environments, and the Complexity of Abstract Machines

July 21, 2025 Β· Declared Dead Β· πŸ› ACM-SIGPLAN International Conference on Principles and Practice of Declarative Programming

πŸ‘» CAUSE OF DEATH: Ghosted
No code link whatsoever

"No code URL or promise found in abstract"

Evidence collected by the PWNC Scanner

Authors Beniamino Accattoli, Dan Ghica, Giulio Guerrieri, ClΓ‘udio Belo LourenΓ§o, Claudio Sacerdoti Coen arXiv ID 2507.15843 Category cs.PL: Programming Languages Citations 1 Venue ACM-SIGPLAN International Conference on Principles and Practice of Declarative Programming Last Checked 4 months ago
Abstract
Closure conversion is a program transformation at work in compilers for functional languages to turn inner functions into global ones, by building closures pairing the transformed functions with the environment of their free variables. Abstract machines rely on similar and yet different concepts of closures and environments. In this paper, we study the relationship between the two approaches. We adopt a very simple Ξ»-calculus with tuples as source language and study abstract machines for both the source language and the target of closure conversion. Moreover, we focus on the simple case of flat closures/environments, that is, with no sharing of environments. We provide three contributions. Firstly, a new simple proof technique for the correctness of closure conversion, inspired by abstract machines. Secondly, we show how the closure invariants of the target language allow us to design a new way of handling environments in abstract machines, not suffering the shortcomings of other styles. Thirdly, we study the machines from the point of view of time complexity, adapting analyses by Accattoli and co-authors. We show that closure conversion decreases various dynamic costs while increasing the size of the initial code. Despite these changes, the overall complexity of the machines before and after closure conversion turns out to be the same.
Community shame:
Not yet rated
Community Contributions

Found the code? Know the venue? Think something is wrong? Let us know!

πŸ“œ Similar Papers

In the same crypt β€” Programming Languages

Died the same way β€” πŸ‘» Ghosted