skip to main content
10.1145/949305.949325acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article

Relaxed MultiJava: balancing extensibility and modular typechecking

Published:26 October 2003Publication History

ABSTRACT

We present the rationale, design, and implementation of Relaxed MultiJava (RMJ), a backward-compatible extension of Java that allows programmers to add new methods to existing classes and to write multimethods. Previous languages supporting these forms of extensibility either restrict their usage to a limited set of programming idioms that can be modularly typechecked (and modularly compiled) or simply forego modular typechecking altogether. In contrast, RMJ supports the new language features in a virtually unrestricted form while still providing mostly-modular static typechecking and fully-modular compilation. In some cases, the RMJ compiler will warn that the potential for a type error exists, but it will still complete compilation. In those cases, a custom class loader transparently performs load-time checking to verify that the potential error is never realized. RMJ's compiler and custom loader cooperate to keep load-time checking costs low. We report on qualitative and quantitative experience with our implementation of RMJ.

References

  1. Proceedings of the 1992 European Conference on Object-Oriented Programming, LNCS 615, Utrecht, The Netherlands, June 1992. Springer-Verlag.]]Google ScholarGoogle Scholar
  2. J. Aldrich, C. Chambers, and D. Notkin. Architectural reasoning in archjava. In Proceedings of the 2002 European Conference on Object-Oriented Programming, LNCS 2374, Malaga, Spain, June 2002. Springer-Verlag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. E. P. Andersen and T. Reenskaug. System design by composing structures of interacting objects. In Proceedings of the 1992 European Conference on Object-Oriented Programming {1}, pages 133--152.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. K. Arnold, J. Gosling, and D. Holmes. The Java Programming Language Third Edition. Addison-Wesley, Reading, MA, third edition, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. D. F. Bacon and P. F. Sweeney. Fast static analysis of c++ virtual function calls. In OOPSLA96 {39}.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. G. Baumgartner, M. Jansche, and K. Laufer. Half & half: Multiple dispatch and retroactive abstraction for java. Technical Report OSU-CISRC-5/01-TR08, Department of Computer and Information Science, The Ohio State University, Mar. 2002.]]Google ScholarGoogle Scholar
  7. D. G. Bobrow, K. Kahn, G. Kiczales, L. Masinter, M. Stefik, and F. Zdybel. Commonloops: Merging lisp and object-oriented programming. In OOPSLA86 {38}, pages 17--29.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. B. Bokowski and A. Spiegel. Barat -- a front-end for java. Technical Report Technical Report B-98-09, Freie Universitat Berlin, FB Mathematik und Informatik, Dec. 1998.]]Google ScholarGoogle Scholar
  9. J. Boyland and G. Castagna. Parasitic methods: An implementation of multi-methods for java. In Proceedings of the 1997 ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, Atlanta, GA, Oct. 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. G. Bracha. Personal communication. Jan. 2003.]]Google ScholarGoogle Scholar
  11. R. Cartwright and M. Fagan. Soft typing. SIGPLAN Notices, 26(6):278--292, June 1991. Conference onProgramming Language Design and Implementation.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. G. Castagna. Covariance and contravariance: Conflict without a cause. ACM Transactions on Programming Languages and Systems, 17(3):431--447, May 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. C. Chambers. Object-oriented multi-methods in Cecil. In Proceedings of the 1992 European Conference on Object-Oriented Programming {1}, pages 33--56.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. C. Chambers. The Cecil language: Specification and rationale. Technical Report UW-CSE-93-03-05, Department of Computer Science and Engineering. University of Washington, Mar. 1993. Revised, March 1997.]]Google ScholarGoogle Scholar
  15. C. Chambers. Towards Diesel, a next-generation OO language after Cecil. Invited talk, the Fifth Workshop of Foundations of Object-Oriented Langauges, San Diego, California, Jan. 1998.]]Google ScholarGoogle Scholar
  16. C. Chambers and W. Chen. Efficient multiple and predicate dispatching. In Proceedings of the 1999 ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 238--255, Denver, CO, Nov. 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. C. Clifton. MultiJava: Design, implementation, and evaluation of a Java-compatible language supporting modular open classes and symmetric multiple dispatch. Technical Report 01-10, Department of Computer Science, Iowa State University, Ames, Iowa, 50011, Nov. 2001. Available from multijava.sourceforge.net.]]Google ScholarGoogle Scholar
  18. C. Clifton, G. Leavens, C. Chambers, and T. Millstein. Multijava: Modular symmetric multiple dispatch and open classes for Java. In Proceedings of the 2000 ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, Minneapolis, MN, Oct. 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. J. Dean, G. DeFouw, D. Grove, V. Litvinov, and C. Chambers. Vortex: An optimizing compiler for object-oriented languages. In OOPSLA96 {39}.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Proceedings of the 1998 European Conference on Object-Oriented Programming, LNCS 1445, Brussels, Belgium, July 1998. Springer-Verlag.]]Google ScholarGoogle Scholar
  21. E. Gamma, R. Helm, R. E. Johnson, and J. Vlissides. Design Patterns. Addison-Wesley, Reading, MA, 1995.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J. Gosling, B. Joy, G. Steele, and G. Bracha. The Java Language Specification Second Edition. The Java Series. Addison-Wesley, Boston, Mass., 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. C. Grothoff. Walkabout revisited: The runabout. In Proceedings of the 2003 European Conference on Object-Oriented Programming, LNCS 2743, Darmstadt, Germany, July 2003. Springer-Verlag.]]Google ScholarGoogle Scholar
  24. W. Harrison and H. Ossher. Subject-oriented programming (A critique of pure objects). In Proceedings of the 1993 ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 411--428, Washington, D.C., Oct. 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. R. Keller and U. Holzle. Binary component adaptation. In E. Jul, editor, ECOOP '98--Object-Oriented Programming, volume 1445 of Lecture Notes in Computer Science, pages 307-- 329. Springer, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. G. Kiczales, E. Hilsdale, J. Hugunin, M. Kersten, J. Palm, and W. G. Griswold. An overview of aspectj. In Proceedings of the 2001 European Conference on Object-Oriented Programming, LNCS 2072, Budapest, Hungary, June 2001. Springer-Verlag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. G. Kiczales, J. Lamping, A. Menhdhekar, C. Maeda, C. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-oriented programming. In Proceedings of the 1997 European Conference on Object-Oriented Programming, LNCS 1241, Jyvaskyla, Finland, June 1997. Springer-Verlag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. S. Krishnamurthi, M. Felleisen, and D. P. Friedman. Synthesizing object-oriented and functional design to promote re-use. In ECOOP98 {20}, pages 91--113.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. G. T. Leavens and T. D. Millstein. Multiple dispatch as dispatch on tuples. In OOPSLA98 {40}, pages 374--387.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. S. Liang and G. Bracha. Dynamic class loading in the Java virtual machine. In OOPSLA98 {40}, pages 36--44.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. V. Litvinov. Constraint-based polymorphism in cecil: Towards a practical and static type system. In OOPSLA98 {40}.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. R. Martin. Acyclic visitor. In Pattern Languages of Program Design 3, pages 93--104. Addison-Wesley, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. S. McDirmid, M. Flatt, and W. C. Hsieh. Jiazzi: New-age components for old-fashioned java. In Proceedings of the 2001 ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, Tampa, FL, Oct. 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. T. Millstein and C. Chambers. Modular statically typed multimethods. In Proceedings of the 1999 European Conference on Object-Oriented Programming, LNCS 1628, pages 279--303, Lisbon, Portugal, June 1999. Springer-Verlag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. D. A. Moon. Object-oriented programming with flavors. In OOPSLA86 {38}, pages 1--8.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. MultiJava home page. http://multijava.sourceforge.net.]]Google ScholarGoogle Scholar
  37. M. E. Nordberg. Default and extrinsic visitor. In Pattern Languages of Program Design 3, pages 105--123. Addison-Wesley, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Proceedings of the 1986 ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, Portland, OR, Nov. 1986.]]Google ScholarGoogle Scholar
  39. Proceedings of the 1996 ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, San Jose, CA, Oct. 1996.]]Google ScholarGoogle Scholar
  40. Proceedings of the 1998 ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, Vancouver, Canada, Oct. 1998.]]Google ScholarGoogle Scholar
  41. H. Ossher and P. Tarr. Hyper/J: multi-dimensional separation of concerns for Java. In Proceedings of the 22nd International Conference on Software Engineering, pages 734--737, June 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. A. Paepcke. Object-Oriented Programming: The CLOS Perspective. MIT Press, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. J. Palsberg and C. B. Jay. The essence of the visitor pattern. In Proc. 22nd IEEE Int. Computer Software and Applications Conf., COMPSAC, pages 9--15, 19--21 Aug. 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. A. Shalit. The Dylan Reference Manual. Addison-Wesley, Reading, MA, 1996.]]Google ScholarGoogle Scholar
  45. Y. Smaragdakis and D. Batory. Implementing layered designs with mixin layers. In ECOOP98 {20}, pages 550--570.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. G. L. Steele Jr. Common Lisp: The Language. Digital Press, Bedford, MA, second edition, 1990.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. M. VanHilst and D. Notkin. Using C++ templates to implement role-based designs. In Proceedings of 2nd International Symposium on Object Technologies for Advanced Software, Mar. 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. J. Vlissides. Visitor in frameworks. C++ Report, 11(10):40-- 46, November/December 1999.]]Google ScholarGoogle Scholar
  49. M. Zenger and M. Odersky. Extensible algebraic datatypes with defaults. In Proceedings of the 2001 ACM SIGPLAN International Conference on Functional Programming. ACM, September 3-5 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Relaxed MultiJava: balancing extensibility and modular typechecking

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        OOPSLA '03: Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications
        October 2003
        430 pages
        ISBN:1581137125
        DOI:10.1145/949305
        • cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 38, Issue 11
          Special Issue: Proceedings of the OOPSLA '03 conference
          November 2003
          417 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/949343
          Issue’s Table of Contents

        Copyright © 2003 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 26 October 2003

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

        Acceptance Rates

        OOPSLA '03 Paper Acceptance Rate26of147submissions,18%Overall Acceptance Rate268of1,244submissions,22%

        Upcoming Conference

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader