| Gary T. Leavens and Todd D. Millstein. Multiple dispatch as dispatch on tuples. In Proceedings of the OOPSLA '98 Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 374--387, Vancouver, British Columbia, Canada, 18--22 October 1998. |
....classes is subsumed by the language semantics, including rules for double dispatch. In other words, we would like a language where both datatypes and behaviors can be added modularly. Various systems have been developed to study double dispatch and the visitor pattern. Millstein and Leavens [6] designed the Tuple language to show how to add multiple dispatch to conventional object oriented languages cleanly, letting the receiver of a method call be a tuple of objects rather than a single object and selecting a method most specific to those objects. If there is no appropriate method or ....
Gary T. Leavens and Todd D. Millstein. Multiple dispatch as dispatch on tuples. In OOPSLA '98 Conference Proceedings, pages 374--387, 1998.
....errors when linked together. Previous work on statically typed multimethods has dealt with this problem in two ways. Some work has simply forced programs to be typechecked as a whole [Mugridge et al. 91, Castagna et al. 92, Chambers 92, Bourdoncle Merz 97, Castagna 97, Chambers Leavens 97, Leavens Millstein 98] thereby losing the ability to safely independently develop code that is later combined into a single program. Other work sacrifices symmetric treatment of multimethod arguments to ensure the safety of modular typechecking [Agrawal et al. 91, Bruce et al. 95, Boyland Castagna 97] thereby ....
....until link time, when all modules are present. This global typechecking approach, which we refer to as System G, is used for typechecking all previous languages with symmetric multimethods, including Kea [Mugridge et al. 91] Cecil [Chambers 92, Chambers 95] ML [Bourdoncle Merz 97] and Tuple [Leavens Millstein 98] 3 Example Programming Idioms There are several flexible programming idioms expressible in Dubious that we would like to be able to statically typecheck. These idioms will serve as benchmarks for evaluating the various typechecking algorithms presented in this paper. The global typechecking of ....
[Article contains additional citation context not shown here]
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.
....solving the multi method dispatching problem, is believed to be space and time intensive. 1;2 That is a serious concern because user programs spend significant amount of time in dispatching. Hence, considerable research effort has been focused on multi method dispatching within the OO community [A91, D96, CTK94, ADS96, LM98]. Multi methods and multiple dispatching. Computation in OO systems proceeds by invoking methods (procedures with several arguments) on class instances. Determining the correct method definition that gets applied on any such invocation constitutes the so called dispatching problem. The correct ....
....is a combinatorial explosion in the space usage as d increases. Since even the case d = 1 uses a prohibitive amount of space, this solution is clearly useless for d 2. No better theoretical bounds are currently known. Several recent results attempted to deal with d ary dispatching in practice [A91, D96, ADS96, CTK94, LM98]. However, even the case d = 2 is not well understood and designing effective heuristics for table compaction schemes or for using automata to prune the search space is still open. To summarize, the main algorithmic research goal is to design algorithms with interesting, provable tradeoffs ....
[Article contains additional citation context not shown here]
G. Leavens and T. Millstein. Multiple dispatch as dispatch on tuples. Proc. OOPSLA 98, 1998.
....function de ned on points and color points exhibit a surprising twist when we consider behavioral issues. In Section 6 we summarize our work, contrast it with other work on multimethods, and identify some problems for future research. 2 Behavioral Subtyping We use the tuple class notation of [5] but our approach is applicable to any notation for multimethods. Suppose m( is a multimethod to be dispatched on two arguments of (base) types B1, B2 and has a third argument (on which no dispatching is done) of type C3: tuple class( x:B1, y:B2 ) f method m( z:C3 ) f . g g We will assume ....
G. Leavens and T. Millstein. Multiple dispatch as dispatch on tuples. In Proceedings of OOPSLA '98, pages 374-387. ACM Press, 1998.
....Subtyping Most standard OO languages do not include multiple dispatch, hence do not provide any syntax to express multimethods. Several language notations have been designed to code multimethods; in our discussion, we will use the tuple class notation introduced by Leavens and Millstein [5] as a convenient way to express multimethods; but note that our approach will be applicable to the other notations as well. If m( is a multimethod to be dispatched on, say, two arguments of (base) types B1 and B2, and has a third argument (on which no dispatching is done) of type C3, this would ....
G. Leavens and T. Millstein. Multiple dispatch as dispatch on tuples. In Proceedings of OOPSLA '98, pages 374-387. ACM Press, 1998.
....[Sny86, Lis87] and the visibility of the inheritance structure itself [Sny86] We do not know of any other work directed toward resolving the con ict we outline in Section 2. Several techniques have been developed for introducing multimethods into single dispatch languages. Leavens and Millstein [LM98] view multiple dispatch as a dispatch on a tuple of types. This approach requires that all arguments that participate in the dynamic dispatch be grouped into a tuple class. This system, as we understand it, does not allow dispatch on classes that are not part of the receiver tuple. To add a new ....
....via subclasses, it is not clear how multiple independent extensions would be merged in this system without creating unnecessarily complex class structures. Boyland and Castagna s parasitic methods for Java [BC97] also provide dynamic dispatch based on multiple arguments. Leavens and Millstein [LM98, Section 4.2] show that this approach sometimes requires the modi cation of existing classes when new subclasses are de ned. Thus, we do not believe it supports encapsulation as strongly as our accessory functions do. A discussion of other techniques for multimethod dispatch can be found in ....
Gary T. Leavens and Todd D. Millstein. Multiple dispatch as dispatch on tuples. In OOPSLA '98 { Object Oriented Programming Systems, Languages and Applications, pages 374{ 387, October 1998. Published as SIGPLAN Notices Vol. 33, No. 10.
....double dispatching is error prone because it requires method selection to be implemented manually. This makes it hard to see which argument combination causes the execution of which method. 1. 2 Tuple s Solution To solve the above problems, Leavens and Millstein designed a language called Tuple [9]. The idea is to extend the single dispatch language (e.g, Java) with tuple expressions, tuple classes, tuple types, and the ability to declare and send message to tuples, which gives multiple dispatch. To illustrate, we will give answers to the above two examples in the syntax of Tuple. In Figure ....
....is given in Figure 4. Here, for each different node and visitor pair, a tuple class is defined. The corresponding visiting method is defined in the tuple class. In this way, the semantics is clear and the code is easy to modify. 1. 3 Contribution of this Paper Based on the original Tuple paper [9], we have implemented the dynamic semantics and type checking of Tuple in the functional languag Haskell [11] Using our prototype system, we have gained experience coding in Tuple and also proved the soundness of the type system. Also, we added keyword super to the original language to enable ....
[Article contains additional citation context not shown here]
G. T. Leavens and T. D. Millstein. Multiple dispatch as dispatch on tuples. ACM, 1998. OOPSLA '98 Proceedings.
....but generate type errors when linked together. Previous work on statically typed multimethods has dealt with this problem either by forcing programs to be typechecked as a whole [Mugridge et al. 91, Castagna et al. 92, Chambers 95, Bourdoncle Merz 97, Castagna 97, Chambers Leavens 97, Leavens Millstein 98] or by sacrificing symmetric treatment of multimethod arguments to ensure the safety of modular typechecking [Agrawal et al. 91, Bruce et al. 95, Boyland Castagna 97] We have designed Dubious, a simple core language supporting both symmetric multimethods and separately typechecked modules. We ....
....on all generic functions is deferred until link time, when all modules are present. This link time typechecking approach is used for typechecking previous languages with symmetric multimethods, including Kea [Mugridge et al. 91] Cecil [Chambers 95] ML [Bourdoncle Merz 97] and Tuple [Leavens Millstein 98] We refer to this global typechecking algorithm as System G. Appendix B.2 shows the extensions to the base static semantics for System G. We have proven this static semantics sound for Dubious, and our proof technique is sketched in appendix C. 2.2 Example Programming Idioms There are several ....
[Article contains additional citation context not shown here]
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.
....and less error prone, reporting possible ambiguities rather than silently resolving them in potentially unexpected ways. Symmetric multiple dispatch is used in Cecil, Dylan, Kea [Mugridge et al. 91] the l calculus [Castagna et al. 92, Castagna 97] ML [Bourdoncle Merz 97] and Tuple [Leavens Millstein 98] A major obstacle to adding symmetric multimethods to an existing statically typed programming language has been their modularity problem [Cook 90] independently developed modules, which typecheck in isolation, may cause type errors when combined. In contrast, object oriented languages without ....
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.
....in isolation but generate type errors when linked together. Previous work on statically typed multimethods has dealt with this problem in one of two ways. Some designs ignore the modularity issue altogether [Mugridge et al. 91, Chambers 95, Chambers Leavens 97, Bourdoncle Merz 97, Castagna 97, Leavens Millstein 98] forcing programs to be typechecked as a whole. Other designs sacrifice symmetric treatment of multimethod arguments and some kinds of extensibility in order to ensure the safety of modular typechecking [Agrawal et al. 91, Bruce et al. 95, Boyland Castagna 97] We have designed Dubious, a ....
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.
No context found.
Gary T. Leavens and Todd D. Millstein. Multiple dispatch as dispatch on tuples. In Proceedings of the OOPSLA '98 Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 374--387, Vancouver, British Columbia, Canada, 18--22 October 1998.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC