Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Mathias Braux and Jacques Noyé. Towards partially evaluating reflection in java. In Proceedings of the 2000 ACM SIGPLAN Workshop on Evaluation and Semantics-Based Program Manipulation (PEPM-00), pages 2–11, N.Y., January 22–23 2000. ACM Press.
Craig Chambers and Weimin Chen. Efficient multiple and predicate dispatching. In Loren Meissner, editor, Proceeings of the 1999 ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages & Applications (OOPSLA’99), volume 34.10 of ACM Sigplan Notices, pages 238–255, N.Y., November 1–5 1999. ACM Press.
Craig Chambers. The Design and Implementation of the Self Compiler, an Optimizing Compiler for Object-Oriented Programming Languages. Ph D thesis, Computer Science Department, Stanford University, March 1992.
Charles Consel and François Noël. A general approach for run-time specialization and its application to C. In ACM, editor, Conference record of POPL’ 96, 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages: papers presented at the Symposium: St. Petersburg Beach, Florida, 21–24 January 1996, pages 145–156, New York, NY, USA, 1996. ACM Press.
Jeffrey Dean, Craig Chambers, and David Grove. Selective specialization for object-oriented languages. In Proceedings of the ACM SIGPLAN’95 Conference on Programming Language Design and Implementation (PLDI), pages 93–102, La Jolla, California, 18–21 June 1995. SIGPLAN Notices 30(6), June 1995.
Michael Ernst, Craig Kaplan, and Craig Chambers. Predicate dispatching: A unified theory of dispatch. In Eric Jul, editor, ECOOP’ 98—Object-Oriented Programming, volume 1445 of Lecture Notes in Computer Science, pages 186–211. Springer, 1998.
James Gosling, Bill Joy, Guy Steele, and Gilad Bracha. The Java Language Specification Second Edition. The Java Series. Addison-Wesley, Boston, Mass., 2000.
Neil D. Jones, Carsten K. Gomard, and Peter Sestoft. Partial Evaluation and Automatic Program Generation. Prentice Hall International, International Series in Computer Science, June 1993. ISBN number 0-13-020249-5 (pbk).
G. Kiczales, J. des Rivières, and D.G. Bobrow. The Art of the Meta-Object Protocol. MIT Press, Cambridge (MA), USA, 1991.
Pattie Maes. Concepts and experiments in computational reflection. In Norman Meyrowitz, editor, Proceedings of the 2nd Annual Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA’ 87), pages 147–155, Orlando, FL, USA, October 1987. ACM Press.
Hidehiko Masuhara, Satoshi Matsuoka, Kenichi Asai, and Akinori Yonezawa. Compiling away the meta-level in object-oriented concurrent reflective languages using partial evaluation. In OOPSLA’ 95 Conference Proceedings: Object-Oriented Programming Systems, Languages, and Applications, pages 300–315. ACM Press, 1995.
Hidehiko Masuhara and Akinori Yonezawa. Design and partial evaluation of meta-objects for a concurrent reflective language. In Eric Jul, editor, ECOOP’ 98—Object-Oriented Programming, volume 1445 of Lecture Notes in Computer Science, pages 418–439. Springer, 1998.
[PAB+95]_Calton Pu, Tito Autrey, Andrew Black, Charles Consel, Crispin Cowan, Jon Inouye, Lakshmi Kethana, Jonathan Walpole, and Ke Zhang. Optimistic incremental specialization: Streamlining a commercial operating system. In Proc. 15th ACM Symposium on Operating Systems Principles, Copper Mountain CO (USA), December 1995. http://www.irisa.fr/EXTERNE/projet/lande/consel/papers/spec-sosp.ps.gz.
Calton Pu, Henry Massalin, and John Ioannidis. The synthesis kernel. In USENIX Association, editor, Computing Systems, Winter, 1988., volume 1, pages 11–32, Berkeley, CA, USA, Winter 1988. USENIX.
Erik Ruf. Topics in online partial evaluation. PhD thesis, Stanford Computer Systems Laboratory, March 1993.
U.P. Schultz, J. L. Lawall, C. Consel, and G. Muller. Towards automatic specialization of Java programs. Lecture Notes in Computer Science, 1628:367–--, 1999.
Eugen N. Volanschi, Charles Consel, and Crispin Cowan. Declarative specialization of object-oriented programs. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA-97), volume 32, 10 of ACM SIGPLAN Notices, pages 286–300, New York, October 5–9 1997. ACM Press.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Sullivan, G.T. (2001). Dynamic Partial Evaluation. In: Danvy, O., Filinski, A. (eds) Programs as Data Objects. PADO 2001. Lecture Notes in Computer Science, vol 2053. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44978-7_14
Download citation
DOI: https://doi.org/10.1007/3-540-44978-7_14
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-42068-2
Online ISBN: 978-3-540-44978-2
eBook Packages: Springer Book Archive