next up previous
Next: Characterizing staticness in the Up: Models of static behavioral Previous: Compile time MOPs and

Partial evaluation based models

Another approach that has been suggested to implement behavioral reflection efficiently is partial evaluation based systems. Partial evaluation is a technique for automatic program specialization that has been developed essentially around the implementation of the first two Futamura projections [JGS93]:



 target  =  [[pe]] int p
compiler  =  [[pe]] pe int



The first projection says that partially evaluating an interpreter with respect to a known program ``compiles'' the program by removing the level of interpretation. The second says that partially evaluating the partial evaluator itself with respect to a specific interpreter yields a ``compiler''. In the reflection perspective, partial evaluation can provide the effect of compilation when the interpreter and the method are known. If only the interpreter is known, applying the second projection yields in theory a compiler that could be applied at run-time to compile methods. Explored by Danvy [Dan88], the link between partial evaluation and reflection has been exploited by a few researchers with more or less success (see §5.4).



Matt Hurlbut
1998-07-02