Passer à la navigation principale Passer à la recherche Passer au contenu principal

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

  • Beniamino Accattoli
  • , Cláudio Belo Lourenço
  • , Dan R. Ghica
  • , Giulio Guerrieri
  • , Claudio Sacerdoti Coen

Résultats de recherche: Le chapitre dans un livre, un rapport, une anthologie ou une collectionContribution à une conférenceRevue par des pairs

Résumé

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. We study the relationship between the two approaches. We adopt a 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 (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. 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.

langue originaleAnglais
titreProceedings of the 27th International Symposium on Principles and Practice of Declarative Programming, PPDP 2025, Co-located with the 41st International Conference on Logic Programming
rédacteurs en chefMalgorzata Biernacka, Carlos Olarte, Francesco Ricca, James Cheney
EditeurAssociation for Computing Machinery, Inc
ISBN (Electronique)9798400720857
Les DOIs
étatPublié - 13 déc. 2025
Evénement27th International Symposium on Principles and Practice of Declarative Programming, PPDP 2025 - Rende, Italie
Durée: 10 sept. 202511 sept. 2025

Série de publications

NomProceedings of the 27th International Symposium on Principles and Practice of Declarative Programming, PPDP 2025, Co-located with the 41st International Conference on Logic Programming

Une conférence

Une conférence27th International Symposium on Principles and Practice of Declarative Programming, PPDP 2025
Pays/TerritoireItalie
La villeRende
période10/09/2511/09/25

Empreinte digitale

Examiner les sujets de recherche de « Closure Conversion, Flat Environments, and the Complexity of Abstract Machines ». Ensemble, ils forment une empreinte digitale unique.

Contient cette citation