Dynamic compilation of a reflective language using run-time specialization

In reflective languages, application programs can customize a language system that executes the application programs. Our premise is that this customizability of reflective languages can be a basic mechanism of software evolution. We present a simple architecture of a reflective language that can dynamically select meta-interpreters, and a dynamic compilation scheme by using run-time specialization (RTS) techniques, which could also be useful to dynamically optimize systems with mechanisms of dynamic software evolution. Our prototype system showed that dynamically compiled reflective programs run more than four times faster than the interpreted ones, and that compilation processes are fast enough to be invoked at runtime. Compared to statically compiled programs, however, dynamically compiled ones yet have 20-30% overheads. We also discuss this problem.

[1]  Pattie Maes,et al.  Concepts and experiments in computational reflection , 1987, OOPSLA '87.

[2]  Akinori Yonezawa,et al.  Duplication and Partial Evaluation For a Better Understanding of Reflective Languages , 1996, LISP Symb. Comput..

[3]  Akinori Yonezawa,et al.  Reflection in an object-oriented concurrent language , 1988, OOPSLA '88.

[4]  米沢 明憲 ABCL : an object-oriented concurrent system , 1990 .

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

[6]  Hidehiko Masuhara,et al.  Generating Optimized Residual Code in Run-Time Specialization , 1999 .

[7]  Mitchell Wand,et al.  The mystery of the tower revealed: A nonreflective description of the reflective tower , 1988, LISP Symb. Comput..

[8]  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.

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

[10]  Brian Cantwell Smith,et al.  Reflection and semantics in LISP , 1984, POPL.

[11]  Peter Lee,et al.  Lightweight Run-Time Code Generation , 1994, PEPM.

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

[13]  Mitchell Wand,et al.  The mystery of the tower revealed: a non-reflective description of the reflective tower , 1986, LFP '86.

[14]  Yoshihiko Futamura,et al.  Partial Evaluation of Computation Process--An Approach to a Compiler-Compiler , 1999, High. Order Symb. Comput..

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

[16]  Yutaka Ishikawa,et al.  Object Location Control Using Meta-level Programming , 1994, ECOOP.

[17]  Markus Mock,et al.  Annotation-Directed Run-Time Specialization in C , 1997, PEPM.

[18]  Shigeru Chiba,et al.  A metaobject protocol for C++ , 1995, OOPSLA.

[19]  Julia L. Lawall,et al.  Automatic, template-based run-time specialization: implementation and experimental study , 1998, Proceedings of the 1998 International Conference on Computer Languages (Cat. No.98CB36225).

[20]  Mitsuhisa Sato,et al.  Design and Implementation of Metalevel Architecture in C++ -- MPC++ Approach -- , 1998 .