Skip to main content

Partial Evaluation for Class-Based Object-Oriented Languages

  • Conference paper
  • First Online:

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

Abstract

Object-oriented programming facilitates the development of generic software, but at a significant cost in terms of performance. We apply partial evaluation to object-oriented programs, to automatically map generic software into specific implementations. In this paper we give a concise, formal description of a simple partial evaluator for a minimal object-oriented language, and give directions for extending this partial evaluator to handle realistic programs.

Based on workdo ne in the Compose Group at IRISA/INRIA, Rennes, France; supported in part by Bull.

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

Buying options

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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. L.O. Andersen. Binding-time analysis and the taming of C pointers. In PEPM’93 [22], pages 47–58.

    Google Scholar 

  2. L.O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, Computer Science Department, University of Copenhagen, May 1994. DIKU Technical Report 94/19.

    Google Scholar 

  3. R. Baier, R. Glück, and R. Zöchling. Partial evaluation of numerical programs in Fortran. In ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM’94), pages 119–132, Orlando, FL, USA, June 1994. Technical Report 94/9, University of Melbourne, Australia.

    Google Scholar 

  4. A. Bondorf. Self-Applicable Partial Evaluation. PhD thesis, DIKU, University of Copenhagen, Denmark, 1990. Revised version: DIKU Report 90/17.

    Google Scholar 

  5. C. Chambers and D. Ungar. Customization: Optimizing compiler technology for SELF, A dynamically-typed object-oriented programming language. In Bruce Knobe, editor, Proceedings of the SIGPLAN’ 89 Conference on Programming Language Design and Implementation (PLDI’ 89), pages 146–160, Portland, OR, USA, June 1989. ACM Press.

    Chapter  Google Scholar 

  6. C. Consel. A tour of Schism: a partial evaluation system for higher-order applicative languages. In PEPM’93 [22], pages 66–77.

    Google Scholar 

  7. C. Consel, L. Hornof, F. Noël, J. Noyé, and E.N. Volanschi. A uniform approach for compile-time and run-time specialization. In O. Danvy, R. Glück, and P. Thiemann, editors, Partial Evaluation, International Seminar, Dagstuhl Castle, number 1110 in Lecture Notes in Computer Science, pages 54–72, February 1996.

    Google Scholar 

  8. J. Dean, C. Chambers, and D. Grove. Selective specialization for object-oriented languages. In Proceedings of the ACM SIGPLAN’ 95 Conference on Programming Language Design and Implementation (PLDI’95), pages 93–102. ACM SIGPLAN Notices, 30(6), June 1995.

    Article  Google Scholar 

  9. N. Fujinami. Determination of dynamic method dispatches using run-time code generation. In X. Leroy and A. Ohori, editors, Proceedings of the Second International Workshop on Types in Compilation (TIC’98), volume 1473 of Lecture Notes in Computer Science, pages 253–271, Kyoto, Japan, March 1998.

    Google Scholar 

  10. E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1994.

    Google Scholar 

  11. J. Gosling, B. Joy, and G. Steele. The Java Language Specification. Addison-Wesley, 1996.

    Google Scholar 

  12. M. Hind, M. Burke, P. Carini, and J. Choi. Interprocedural pointer alias analysis. ACM Transactions on Programming Languages and Systems, 21(4):848–894, July 1999.

    Article  Google Scholar 

  13. L. Hornof, J. Noyé, and C. Consel. Effective specialization of realistic programs via use sensitivity. In P. Van Hentenryck, editor, Proceedings of the Fourth International Symposium on Static Analysis (SAS’97), volume 1302 of Lecture Notes in Computer Science, pages 293–314, Paris, France, September 1997. Springer-Verlag.

    Google Scholar 

  14. A. Igarashi, B. Pierce, and P. Wadler. Featherweight Java: A minimal core calculus for Java and GJ. In L. Meissner, editor, Proceedings of the 1999 ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages & Applications (OOPSLA’99), volume 34(10) of ACM SIGPLAN Notices, pages 132–146, Denver, Colorado, USA, November 1999. ACM Press.

    Google Scholar 

  15. N.D. Jones, C. Gomard, and P. Sestoft. Partial Evaluation and Automatic Program Generation. International Series in Computer Science. Prentice-Hall, June 1993.

    MATH  Google Scholar 

  16. G. Kiczales, J. Lamping, A. Mendhekar, C. Maeda, C. Lopes, J. Loingtier, and J. Irwin. Aspect-oriented programming. In M. Aksit and S. Matsuoka, editors, Proceedings of the European Conference on Object-oriented Programming (ECOOP’97), volume 1241 of Lecture Notes in Computer Science, pages 220–242, Jyväskylä, Finland, June 1997. Springer.

    Google Scholar 

  17. J.W. Lloyd and J.C. Shepherdson. Partial evaluation in logic programming. Journal of Logic Programming, 11:217–242, 1991.

    Article  MATH  MathSciNet  Google Scholar 

  18. M. Marquard and B. Steensgaard. Partial evaluation of an object-oriented imperative language. Master’s thesis, University of Copenhagen, April 1992.

    Google Scholar 

  19. OOPSLA’97 Conference Proceedings, Atlanta, GA, USA, October 1997. ACM Press.

    Google Scholar 

  20. N. Oxhøj, J. Palsberg, and M. Schwartzbach. Making type inference practical. In O.L. Madsen, editor, Proceedings of the European Conference on Object-Oriented Programming (ECOOP’92), volume 615 of Lecture Notes in Computer Science, pages 329–349, Utrecht, The Netherlands, 1992. Springer-Verlag.

    Chapter  Google Scholar 

  21. J. Palsberg and M. Schwartzbach. Object-oriented type inference. In N. Meyrowitz, editor, OOPSLA’91 Conference Proceedings, volume 26(11), pages 146–161. ACM Press, November 1991.

    Google Scholar 

  22. Partial Evaluation and Semantics-Based Program Manipulation (PEPM’93), Copenhagen, Denmark, June 1993. ACM Press.

    Google Scholar 

  23. J. Plevyak and A.A. Chien. Precise concrete type inference for object-oriented languages. In OOPSLA’ 94 Conference Proceedings, volume 29:10 of SIGPLAN Notices, pages 324–324. ACM Press, October 1994.

    Article  Google Scholar 

  24. U.P. Schultz. Object-Oriented Software Engineering Using Partial Evaluation. PhD thesis, University of Rennes I, December 2000.

    Google Scholar 

  25. U.P. Schultz and C. Consel. Automatic program specialization for Java. DAIMI Technical Report PB-551, DAIMI, University of Aarhus, December 2000.

    Google Scholar 

  26. U.P. Schultz, J. Lawall, C. Consel, and G. Muller. Towards automatic specialization of Java programs. In Proceedings of the European Conference on Object-oriented Programming (ECOOP’99), volume 1628 of Lecture Notes in Computer Science, pages 367–390, Lisbon, Portugal, June 1999.

    Google Scholar 

  27. U.P. Schultz, J.L. Lawall, C. Consel, and G. Muller. Specialization patterns. In Proceedings of the 15th IEEE International Conference on Automated Software Engineering (ASE 2000), pages 197–206, Grenoble, France, September 2000. IEEE Computer Society Press.

    Google Scholar 

  28. T.L. Veldhuizen. C++ templates as partial evaluation. In ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM’98), pages 13–18, San Antonio, TX, USA, January 1999. ACM Press.

    Google Scholar 

  29. E.N. Volanschi, C. Consel, G. Muller, and C. Cowan. Declarative specialization of object-oriented programs. In OOPSLA’97 [19], pages 286–300.

    Google Scholar 

  30. AspectJ home page, 2000. Accessible as http://aspectj.org. Xerox Corp.

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

Schultz, U.P. (2001). Partial Evaluation for Class-Based Object-Oriented Languages. 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_11

Download citation

  • DOI: https://doi.org/10.1007/3-540-44978-7_11

  • 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