摘要 |
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).
|