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
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
L.O. Andersen. Binding-time analysis and the taming of C pointers. In PEPM’93 [22], pages 47–58.
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.
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.
A. Bondorf. Self-Applicable Partial Evaluation. PhD thesis, DIKU, University of Copenhagen, Denmark, 1990. Revised version: DIKU Report 90/17.
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.
C. Consel. A tour of Schism: a partial evaluation system for higher-order applicative languages. In PEPM’93 [22], pages 66–77.
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.
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.
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.
E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1994.
J. Gosling, B. Joy, and G. Steele. The Java Language Specification. Addison-Wesley, 1996.
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.
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.
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.
N.D. Jones, C. Gomard, and P. Sestoft. Partial Evaluation and Automatic Program Generation. International Series in Computer Science. Prentice-Hall, June 1993.
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.
J.W. Lloyd and J.C. Shepherdson. Partial evaluation in logic programming. Journal of Logic Programming, 11:217–242, 1991.
M. Marquard and B. Steensgaard. Partial evaluation of an object-oriented imperative language. Master’s thesis, University of Copenhagen, April 1992.
OOPSLA’97 Conference Proceedings, Atlanta, GA, USA, October 1997. ACM Press.
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.
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.
Partial Evaluation and Semantics-Based Program Manipulation (PEPM’93), Copenhagen, Denmark, June 1993. ACM Press.
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.
U.P. Schultz. Object-Oriented Software Engineering Using Partial Evaluation. PhD thesis, University of Rennes I, December 2000.
U.P. Schultz and C. Consel. Automatic program specialization for Java. DAIMI Technical Report PB-551, DAIMI, University of Aarhus, December 2000.
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.
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.
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.
E.N. Volanschi, C. Consel, G. Muller, and C. Cowan. Declarative specialization of object-oriented programs. In OOPSLA’97 [19], pages 286–300.
AspectJ home page, 2000. Accessible as http://aspectj.org. Xerox Corp.
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
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