Modular Statically Typed Multimethods

Information and Computation, 175(1):76-118, May 2002 © Academic Press.

An earlier version of this paper appeared in the Proceedings of the Thirteenth European Conference on Object-Oriented Programming (ECOOP 99), Lisbon, Portugal, June 14-18, 1999. Springer-Verlag LNCS 1628, June 1999, pp. 279-303.

An even earlier version of this paper appeared in the Sixth International Workshop on Foundations of Object-Oriented Languages (FOOL 6), San Antonio, Texas, January 23, 1999.


Todd Millstein and Craig Chambers
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.

To get the conference version of the paper, click here.

To get the journal version of the paper, which includes the formal semantics of the Dubious language, click here.


Cecil/Vortex Project