Back to Search Start Over

Typed Closure Conversion

Authors :
Minamide, Yasuhiko
Morrisett, Greg Gregory
Harper, Robert
Source :
Minamide, Yasuhiko, Greg Morrisett, and Robert Harper. 1996. Typed closure conversion. In Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (St. Petersburg Beach, Florida, United States, January 21-24, 1996): POPL '96, 271-283. New York: ACM.
Publication Year :
1996
Publisher :
Association for Computing Machinery, 1996.

Abstract

Closure conversion is a program transformation used by compilers to separate code from data. Previous accounts of closure conversion use only untyped target languages. Recent studies show that translating to typed target languages is a useful methodology for building compilers, because a compiler can use the types to implement efficient data representations, calling conventions, and tag-free garbage collection. Furthermore, type-based translations facilitate security and debugging through automatic type checking, as well as correctness arguments through the method of logical relations. We present closure conversion as a type-directed, and type preserving translation for both the simply-typed and the polymorphic λ--calculus. Our translations are based on a simple "closures as objects" principle: higher-order functions are viewed as objects consisting of a single method (the code) and a single instance variable (the environment). In the simply-typed case, the Pierce-Turner model of object typing where objects are packages of existential type suffices. In the polymorphic case, more careful tracking of type sharing is required. We exploit a variant of the Harper-Lillibridge "translucent type" formalism to characterize the types of polymorphic closures.<br />Engineering and Applied Sciences<br />Author's Original

Details

Language :
English
ISBN :
978-0-89791-769-8
0-89791-769-3
ISBNs :
9780897917698 and 0897917693
Database :
Digital Access to Scholarship at Harvard (DASH)
Journal :
Minamide, Yasuhiko, Greg Morrisett, and Robert Harper. 1996. Typed closure conversion. In Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (St. Petersburg Beach, Florida, United States, January 21-24, 1996): POPL '96, 271-283. New York: ACM.
Publication Type :
Conference
Accession number :
edshld.1.3710800
Document Type :
Conference Paper
Full Text :
https://doi.org/10.1145/237721.237791