Skip to main content

Walkabout Revisited: The Runabout

  • Conference paper
ECOOP 2003 – Object-Oriented Programming (ECOOP 2003)

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

Included in the following conference series:

Abstract

We present a variation of the visitor pattern which allows programmers to write visitor-like code in a concise way. The Runabout is a library extension that adds a limited form of multi-dispatch to Java. While the Runabout is not as expressive as a general multiple dispatching facility, the Runabout can be significantly faster than existing implementations of multiple dispatch for Java, such as MultiJava. Unlike MultiJava, the Runabout does not require changes to the syntax and the compiler.

In this paper we illustrate how to use the Runabout, detail its implementation and provide benchmarks comparing its performance with other approaches.

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 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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. Alpern, B., Cocchi, A., Fink, S.J., Grove, D., Lieber, D.: Efficient Implementation of Java Interfaces: Invokeinterface Considered Harmless. In: OOPSLA 2001 Conference on Object-Oriented Programming, Systems, Languages, and Applications, Tampa, Florida, pp. 108–124 (2001)

    Google Scholar 

  2. Bracha, G., Odersky, M., Stoutamire, D., Wadler, P.: Making the future safe for the past: Adding genericity to the Java programming language. In: OOPSLA Proceedings. ACM Press, Vancouver (1998)

    Google Scholar 

  3. Bravenboer, M., Visser, E.: Guiding visitors: Separating navigation from computation. Technical report, Institute of Information and Computing Sciences, Utrecht University (2001)

    Google Scholar 

  4. Breuel, T.M.: Implementing dynamic language features in java using dynamic code generation. In: Proceedings 39th International Conference and Exhibition on Technology of Object-Oriented Languages and Systems. TOOLS 39, pp. 143–52 (2001)

    Google Scholar 

  5. Chambers, C.: Object-oriented multi-methods in Cecil. In: Lehrmann Madsen, O. (ed.) ECOOP 1992. LNCS, vol. 615, pp. 33–56. Springer, Heidelberg (1992)

    Chapter  Google Scholar 

  6. Chambers, C., Chen, W.: Efficient multiple and predicate dispatching. In: Proceedings of the 1999 ACM Conference on Object-Oriented Programming Languages, Systems, and Applications (OOPSLA 1999), ACM SIGPLAN Notices, Denver, CO, vol. 34(10), pp. 238–255. ACM, New York (1999)

    Chapter  Google Scholar 

  7. Clifton, C., Leavens, G.T., Chambers, C., Millstein, T.: MultiJava: Modular open classes and symmetric multiple dispatch for Java. In: OOPSLA 2000 Conference on Object-Oriented Programming, Systems, Languages, and Applications, Minneapolis, Minnesota, vol. 35(10), pp. 130–145 (2000)

    Google Scholar 

  8. Dietzfelbinger, M., Karlin, A.R., Mehlhorn, K., auf der Heide, F.M., Rohnert, H., Tarjan, R.E.: Dynamic perfect hashing: Upper and lower bounds. In: IEEE Symposium on Foundations of Computer Science, pp. 524–531 (1988)

    Google Scholar 

  9. Driesen, K., Hölzle, U., Vitek, J.: Message dispatch on pipelined processors. In: Olthoff, W. (ed.) ECOOP 1995. LNCS, vol. 952, pp. 253–283. Springer, Heidelberg (1995)

    Google Scholar 

  10. Dutchyn, C.: Multi-dispatch in the Java Virtual Machine: Design and implementation. Master’s thesis, Department of Computing Science, University of Alberta, Edmonton, Alberta, Canada (2001)

    Google Scholar 

  11. Flatt, M.: Programming Languages for Reusable Software Components. Technical Report TR99-345, 20 (1999)

    Google Scholar 

  12. Flatt, M., Felleisen, M.: Units: Cool modules for HOTlan guages. In: Proceedings of the ACM SIGPLAN 1998 Conference on Programming Language Design and Implementation, pp. 236–248 (1998)

    Google Scholar 

  13. Flatt, M., Krishnamurthi, S., Felleisen, M.: Classes and Mixins. In: Conference Record of POPL 1998: The 25th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Diego, California, New York, NY, pp. 171–183 (1998)

    Google Scholar 

  14. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison Wesley, Massachusetts (1994)

    Google Scholar 

  15. Gosling, J., Joy, B., Steele, G.: The Java Language Specification. Addison-Wesley, Reading (1996)

    MATH  Google Scholar 

  16. Grothoff, C., Palsberg, J., Vitek, J.: Encapsulating Objects with Confined Types. In: OOPSLA 2001 Conference on Object-Oriented Programming, Systems, Languages, and Applications, Tampa, Florida, pp. 241–253 (2001)

    Google Scholar 

  17. Nordberg III, M.E.: Variations of the Visitor Pattern (1996)

    Google Scholar 

  18. Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An Overview of AspectJ. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–355. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  19. Krishnamurthi, S., Felleisen, M., Friedman, D.P.: Synthesizing Object-Oriented and Functional Design to Promote Re-use. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, pp. 91–113. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  20. Naik, M., Kumar, R.: Efficient message dispatch in object-oriented systems. ACM SIGPLAN Notices 35(3), 49–58 (2000)

    Article  Google Scholar 

  21. Nystrom, N., Clarkson, M.R., Myers, A.C.: Polyglot: An Extensible Compiler Framework for Java. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 138–152. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  22. Odersky, M., Wadler, P.: Pizza into Java: Translating Theory into Practice. In: Proceedings of the 24th ACM Symposium on Principles of Programming Languages (POPL 1997), Paris, France, pp. 146–159. ACM Press, New York (1997)

    Google Scholar 

  23. Ovlinger, J., Wand, M.: A Language for Specifying Traversals of Object Structures. Technical report, College of Computer Science, Northeastern University, Boston, MA (November 1998)

    Google Scholar 

  24. OVM Consortium (2002), http://www.ovmj.org/

  25. Palacz, K., Baker, J., Flack, C., Grothoff, C., Yamauchi, H., Vitek, J.: Engineering a Customizable Intermediate Representation. In: ACM SIGPLAN 2003 Workshop on Interpreters, Virtual Machines and Emulators (IVME 2003), ACM SIGPLAN (2003)

    Google Scholar 

  26. Palsberg, J., Barry Jay, C.: The Essence of the Visitor Pattern. In: Proc. 22nd IEEE Int. Computer Software and Applications Conf., COMPSAC, pp. 9–15 (1998)

    Google Scholar 

  27. Stroustrup, B.: Multiple Inheritance for C++. In: Proceedings of the Spring 1987 European Unix Users Group Conference, Helsinki (1987)

    Google Scholar 

  28. Zenger, M., Odersky, M.: Implementing Extensible Compilers. In: Workshop on Multiparadigm Programming with Object-Oriented Languages, Budapest, Hungary (June 2001)

    Google Scholar 

  29. Zibin, Y., Gil (Y.) J.: Fast Algorithm for Creating Space Efficient Dispatching Tables with Application to Multi-Dispatching. In: OOPSLA 2002 Conference on Object-Oriented Programming, Systems, Languages, and Applications, Seattle, Washington, pp. 142–160 (2002)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Grothoff, C. (2003). Walkabout Revisited: The Runabout. In: Cardelli, L. (eds) ECOOP 2003 – Object-Oriented Programming. ECOOP 2003. Lecture Notes in Computer Science, vol 2743. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-45070-2_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-45070-2_6

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-40531-3

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

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics