Defunctionalization is generally considered a whole-program transformation and thus incompatible with separate compilation. In this paper, we formalize a modular variant of defunctionalization which can support separate compilation. Our technique allows modules in a Haskell-like language to be separately defunctionalized and compiled, then linked together to generate an executable program. We provide a prototype implementation of our modular defunctionalization technique and we discuss the experiences of its application in a compiler from a large subset of Haskell to low-level C code, based on the intensional transformation.
@InProceedings{fourtounis_et_al:OASIcs.SLATE.2013.39, author = {Fourtounis, Georgios and Papaspyrou, Nikolaos S.}, title = {{Supporting Separate Compilation in a Defunctionalizing Compiler}}, booktitle = {2nd Symposium on Languages, Applications and Technologies}, pages = {39--49}, series = {Open Access Series in Informatics (OASIcs)}, ISBN = {978-3-939897-52-1}, ISSN = {2190-6807}, year = {2013}, volume = {29}, editor = {Leal, Jos\'{e} Paulo and Rocha, Ricardo and Sim\~{o}es, Alberto}, publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik}, address = {Dagstuhl, Germany}, URL = {https://drops.dagstuhl.de/entities/document/10.4230/OASIcs.SLATE.2013.39}, URN = {urn:nbn:de:0030-drops-40294}, doi = {10.4230/OASIcs.SLATE.2013.39}, annote = {Keywords: Defunctionalization, functional programming, modules, separate compilation} }
Feedback for Dagstuhl Publishing