Abstract
The object-oriented style of programming facilitates program adaptation and enhances program genericness, but at the expense of efficiency. Automatic program specialization can be used to generate specialized, efficient implementations for specific scenarios, but requires the program to be structured appropriately for specialization and is yet another new concept for the programmer to understand and apply. We have unified automatic program specialization and inheritance into a single concept, and implemented this approach in a modified version of Java named JUST. When programming in JUST, inheritance is used to control the automatic application of program specialization to class members during compilation to obtain an efficient implementation.
This paper presents the language JUST, which integrates object-oriented concepts, block structure, and techniques from automatic program specialization to provide both a generative programming language where object-oriented designs can be efficiently implemented and a simple yet powerful automatic program specializer for an object-oriented language.
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
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
Affeldt, R., Masuhara, H., Sumii, E., Yonezawa, A.: Supporting objects in runtime bytecode specialization. In: Proceedings of the ASIAN symposium on Partial evaluation and semantics-based program manipulation, pp. 50–60. ACM Press, New York (2002)
Andersen, H.M., Schultz, U.P.: Declarative specialization for object-orientedprogram specialization. In: ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM 2004), ACM Press, New York (2004) (to appear)
Andersen, L.O.: Program Analysis and Specialization for the C Programming Language. PhD thesis, Computer Science Department, University of Copenhagen, DIKU Technical Report 94/19 (May 1994)
Bracha, G., Odersky, M., Stoutamire, D., Wadler, P.: Making the future safe for the past: adding genericity to the java programming language. In: Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pp. 183–200. ACM Press, New York (1998)
Braux, M., Noyé, J.: Towards partially evaluating reflection in Java. In: ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM 2000), Boston, MA, USA, January 2000, ACM Press, New York (2000)
Cardelli, L.: Structural subtyping and the notion of power type. In: Conference Record of the Fifteenth Annual ACM Symposium on Principles of Programming Languages, San Diego, California, pp. 70–79 (1988)
Chambers, C., Ungar, D.: Customization: Optimizing compiler technology for SELF, A dynamically-typed object-oriented programming language. In: Knobe, B. (ed.) Proceedings of the SIGPLAN 1989 Conference on Programming Language Design and Implementation (PLDI 1989), Portland, OR, USA, June 1989, pp. 146–160. ACM Press, New York (1989)
Chepovsky, A.M., Klimov, A.V., Klimov, A.V., Klimov, Y.A., Mishchenko, A.S., Romanenko, S.A., Skorobogatov, S.Y.: Partial evaluation for common intermediate language. In: Broy, M., Zamulin, A.V. (eds.) PSI 2003. LNCS, vol. 2890, pp. 171–177. Springer, Heidelberg (2004)
Consel, C., Hornof, L., Noël, F., Noyé, J., Volanschi, E.N.: A uniform approach for compile-time and run-time specialization. In: Danvy et al: [11], pp. 54–72
Czarnecki, K., Eisenecker, U.W.: Generative Programming: Methods, Tools, and Applications. Addison-Wesley, Reading (2000)
Danvy, O., Thiemann, P., Glück, R. (eds.): Dagstuhl Seminar 1996. LNCS, vol. 1110. Springer, Heidelberg (1996)
Dean, J., Chambers, C., Grove, D.: Selective specialization for object-oriented languages. In: Proceedings of the ACM SIGPLAN 1995 Conference on Programming Language Design and Implementation (PLDI 1995), La Jolla, CA USA, June 1995. ACM SIGPLAN Notices, vol. 30(6), pp. 93–102. ACM Press, New York (1995)
Dussart, D., Hughes, J., Thiemann, P.: Type specialisation for imperative languages. In: Proceedings of the second ACM SIGPLAN international conference on Functional programming, pp. 204–216. ACM Press, New York (1997)
Ernst, E.: Propagating class and method combination. In: [17], Guerraoui, pp. 67–91
Fujinami, N.: Determination of dynamic method dispatches using run-time code generation. In: Leroy, X., Ohori, A. (eds.) TIC 1998. LNCS, vol. 1473, pp. 253–271. Springer, Heidelberg (1998)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1994)
Guerraoui, R. (ed.): Proceedings of the European Conference on Object-oriented Programming (ECOOP 1999), Lisbon, Portugal, June 1999. LNCS, vol. 1628. Springer, Heidelberg (1999)
Hughes, J.: Type specialisation for the λ-calculus or a new paradigm for partial evaluation based on type inference. In: Danvy et al.: [11], pp. 183–215
Hutchins, D.: The power of symmetry: unifying inheritance and generative programming. In: Companion of the 18th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pp. 38–52. ACM Press, New York (2003)
Igarashi, A., Viroli, M.: On variance-based subtyping for parametric types. In: Magnusson, B. (ed.) ECOOP 2002. LNCS, vol. 2374, pp. 441–469. Springer, Heidelberg (2002)
Jones, N.D., Gomard, C., Sestoft, P.: Partial Evaluation and Automatic Program Generation, June 1993. International Series in Computer Science. Prentice-Hall, Englewood Cliffs (1993)
Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C.V., Loingtier, J.-M., Irwin, J.: Aspect-oriented programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)
Luján, M.: Object oriented linear algebra. Master’s thesis, University of Manchester (December 1999)
Luján, M., Freeman, T.L., Gurd, J.R.: OoLaLa: an object oriented analysis and design of numerical linear algebra. In: Rosson, M.B., Lea, D. (eds.) OOPSLA 2000 Conference Proceedings, ACM SIGPLAN Notices, Minneapolis, MN USA, October 2000, pp. 229–252. ACM Press, Minneapolis (2000)
Madsen, O.L.: Open issues in object-oriented programming – a scandinavian perspective. SOFTWARE. Practice and Experience 25(4) (December 1995)
Madsen, O.L., Møller-Pedersen, B., Nygaard, K.: Object-oriented programming in the Beta programming language. Addison-Wesley, Reading (1993)
Madsen, O.L., Pedersen, B.M.: Virtual classes: a powerful mechanism in objectoriented programming. In: Conference proceedings on Object-oriented programming systems, languages and applications (OOPSLA 1989), New Orleans, Louisiana, United States. SIGPLAN Notices, vol. 24(10), pp. 397–406. ACM Press, New Orleans (1989)
Meyer, B.: Eiffel: The language. Object-Oriented Series. Prentice Hall, New York (1992)
Schultz, U.P.: Object-Oriented Software Engineering Using Partial Evaluation. PhD thesis, University of Rennes I, Rennes, France (December 2000)
Schultz, U.P.: Partial evaluation for class-based object-oriented languages. In: Danvy, O., Filinski, A. (eds.) PADO 2001. LNCS, vol. 2053, pp. 173–197. Springer, Heidelberg (2001)
Schultz, U.P., Lawall, J., Consel, C., Muller, G.: Towards automatic specialization of Java programs. In: Guerraoui [17], pp. 367–390
Schultz, U.P., Lawall, J.L., Consel, C.: Automatic program specialization for Java. TOPLAS 25, 452–499 (2003)
Thibault, S., Consel, C., Marlet, R., Muller, G., Lawall, J.: Static and dynamic program compilation by interpreter specialization. Higher-Order and Symbolic Computation (HOSC) 13(3), 161–178 (2000)
Thorup, K.K., Torgersen, M.: Unifying genericity – combining the benefits of virtual types and parameterized classes. In: Guerraoui [17]
Torgersen, M.: Virtual types are statically safe. In: 5th Workshop on Foundations of Object-Oriented Languages (January 1998)
Torgersen, M., Hansen, C.P., Ernst, E., von der Ahé, P., Bracha, G., Gafter, N.: Adding wildcards to the Java programming language. In: Proceedings of the 2004 ACM symposium on Applied computing, pp. 1289–1296. ACM Press, New York (2004)
Veldhuizen, T.L.: C++ templates as partial evaluation. In: ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM 1998), San Antonio, TX, USA, January 1999, pp. 13–18. ACM Press, San Antonio (1998)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Schultz, U.P. (2004). A Unification of Inheritance and Automatic Program Specialization. In: Karsai, G., Visser, E. (eds) Generative Programming and Component Engineering. GPCE 2004. Lecture Notes in Computer Science, vol 3286. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30175-2_13
Download citation
DOI: https://doi.org/10.1007/978-3-540-30175-2_13
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-23580-4
Online ISBN: 978-3-540-30175-2
eBook Packages: Springer Book Archive