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.
- Proceedings of the 1992 European Conference on Object-Oriented Programming, LNCS 615, Utrecht, The Netherlands, June 1992. Springer-Verlag.]]Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- K. Arnold, J. Gosling, and D. Holmes. The Java Programming Language Third Edition. Addison-Wesley, Reading, MA, third edition, 2000.]] Google ScholarDigital Library
- D. F. Bacon and P. F. Sweeney. Fast static analysis of c++ virtual function calls. In OOPSLA96 {39}.]] Google ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- G. Bracha. Personal communication. Jan. 2003.]]Google Scholar
- R. Cartwright and M. Fagan. Soft typing. SIGPLAN Notices, 26(6):278--292, June 1991. Conference onProgramming Language Design and Implementation.]] Google ScholarDigital Library
- G. Castagna. Covariance and contravariance: Conflict without a cause. ACM Transactions on Programming Languages and Systems, 17(3):431--447, May 1995.]] Google ScholarDigital Library
- C. Chambers. Object-oriented multi-methods in Cecil. In Proceedings of the 1992 European Conference on Object-Oriented Programming {1}, pages 33--56.]] Google ScholarDigital Library
- 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 Scholar
- 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 Scholar
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- J. Dean, G. DeFouw, D. Grove, V. Litvinov, and C. Chambers. Vortex: An optimizing compiler for object-oriented languages. In OOPSLA96 {39}.]] Google ScholarDigital Library
- Proceedings of the 1998 European Conference on Object-Oriented Programming, LNCS 1445, Brussels, Belgium, July 1998. Springer-Verlag.]]Google Scholar
- E. Gamma, R. Helm, R. E. Johnson, and J. Vlissides. Design Patterns. Addison-Wesley, Reading, MA, 1995.]]Google ScholarDigital Library
- J. Gosling, B. Joy, G. Steele, and G. Bracha. The Java Language Specification Second Edition. The Java Series. Addison-Wesley, Boston, Mass., 2000.]] Google ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- G. T. Leavens and T. D. Millstein. Multiple dispatch as dispatch on tuples. In OOPSLA98 {40}, pages 374--387.]] Google ScholarDigital Library
- S. Liang and G. Bracha. Dynamic class loading in the Java virtual machine. In OOPSLA98 {40}, pages 36--44.]] Google ScholarDigital Library
- V. Litvinov. Constraint-based polymorphism in cecil: Towards a practical and static type system. In OOPSLA98 {40}.]] Google ScholarDigital Library
- R. Martin. Acyclic visitor. In Pattern Languages of Program Design 3, pages 93--104. Addison-Wesley, 1998.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- D. A. Moon. Object-oriented programming with flavors. In OOPSLA86 {38}, pages 1--8.]] Google ScholarDigital Library
- MultiJava home page. http://multijava.sourceforge.net.]]Google Scholar
- M. E. Nordberg. Default and extrinsic visitor. In Pattern Languages of Program Design 3, pages 105--123. Addison-Wesley, 1998.]] Google ScholarDigital Library
- Proceedings of the 1986 ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, Portland, OR, Nov. 1986.]]Google Scholar
- Proceedings of the 1996 ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, San Jose, CA, Oct. 1996.]]Google Scholar
- Proceedings of the 1998 ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, Vancouver, Canada, Oct. 1998.]]Google Scholar
- 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 ScholarDigital Library
- A. Paepcke. Object-Oriented Programming: The CLOS Perspective. MIT Press, 1993.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- A. Shalit. The Dylan Reference Manual. Addison-Wesley, Reading, MA, 1996.]]Google Scholar
- Y. Smaragdakis and D. Batory. Implementing layered designs with mixin layers. In ECOOP98 {20}, pages 550--570.]] Google ScholarDigital Library
- G. L. Steele Jr. Common Lisp: The Language. Digital Press, Bedford, MA, second edition, 1990.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- J. Vlissides. Visitor in frameworks. C++ Report, 11(10):40-- 46, November/December 1999.]]Google Scholar
- 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 ScholarDigital Library
Index Terms
- Relaxed MultiJava: balancing extensibility and modular typechecking
Recommendations
Relaxed MultiJava: balancing extensibility and modular typechecking
Special Issue: Proceedings of the OOPSLA '03 conferenceWe 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 ...
MultiJava: Design rationale, compiler implementation, and applications
MultiJava is a conservative extension of the Java programming language that adds symmetric multiple dispatch and open classes. Among other benefits, multiple dispatch provides a solution to the binary method problem. Open classes provide a solution to ...
Class Loader Firmware on Java SoC
ISCSCT '08: Proceedings of the 2008 International Symposium on Computer Science and Computational Technology - Volume 01Java is one of the most popular programming architectures because of its platform-independence. A Java processor called “JOP” accelerates the speed of Java applications by executing Java bytecode instructions directly instead of by software emulation. ...
Comments