Siskind, Jeffrey Mark and Pearlmutter, Barak A. (2007) First-Class Nonstandard Interpretations by Opening Closures. Proceedings of the 34th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages. pp. 71-76.
PDF
BP_popl2007-map-closure.pdf
Download (89kB)
BP_popl2007-map-closure.pdf
Download (89kB)
Abstract
We motivate and discuss a novel functional programming construct
that allows convenient modular run-time nonstandard interpretation
via reflection on closure environments. This map-closure construct
encompasses both the ability to examine the contents of a
closure environment and to construct a new closure with a modified
environment. From the user’s perspective, map-closure is a
powerful and useful construct that supports such tasks as tracing,
security logging, sandboxing, error checking, profiling, code instrumentation
and metering, run-time code patching, and resource
monitoring. From the implementor’s perspective, map-closure
is analogous to call/cc. Just as call/cc is a non-referentiallytransparent
mechanism that reifies the continuations that are only
implicit in programs written in direct style, map-closure is a nonreferentially-
transparent mechanism that reifies the closure environments
that are only implicit in higher-order programs. Just as
CPS conversion is a non-local but purely syntactic transformation
that can eliminate references to call/cc, closure conversion
is a non-local but purely syntactic transformation that can eliminate
references to map-closure. We show how the combination
of map-closure and call/cc can be used to implement set! as
a procedure definition and a local macro transformation.
Item Type: | Article |
---|---|
Keywords: | Referential transparency; Lambda lifting; Design languages; |
Academic Unit: | Faculty of Science and Engineering > Computer Science Faculty of Science and Engineering > Research Institutes > Hamilton Institute |
Item ID: | 2051 |
Depositing User: | Barak Pearlmutter |
Date Deposited: | 14 Jul 2010 15:45 |
Journal or Publication Title: | Proceedings of the 34th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages |
Publisher: | Association for Computing Machinery (ACM) |
Refereed: | No |
Related URLs: | |
URI: | https://mu.eprints-hosting.org/id/eprint/2051 |
Use Licence: | This item is available under a Creative Commons Attribution Non Commercial Share Alike Licence (CC BY-NC-SA). Details of this licence are available here |
Repository Staff Only (login required)
Downloads
Downloads per month over past year