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 multiple dispatch.

[1]  Martin Odersky,et al.  A Statically Safe Alternative to Virtual Types , 1998, ECOOP.

[2]  Erik Ruf Topics in online partial evaluation , 1993 .

[3]  Akinori Yonezawa,et al.  Design and Partial Evaluation of Meta-Objects for a Concurrent Reflective Language , 1998, ECOOP.

[4]  Charles Consel,et al.  A general approach for run-time specialization and its application to C , 1996, POPL '96.

[5]  Craig S. Kaplan,et al.  Predicate Dispatching: A Unified Theory of Dispatch , 1998, ECOOP.

[6]  Crispin Cowan,et al.  Declarative specialization of object-oriented programs , 1997, OOPSLA '97.

[7]  Craig Chambers,et al.  Efficient multiple and predicated dispatching , 1999, OOPSLA '99.

[8]  Guy L. Steele,et al.  Java Language Specification, Second Edition: The Java Series , 2000 .

[9]  Daniel G. Bobrow,et al.  Book review: The Art of the MetaObject Protocol By Gregor Kiczales, Jim des Rivieres, Daniel G. and Bobrow(MIT Press, 1991) , 1991, SGAR.

[10]  Calton Pu,et al.  The Synthesis Kernel , 1988, Comput. Syst..

[11]  Ulrik Pagh Schultz,et al.  Towards Automatic Specialization of Java Programs , 1999, ECOOP.

[12]  Pattie Maes Concepts and experiments in computational reflection , 1987, OOPSLA 1987.

[13]  Satoshi Matsuoka,et al.  Compiling away the meta-level in object-oriented concurrent reflective languages using partial evaluation , 1995, OOPSLA.

[14]  Calton Pu,et al.  Optimistic incremental specialization: streamlining a commercial operating system , 1995, SOSP.

[15]  Peter Sestoft,et al.  Partial evaluation and automatic program generation , 1993, Prentice Hall international series in computer science.

[16]  Craig Chambers,et al.  The design and implementation of the self compiler, an optimizing compiler for object-oriented programming languages , 1992 .

[17]  David Grove,et al.  Selective specialization for object-oriented languages , 1995, PLDI '95.