Skip to main content

Modular Statically Typed Multimethods

  • 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

Multimethods offer several well-known advantages over the single dispatching of conventional object-oriented languages, including a simple solution to the ”binary method“ problem, cleaner implementations of the “visitor,” “strategy,” and similar design patterns, and a form of “open objects.” However, previous work on statically typed multimethods whose arguments are treated symmetrically has required the whole program to be available in order to perform typechecking. We describe Dubious, a simple core language including first-class generic functions with symmetric multimethods, a classless object model, and modules that can be separately typechecked. We identify two sets of restrictions that ensure modular type safety for Dubious as well as an interesting intermediate point between these two.We have proved each of these modular type systems sound.

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. Martín Abadi and Luca Cardelli. An Imperative Object Calculus. Theory and Practice of Object Systems, 1(3):151–166, 1995.

    Google Scholar 

  2. Martín Abadi and Luca Cardelli. A Theory of Objects. Springer-Verlag, New York, 1996.

    MATH  Google Scholar 

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

    Google Scholar 

  4. Ken Arnold and James Gosling. The Java Programming Language. Second Edition, Addison-Wesley, Reading, Mass., 1998.

    Google Scholar 

  5. Gerald Baumgartner, Konstantin Läufer, and Vincent F. Russo. On the Interaction of Object-Oriented Design Patterns and Programming Languages. Technical Report CSD-TR-96-020, Department of Computer Science, Purdue University, February 1996.

    Google Scholar 

  6. François Bourdoncle and Stephan Merz. Type Checking Higher-Order Polymorphic Multi-Methods. Conference Record of POPL’ 97: The 24th ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, Paris, France, pp. 302–315. ACM, New York, January 1997.

    Chapter  Google Scholar 

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

    Chapter  Google Scholar 

  8. Gilad Bracha and William Cook. Mixin-Based Inheritance. Proceedings of the Joint ACM Conference on Object-Oriented Programming Systems, Languages and Applications and the European Conference on Object-Oriented Programming, Ottawa, Canada, October 1990.

    Google Scholar 

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

    Google Scholar 

  10. Peter Canning, William Cook, Walter Hill, Walter Olthoff, John C. Mitchell. F-Bounded Polymorphism for Object-Oriented Programming. Proceedings of the Fourth International Conference on Functional Programming Languages and Computer Architecture, pages 273–280, September 1989.

    Google Scholar 

  11. Luca Cardelli. A Semantics of Multiple Inheritance. Semantics of Data Types Symposium, LNCS 173, pp. 51–66, Springer-Verlag, 1984.

    Google Scholar 

  12. Giuseppe Castagna, Giorgio Ghelli, and Giuseppe Longo. A Calculus for Overloaded Functions with Subtyping. Proceedings of the 1992 ACM Conference 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.

    Chapter  Google Scholar 

  13. Giuseppe Castagna. Covariance and contravariance: conflict without a cause. ACM Transactions on Programming Languages and Systems, 17(3):431–447, 1995.

    Article  Google Scholar 

  14. Giuseppe Castagna. Object-Oriented Programming A Unified Foundation, Birkhäuser, Boston, 1997.

    Google Scholar 

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

    Google Scholar 

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

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

    Article  Google Scholar 

  18. Craig Chambers and Gary T. Leavens. BeCecil, A Core Object-Oriented Language with Block Structure and Multimethods: Semantics and Typing. The Fourth International Workshop on the Foundations of Object-oriented Languages, Paris, France, January 1997.

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

  21. Michael D. Ernst, Craig Kaplan, and Craig Chambers. Predicate Dispatching: A Unified Theory of Dispatch. Twelfth European Conference on Object-Oriented Programming, Brussels, Belgium, pp. 186–211, July, 1998.

    Google Scholar 

  22. Neal Feinberg, Sonya E. Keene, Robert O. Mathews, and P. Tucker Withington. The Dylan Programming Book. Addison-Wesley Longman, Reading, Mass., 1997.

    Google Scholar 

  23. Robert Bruce Findler and Matthew Flatt. Modular Object-Oriented Programming with Units and Mixins. International Conference on Functional Programming, Baltimore, Maryland, September 1998.

    Google Scholar 

  24. Matthew Flatt, Shriram Krishnamurthi, and Matthias Felleisen. Classes and Mixins. Conference Record of POPL’ 98: The 25th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Diego, California, pp. 171–183. ACM, New York, January 1998.

    Chapter  Google Scholar 

  25. Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading, Mass., 1995.

    Google Scholar 

  26. James Gosling, Bill Joy, Guy Steele, Guy L. Steele. The Java Language Specification. Addison-Wesley, Reading, Mass., 1996.

    MATH  Google Scholar 

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

    Google Scholar 

  28. Wilf R. LaLonde, Dave A. Thomas, and John R. Pugh. An Exemplar Based Smalltalk. OOPSLA’ 86 Conference Proceedings, pp. 322–330, Portland, OR, September, 1986. Published as SIGPLAN Notices 21(11), November, 1986.

    Google Scholar 

  29. Gary T. Leavens and Todd D. Millstein. Multiple Dispatch as Dispatch on Tuples. Conference on Object-oriented Programming, Systems, Languages, and Applications, Vancouver, British Columbia, October 1998.

    Google Scholar 

  30. Henry Lieberman. Using Prototypical Objects to Implement Shared Behavior in Object-Oriented Systems. OOPSLA’ 86 Conference Proceedings, pp. 214–223, Portland, OR, September, 1986. Published as SIGPLAN Notices 21(11), November, 1986.

    MathSciNet  Google Scholar 

  31. Todd Millstein and Craig Chambers. Modular Statically Typed Multimethods. Technical Report UW-CSE-99-03-02, Department of Computer Science and Engineering, University of Washington, March 1999.

    Google Scholar 

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

    Chapter  Google Scholar 

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

    Google Scholar 

  34. Andreas Paepcke. Object-Oriented Programming: The CLOS Perspective. MIT Press, 1993.

    Google Scholar 

  35. T. Reenskaug, E. Anderson, A. Berre, A. Hurlen, A. Landmark, O. Lehne, E. Nordhagen, E. Ness-Ulseth, G. Oftedal, A. Skaar, and P. Stenslet. OORASS: Seamless Support for the Creation and Maintenance of Object-Oriented Systems. Journal of Object-Oriented Programming, 5(6): October 1992, pp. 27–41.

    Google Scholar 

  36. John C. Reynolds. Using Category Theory to Design Implicit Conversions and Generic Operators. Semantics-Directed Compiler Generation, Aarhus, Denmark, pp. 211–258. Volume 94 of Lecture Notes in Computer Science, Springer-Verlag, NY, 1980.

    Google Scholar 

  37. Andrew Shalit. The Dylan Reference Manual: The Definitive Guide to the New Object-Oriented Dynamic Language. Addison-Wesley, Reading, Mass., 1997.

    Google Scholar 

  38. Yannis Smaragdakis and Don Batory. Implementing Layered Designs with Mixin Layers. Twelfth European Conference on Object-Oriented Programming, Brussels, Belgium, pp. 550–570, July 1998.

    Google Scholar 

  39. Guy L. Steele Jr. Common Lisp: The Language (second edition). Digital Press, Bedford, MA, 1990.

    MATH  Google Scholar 

  40. David Ungar and Randall B. Smith. Self: The Power of Simplicity. OOPSLA’ 87 Conference Proceedings, Orlando, Florida, volume 22, number 12, of ACM SIGPLAN Notices, pp. 227–241. ACM, New York, December, 1987.

    Chapter  Google Scholar 

  41. M. VanHilst and D. Notkin. Using C++ Templates to Implement Role-Based Designs. JSSST International Symposium on Object Technologies for Advanced Software, Springer-Verlag, 1996, pp. 22–37.

    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-Verlag Berlin Heidelberg

About this paper

Cite this paper

Millstein, T., Chambers, C. (1999). Modular Statically Typed Multimethods. 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_13

Download citation

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

  • 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