Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/353171.353181acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article
Free access

MultiJava: modular open classes and symmetric multiple dispatch for Java

Published: 01 October 2000 Publication History

Abstract

We present MultiJava, a backward-compatible extension to Java supporting open classes and symmetric multiple dispatch. Open classes allow one to add to the set of methods that an existing class supports without creating distinct subclasses or editing existing code. Unlike the "Visitor" design pattern, open classes do not require advance planning, and open classes preserve the ability to add new subclasses modularly and safely. Multiple dispatch offers several well-known advantages over the single dispatching of conventional object-oriented languages, including a simple solution to some kinds of "binary method" problems. MultiJava's multiple dispatch retains Java's existing class-based encapsulation properties. We adapt previous theoretical work to allow compilation units to be statically typechecked modularly and safely, ruling out any link-time or run-time type errors. We also present a n compilation scheme that operates modularly and incurs performance overhead only where open classes or multiple dispatching are actually used.

References

[1]
Rakesh Agrawal, Linda G. DeMichiel, and Bruce G. Lindsay. Static Type Checking of Multi-Methods. OOPSLA'91 Conference Proceedings, Phoenix, AZ, October, 1991, volume 26, number 11 of ACM SIGPLAN Notices, pp. 113-128. ACM, New York, November, 1991.]]
[2]
Ken Arnold and James Gosling. The Java Programming Language. Second Edition, Addison-Wesley, Reading, Mass., 1998.]]
[3]
Fran~ois Bourdoncle and Stephan Merz. Type Checking Higher-Order Polymorphic Multi-Methods. Conference Record of POPL '97: The 24th ACM SIGPLAN- SIGACT Symposium on Principles of Programming Languages, Paris, France, pp. 302-315. ACM, New York, January 1997.]]
[4]
John Boyland and Giuseppe Castagna. Parasitic Methods: An Implementation of Multi-Methods for Java. Proceedings of the ACM SIGPLAN Conference on Object- Oriented Programming Systems, Languages and Applications, volume 32, number 10 of ACM SIGPLAN Notices, pp. 66-76. ACM, New York, November 1997.]]
[5]
Kim Bruce, Luca Cardelli, Giuseppe Castagna, The Hopkins Object Group, Gary T. Leavens, and Benjamin Pierce. On Binary Methods. Theory and Practice of Object Systems, 1(3):221-242, 1995.]]
[6]
Luca Cardelli. A Semantics of Multiple Inheritance. Information and Computation, 76(2/3): 138-164, February- March, 1988. An earlier version appeared in Semantics of Data Types Symposium, LNCS 173, pp. 51-66, Springer-Verlag, 1984.]]
[7]
Giuseppe Castagna, Giorgio Ghelli, and Giuseppe Longo. A Calculus for Overloaded Functions with Subtyping. Proceedings of the 1992 ACMConference on Lisp and Functional Programming, San Francisco, June, 1992, pp. 182- 192, volume 5, number 1 of LISP Pointers. ACM, New York, January-March, 1992.]]
[8]
Giuseppe Castagna. Covariance and contravariance: conflict without a cause. ACM Transactions on Programming Languages and Systems, 17(3):431-447, 1995.]]
[9]
Giuseppe Castagna. Object-Oriented Programming A Unified Foundation, Birkh~user, Boston, 1997.]]
[10]
Craig Chambers. Object-Oriented Multi-Methods in Cecil. ECOOP '92 Conference Proceedings, Utrecht, the Netherlands, June/July, 1992, volume 615 of Lecture Notes in Computer Science, pp. 33-56. Springer-Verlag, Berlin, 1992.]]
[11]
Craig Chambers. The Cecil Language: Specification and Rationale: Version 2.0. Department of Computer Science and Engineering, University of Washington, December, 1995. http:// www.cs.washington.edu/research/projects/cecil/www/Papers/ cecil-spec.html.]]
[12]
Craig Chambers and Weimin Chen. Efficient Multiple and Predicate Dispatching. OOPSLA '99 Conference Proceedings, pp. 238-255, October, 1999. Published as SIGPLAN Notices 34(10), October, 1999.]]
[13]
Craig Chambers and Gary T. Leavens. Typechecking and Modules for Multi-Methods. ACM Transactions on Programming Languages and Systems, 17(6):805-843. November, 1995.]]
[14]
Craig Chambers. Towards Diesel, a Next-Generation OO Language after Cecil. Invited talk, The Fifth Workshop on Foundations of Object-oriented Languages, San Diego, California, January 1998.]]
[15]
William Cook. Object-Oriented Programming versus Abstract Data Types. Foundations of Object-Oriented Languages, REX School/Workshop Proceedings, Noordwijkerhout, the Netherlands, May/June, 1990, volume 489 of Lecture Notes in Computer Science, pp. 151-178. Springer-Verlag, New York, 1991.]]
[16]
Neal Feinberg, Sonya E. Keene, Robert O. Mathews, and P. Tucker Withington. The Dylan Programming Book. Addison-Wesley Longman, Reading, Mass., 1997.]]
[17]
Robert Bruce Findler and Matthew Flatt. Modular Object-Oriented Programming with Units and Mixins. International Conference on Functional Programming, Baltimore, Maryland, September 1998.]]
[18]
Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading, Mass., 1995.]]
[19]
James Gosling, Bill Joy, Guy Steele, and Gilad Bracha. The Java Language Specification, Second Edition. Addison-Wesley, Reading, Mass., 2000.]]
[20]
D. H. H. Ingalls. A Simple Technique for Handling Multiple Polymorphism. In Norman Meyrowitz, editor, OOPSLA '86 Conference Proceedings, Portland, Oregon, November, 1986, volume 21, number 11 of ACM SIGPLAN Notices, pp. 347-349. ACM, New York, October, 1986.]]
[21]
Gregor Kiczales, John Lamping, Anurag Mendhekar, Chris Maeda, Cristina Videira Lopes, Jean-Marc Loingtier, John Irwin. Aspect-Oriented Programming. In proceedings of the Eleventh European Conference on Object- Oriented Programming, Finland. Springer-Verlag LNCS 1241. June 1997.]]
[22]
Gary T. Leavens and Todd D. Millstein. Multiple Dispatch as Dispatch on Tuples. Conference on Objectoriented Programming, Systems, Languages, and Applications, Vancouver, British Columbia, October 1998.]]
[23]
Robert C. Martin. Acyclic Visitor. In Robert C. Martin, Dirk Riehle, Frank Buschmann (editors), Pattern Languages of Program Design 3, pp. 93-103. Addison-Wesley Longman, Inc., Reading, Mass., 1998.]]
[24]
Todd Millstein and Craig Chambers. Modular Statically Typed Multimethods. In proceedings of the Fourteenth European Conference on Object-Oriented Programming, Lisbon, Portugal, July 14-18, 1999. Volume 1628 of Lecture Notes in Computer Science, pp. 279-303, Springer- Verlag, 1999.]]
[25]
Todd Millstein and Craig Chambers. Modular Statically Typed Multimethods. To appear in Information and Computation.]]
[26]
W. B. Mugridge, J. Hamer, and J. G. Hosking. Multi-Methods in a Statically-Typed Programming Language. ECOOP '91 Conference Proceedings, Geneva, Switzerland, July, 1991, volume 512 of Lecture Notes in Computer Science; Springer-Verlag, New York, 1991.]]
[27]
Martin E. Nordberg III. Default and Extrinsic Visitor. In Robert C. Martin, Dirk Riehle, Frank Buschmann (editors), Pattern Languages of Program Design 3, pp. 105-123. Addison- Wesley Longman, Inc., Reading, Mass., 1998.]]
[28]
Martin Odersky and Philip Wadler. Pizza into Java: Translating Theory into Practice. Conference Record of POPL '97: The 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Paris, France, pp. 146- 159. ACM, New York, January 1997.]]
[29]
Andreas Paepcke. Object-Oriented Programming: The CLOS Perspective. MIT Press, 1993.]]
[30]
Andrew Shalit. The Dylan Reference Manual: The Definitive Guide to the New Object-Oriented Dynamic Language. Addison-Wesley, Reading, Mass., 1997.]]
[31]
Guy L. Steele Jr. Common Lisp: The Language (second edition). Digital Press, Bedford, MA, 1990.]]
[32]
John Vlissides. Visitor into Frameworks. C++ Report, 11(10):40-46. SIGS Publications, November/December 1999.]]

Cited By

View all
  • (2021)Effect of human behavior on traffic patterns during an emergency2016 IEEE 19th International Conference on Intelligent Transportation Systems (ITSC)10.1109/ITSC.2016.7795888(2052-2058)Online publication date: 10-Mar-2021
  • (2021)Taming the Merge OperatorJournal of Functional Programming10.1017/S095679682100018631Online publication date: 2-Nov-2021
  • (2019)Decidable tag-based semantic subtyping for nominal types, tuples, and unionsProceedings of the 21st Workshop on Formal Techniques for Java-like Programs10.1145/3340672.3341115(1-11)Online publication date: 15-Jul-2019
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
OOPSLA '00: Proceedings of the 15th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
October 2000
402 pages
ISBN:158113200X
DOI:10.1145/353171
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 October 2000

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Conference

OOPSLA00
Sponsor:

Acceptance Rates

Overall Acceptance Rate 268 of 1,244 submissions, 22%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)139
  • Downloads (Last 6 weeks)17
Reflects downloads up to 09 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2021)Effect of human behavior on traffic patterns during an emergency2016 IEEE 19th International Conference on Intelligent Transportation Systems (ITSC)10.1109/ITSC.2016.7795888(2052-2058)Online publication date: 10-Mar-2021
  • (2021)Taming the Merge OperatorJournal of Functional Programming10.1017/S095679682100018631Online publication date: 2-Nov-2021
  • (2019)Decidable tag-based semantic subtyping for nominal types, tuples, and unionsProceedings of the 21st Workshop on Formal Techniques for Java-like Programs10.1145/3340672.3341115(1-11)Online publication date: 15-Jul-2019
  • (2019)Polymorphic symmetric multiple dispatch with varianceProceedings of the ACM on Programming Languages10.1145/32903243:POPL(1-28)Online publication date: 2-Jan-2019
  • (2018)Modular language composition for the massesProceedings of the 11th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3276604.3276622(47-59)Online publication date: 24-Oct-2018
  • (2018)Julia subtyping: a rational reconstructionProceedings of the ACM on Programming Languages10.1145/32764832:OOPSLA(1-27)Online publication date: 24-Oct-2018
  • (2018)Design patterns impact on software quality: Where are the theories?2018 IEEE 25th International Conference on Software Analysis, Evolution and Reengineering (SANER)10.1109/SANER.2018.8330193(15-25)Online publication date: Mar-2018
  • (2018)Dualizing Generalized Algebraic Data Types by Matrix TranspositionProgramming Languages and Systems10.1007/978-3-319-89884-1_3(60-85)Online publication date: 14-Apr-2018
  • (2017)A Layer-based Approach to Hierarchical Dynamically-scoped Open ClassesJournal of Information Processing10.2197/ipsjjip.25.29625(296-307)Online publication date: 2017
  • (2017)Jatte: a tunable tree editor for integrated DSLsProceedings of the 2nd ACM SIGPLAN International Workshop on Comprehension of Complex Systems10.1145/3141842.3141844(7-12)Online publication date: 23-Oct-2017
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media