MAP-CLOSURE: A GENERAL PURPOSE MECHANISM FOR NONSTANDARD INTERPRETATION
First Claim
1. A computing system, comprising a processor and a memory in communication with the processor, the memory storing programming instructions executable by the processor to,from outside the body of a first closure having one or more entries that map one or more free variables to their respective bindings, access the content of the first closure and make a second closure, the making comprising:
- copying the body of the first closure, andmodifying values to which free variables of the second closure are bound relative to the free variables of the first closure;
wherein the making process preserves the identities of the free variables through the modifying step.
3 Assignments
0 Petitions
Accused Products
Abstract
The disclosed system provides a functional programming construct that allows convenient modular run-time nonstandard interpretation via reflection on closure environments. This construct encompasses both the ability to examine the contents of a closure environment and to construct a new closure with a modified environment. Examples of this powerful and useful construct support such tasks as tracing, security logging, sandboxing, error checking, profiling, code instrumentation and metering, run-time code patching, and resource monitoring. It is a non-referentially-transparent mechanism that reifies the closure environments that are only implicit in higher-order programs. A further example provides a novel functional-programming language that supports forward automatic differentiation (AD).
-
Citations
23 Claims
-
1. A computing system, comprising a processor and a memory in communication with the processor, the memory storing programming instructions executable by the processor to,
from outside the body of a first closure having one or more entries that map one or more free variables to their respective bindings, access the content of the first closure and make a second closure, the making comprising: -
copying the body of the first closure, and modifying values to which free variables of the second closure are bound relative to the free variables of the first closure; wherein the making process preserves the identities of the free variables through the modifying step. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21)
-
- 22. A system, comprising a processor and a memory in communication with the processor, the memory storing instructions executable by the processor to implement an API for programmatically applying nonstandard interpretation to a given program.
Specification