Skip to main content

Dynamic Partial Evaluation

  • Conference paper
  • First Online:
Programs as Data Objects (PADO 2001)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2053))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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.

    Google Scholar 

  2. 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.

    Chapter  Google Scholar 

  3. 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.

    Google Scholar 

  4. 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.

    Google Scholar 

  5. 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.

    Google Scholar 

  6. 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.

    Chapter  Google Scholar 

  7. James Gosling, Bill Joy, Guy Steele, and Gilad Bracha. The Java Language Specification Second Edition. The Java Series. Addison-Wesley, Boston, Mass., 2000.

    Google Scholar 

  8. 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).

    Google Scholar 

  9. G. Kiczales, J. des Rivières, and D.G. Bobrow. The Art of the Meta-Object Protocol. MIT Press, Cambridge (MA), USA, 1991.

    Google Scholar 

  10. 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.

    Chapter  Google Scholar 

  11. 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.

    Google Scholar 

  12. 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.

    Chapter  Google Scholar 

  13. [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.

  14. 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.

    Google Scholar 

  15. Erik Ruf. Topics in online partial evaluation. PhD thesis, Stanford Computer Systems Laboratory, March 1993.

    Google Scholar 

  16. 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.

    Google Scholar 

  17. 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.

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics