Skip to main content

Towards Automatic Specialization of Java Programs

  • Conference paper
  • First Online:
ECOOP’ 99 — Object-Oriented Programming (ECOOP 1999)

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

Included in the following conference series:

Abstract

Automatic program specialization can derive effcient implementations from generic components, thus reconciling the often opposing goals of genericity and efficiency. This technique has proved useful within the domains of imperative, functional, and logical languages, but so far has not been explored within the domain of object-oriented languages. We present experiments in the specialization of Java programs. We demonstrate how to construct a program specializer for Java programs from an existing specializer for C programs and a Java-to-C compiler. Specialization is managed using a declarative approach that abstracts over the optimization process and masks implementation details. Our experiments show that program specialization provides a four-time speedup of an image-filtering program. Based on these experiments, we identify optimizations of object-oriented programs that can be carried out by automatic program specialization. We argue that program specialization is useful in the field of software components, allowing a generic component to be specialized to a specific configuration.

Supported in part by BULL, and in part by Alcatel under the Reutel 2000 contract.

★★

Supported in part by an H.H. Powers grant from Oberlin College, and by NSF grant EIA-9806718. Author’s current address: Department of Computer Science, Brandeis University, Waltham, MA 02254. e-mail: jll@cs.brandeis.edu

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

  2. J. Auslander, M. Philipose, C. Chambers, S.J. Eggers, and B.N. Bershad. Fast, effective dynamic compilation. In PLDI’96, 31(5), pages 149–159.

    Google Scholar 

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

    Google Scholar 

  4. A.A. Berlin. Partial evaluation applied to numerical computation. In ACM Conference on Lisp and Functional Programming, pages 139–150, Nice, France, 1990. ACM Press.

    Google Scholar 

  5. B.N. Bershad, T.E. Anderson, E.D. Lazowska, and H.M. Levy. Lightweight remote procedure call. ACM Transactions on Computer Systems, 8(1):37–55, February 1990.

    Article  Google Scholar 

  6. W.H. Cheung and A. Loong. Exploring issues of operating systems structuring: from microkernel to extensible systems. ACM Operating Systems Reviews, 29(4):4–16, October 1995.

    Article  Google Scholar 

  7. C. Consel. A tour of Schism: a partial evaluation system for higher-order applicative languages. In Partial Evaluation and Semantics-Based Program Manipulation, pages 66–77, Copenhagen, Denmark, June 1993. ACM Press.

    Google Scholar 

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

  9. C. Consel and F. Noël. A general approach for run-time specialization and its application to C. In Conference Record of the 23rd Annual ACM SIGPLAN-SIGACT Symposium on Principles Of Programming Languages, pages 145–156, St. Petersburg Beach, FL, USA, January 1996. ACM Press.

    Google Scholar 

  10. J. Dean, G. DeFouw, D. Grove, V. Litvinov, and C. Chambers. Vortex: an optimizing compiler for object-oriented languages. In OOPSLA’ 96 Conference, pages 93–100, San Jose (CA), October 1996.

    Google Scholar 

  11. J. Dean, D. Grove, and C. Chambers. Optimization of object-oriented programs using static class hierarchy analysis. In Proceedings of ECOOP’ 95, Aarhus, Denmark, August 1995. Springer-Verlag.

    Google Scholar 

  12. J. Dolby and A. A. Chien. An evaluation of automatic object inline allocation techniques. In Proceedings OOPSLA’ 98 Conference on Object-Oriented Programming Systems, Languages, and Applications, ACM SIGPLAN Notices. ACM, 1998.

    Google Scholar 

  13. D.R. Engler and M.F. Kaashoek. DPF: Fast, flexible message demultiplexing using dynamic code generation. In SIGCOMM Symposium on Communications Architectures and Protocols, pages 26–30, Stanford University, CA, August 1996. ACM Press.

    Google Scholar 

  14. E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns. Addison-Wesley, 1994.

    Google Scholar 

  15. B. Guenter, T.B. Knoblock, and E. Ruf. Specializing shaders. In Computer Graphics Proceedings, Annual Conference Series, pages 343–350. ACM Press, 1995.

    Google Scholar 

  16. Urs Hölzle and David Ungar. Optimizing dynamically-dispatched calls with runtime type feedback. In Proceedings of the Conference on Programming Language Design and Implementation, pages 326–336, New York, NY, USA, June 1994. ACM Press.

    Google Scholar 

  17. S. C. Khoo and R. S. Sundaresh. Compiling inheritance using partial evaluation. In Proceedings of the Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 211–222, Yale University, 17–19 June 1991.

    Google Scholar 

  18. P. Kleinrubatscher, A. Kriegshaber, R. Zöchling, and R. Glück. Fortran program specialization. In U. Meyer and G. Snelting, editors, Workshop Semantikgestützte Analyse, Entwicklung und Generierung von Programmen, pages 45–54. Justus-Liebig-Universität, Giessen, Germany, 1994. Report No. 9402.

    Google Scholar 

  19. P. Lee and M. Leone. Optimizing ML with run-time code generation. In PLDI’96, [27], pages 137–148.

    Google Scholar 

  20. B.N. Locanthi. Fast bitblt() with asm() and cpp. In European UNIX Systems User Group Conference Proceedings, pages 243–259, AT&T Bell Laboratories, Murray Hill, September 1987. EUUG.

    Google Scholar 

  21. R. Marlet, S. Thibault, and C. Consel. Mapping software architectures to effcient implementations via partial evaluation. In Conference on Automated Software Engineering, pages 183–192, Lake Tahoe, Nevada, November 1997. IEEE Computer Society.

    Google Scholar 

  22. M. Marquard and B. Steensgaard. Partial evaluation of an object-oriented imperative language. Master’s thesis, Master’s thesis University of Copenhagen, Department of Computer Science, Universitetsparken 1, 2100 Copenhagen O., Denmark, April 1992.

    Google Scholar 

  23. B. Moura. Bridging the Gap between Functional and Imperative Languages. PhD thesis, University of Rennes I, April 1997.

    Google Scholar 

  24. G. Muller, R. Marlet, E.N. Volanschi, C. Consel, C. Pu, and A. Goel. Fast, optimized Sun RPC using automatic program specialization. In Proceedings of the 18th International Conference on Distributed Computing Systems, pages 240–249, Amsterdam, The Netherlands, May 1998. IEEE Computer Society Press.

    Google Scholar 

  25. G. Muller, B. Moura, F. Bellard, and C. Consel. Harissa: A flexible and effcient Java environment mixing bytecode and compiled code. In Proceedings of the 3rd Conference on Object-Oriented Technologies and Systems, pages 1–20, Portland (Oregon), USA, June 1997. Usenix.

    Google Scholar 

  26. G. Muller and U. Schultz. Harissa: A hybrid approach to Java execution. IEEE Software, pages 44–51, March 1999.

    Google Scholar 

  27. Proceedings of the ACM SIGPLAN’ 96 Conference on Programming Language Design and Implementation, Philadelphia, PA, May 1996. ACM SIGPLAN Notices, 31(5).

    Google Scholar 

  28. C. Pu, T. Autrey, A. Black, C. Consel, C. Cowan, J. Inouye, L. Kethana, J. Walpole, and K. Zhang. Optimistic incremental specialization: Streamlining a commercial operating system. In Proceedings of the 1995 ACM Symposium on Operating Systems Principles, pages 314–324, Copper Mountain Resort, CO, USA, December 1995. ACM Operating Systems Reviews, 29(5), ACM Press.

    Article  Google Scholar 

  29. C. Pu, H. Massalin, and J. Ioannidis. The Synthesis kernel. Computing Systems, 1(1):11–32, Winter 1988.

    Google Scholar 

  30. J.C. Russ. The Image Processing Handbook. CRC Press, Inc., second edition, 1995.

    Google Scholar 

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

    Google Scholar 

  32. E.N. Volanschi, C. Consel, G. Muller, and C. Cowan. Declarative specialization of object-oriented programs. In OOPSLA’97 Conference Proceedings, pages 286–300, Atlanta, USA, October 1997. ACM Press.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Springer-VerlagBerlin Heidelberg

About this paper

Cite this paper

Pagh Schultz, U., Lawall, J.L., Consel, C., Muller, G. (1999). Towards Automatic Specialization of Java Programs. In: Guerraoui, R. (eds) ECOOP’ 99 — Object-Oriented Programming. ECOOP 1999. Lecture Notes in Computer Science, vol 1628. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48743-3_17

Download citation

  • DOI: https://doi.org/10.1007/3-540-48743-3_17

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-66156-6

  • Online ISBN: 978-3-540-48743-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics