Dynamic Partial Evaluation

Dynamic partial evaluation performs partial evaluation as a side effect of evaluation, with no previous static analysis required. A completely dynamic version of partial evaluation is not merely of theoretical interest, but has practical applications, especially when applied to dynamic, reflective programming languages. Computational reflection, and in particular the use of meta-object protocols (MOPs), provides a powerful abstraction mechanism, providing programmatic ``hooks'' into the interpreter semantics of the host programming language. Unfortunately, a runtime MOP defeats many optimizations based on static analysis (for example, the applicable methods at a call site may change over time, even for the same types of arguments). Dynamic partial evaluation allows us to apply partial evaluation techniques even in the context of a meta-object protocol. We have implemented dynamic partial evaluation as part of a Dynamic Virtual Machine intended to host dynamic, reflective object-oriented languages. In this paper, we present an implementation of dynamic partial evaluation for a simple language -- a lambda calculus extended with dynamic typing, subtyping, generic functions and multimethod dispatch.

Here's a paper, submitted to PADO2, that describes dynamic partial evaluation. (postscript, US letter size).

Here are some MS Powerpoint slides for a short 30-minute presentation to NEPLS on December 7, 2000. A Powerpoint viewer (for MS Windows) can be found here, with installation instructions here. A web version of the talk, which as far as I can tell is viewable only under Internet Explorer (surprise!), is available here.

Greg Sullivan gregs@ai.mit.edu
Artificial Intelligence Laboratory
Massachusetts Institute of Technology
545 Technology Square NE43-802
Cambridge, MA 02139
(617)253-5807 (voice, office)