Results 1 - 10
of
12
MultiJava: Design rationale, compiler implementation, and applications
- ACM Trans. Program. Lang. Syst
, 2004
"... 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 the extensibility problem of object-oriented pro ..."
Abstract
-
Cited by 47 (5 self)
- Add to MetaCart
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 the extensibility problem of object-oriented programming languages, allowing the modular addition of both new types and new operations to an existing type hierarchy. This article illustrates and motivates the design of MultiJava and describes its modular static typechecking and modular compilation strategies. Although MultiJava extends Java, the key ideas of the language design are applicable to other object-oriented languages, such as C # and C++, and even, with some modifications, to functional languages such as ML. This article also discusses the variety of application domains in which MultiJava has been successfully used by others, including pervasive computing, graphical user interfaces, and compilers.
From patterns to frameworks to parallel programs
- UNIVERSITY OF ALBERTA
, 2002
"... This dissertation shows a new approach to writing object-oriented parallel programs based on design patterns, frameworks, and multiple layers of abstraction. ..."
Abstract
-
Cited by 42 (10 self)
- Add to MetaCart
This dissertation shows a new approach to writing object-oriented parallel programs based on design patterns, frameworks, and multiple layers of abstraction.
Type-checking multi-methods in ML (A modular approach)
- In The Ninth International Workshop on Foundations of Object-Oriented Languages, FOOL 9
, 2002
"... We propose a framework to describe type systems with type inference for ML-like languages. Our type systems are parameterized by the type algebras from which types are drawn. Type soundness is proved once-and-for-all under minimal assumptions on the type algebra. Observing that ML-Sub types form a t ..."
Abstract
-
Cited by 8 (1 self)
- Add to MetaCart
We propose a framework to describe type systems with type inference for ML-like languages. Our type systems are parameterized by the type algebras from which types are drawn. Type soundness is proved once-and-for-all under minimal assumptions on the type algebra. Observing that ML-Sub types form a type algebra, we propose a decidable type system for a language a la ML with type inference and polymorphic multi-methods, thus solving a long standing problem. Furthermore, we define a sub-language to express classes (constructors), multi-methods (operators), and their static and dynamic semantics in a consistent manner, independently of the base language.
Featherweight java with multi-methods
- PPPJ, volume 272 of ACM International Conference Proceeding Series
, 2007
"... Multi-methods (collections of overloaded methods associated to the same message, whose selection takes place dynamically instead of statically as in standard overloading) are a useful mechanism since they unleash the power of dynamic binding in object-oriented languages, so enhancing re-usability an ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
Multi-methods (collections of overloaded methods associated to the same message, whose selection takes place dynamically instead of statically as in standard overloading) are a useful mechanism since they unleash the power of dynamic binding in object-oriented languages, so enhancing re-usability and separation of responsibilities. However, many mainstream languages, such as, e.g., Java, do not provide it, resorting to only static overloading. In this paper we propose an extension, we call FMJ (Featherweight Multi Java), of Featherweight Java with encapsulated multimethods thus providing dynamic overloading. The extension is conservative and type safe: both “message-not-understood ” and “message-ambiguous ” are statically ruled out. Our core language can be used as the formal basis for an actual implementation of dynamic overloading in Java-like languages.
Digging into the Visitor Pattern
- Proc. IEEE 16th Int. Conf. Software Engineering and Knowlege Engineering (SEKE’2004). IEEE, Los Alamitos
, 2004
"... In this paper we present an alternative to the VISITOR pattern, DYNAMIC DISPATCHER, that can be applied to extend existing software in a nonintrusive way, and which simulates covariant overriding of visit methods. It allows to express polymorphic operations through visitor classes in a more natural ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
In this paper we present an alternative to the VISITOR pattern, DYNAMIC DISPATCHER, that can be applied to extend existing software in a nonintrusive way, and which simulates covariant overriding of visit methods. It allows to express polymorphic operations through visitor classes in a more natural way than the original VISITOR pattern. Our solution DYNAMIC DISPATCHER can be applied without touching existing domain classes. Therefore, it is especially useful to extend frameworks and libraries. We have implemented DYNAMIC DISPATCHER as a small framework in Java and conducted performance measurements which show that the overhead is acceptable in most real world scenarios.
Translating double dispatch into single dispatch
- Electr. Notes Theor. Comput. Sci
, 2005
"... Goals of flexibility and re-usability in typed object-oriented languages suggest the requirement of double dispatch, i.e., the mechanism of dynamically selecting a method not only according to the run-time type of the receiver (single dispatch), but also to the run-time type of the argument. However ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
Goals of flexibility and re-usability in typed object-oriented languages suggest the requirement of double dispatch, i.e., the mechanism of dynamically selecting a method not only according to the run-time type of the receiver (single dispatch), but also to the run-time type of the argument. However, many mainstream languages, such as, e.g., C++ and Java, do not provide it, resorting to only single dispatch. In this paper we present a general technique for adding double dispatch as a type-safe language feature, so yielding dynamic overloading and covariant specialization of methods, without extending basic semantics. To this aim we introduce a toy core language, extended to a full form of (non encapsulated) multi methods. Then we define a translation algorithm from multi methods to the core language, that implements double dispatch by using only standard mechanisms of static overloading and single dispatch. As a main feature, our translation preserves type safety, it uses neither RTTI nor type downcasts and does not introduce crucial overhead during method selection.
Multiple Code Inheritance in Java
, 2003
"... single copies of this thesis and to lend or sell such copies for private, scholarly or scientific research purposes only. The author reserves all other publication and other rights in association with the copyright in the thesis, and except as herein before provided, neither the thesis nor any subst ..."
Abstract
- Add to MetaCart
single copies of this thesis and to lend or sell such copies for private, scholarly or scientific research purposes only. The author reserves all other publication and other rights in association with the copyright in the thesis, and except as herein before provided, neither the thesis nor any substantial portion thereof may be printed or otherwise reproduced in any material form whatever without the author’s prior written permission. Date:
A Simple Dispatch Technique for Pure Java Multi-Methods
"... In Java, method dispatch is done at runtime, by late-binding, with respect to the dynamic type of the only receiver object. Allowing late-binding on dynamic type of all arguments is usually considered desirable to simplify many programming designs and is known as multipolymorphism. ..."
Abstract
- Add to MetaCart
In Java, method dispatch is done at runtime, by late-binding, with respect to the dynamic type of the only receiver object. Allowing late-binding on dynamic type of all arguments is usually considered desirable to simplify many programming designs and is known as multipolymorphism.
Scheme in The Real World: A Case Study
- In International Lisp Conference 2003
, 2003
"... Scheme is the core technology in the back-end of the New Media Knowledge web site developed by LShift. This case study examines how we integrated Scheme into a commercial web development environment, and how we used unique features of Scheme to simplify and speed up development. ..."
Abstract
- Add to MetaCart
Scheme is the core technology in the back-end of the New Media Knowledge web site developed by LShift. This case study examines how we integrated Scheme into a commercial web development environment, and how we used unique features of Scheme to simplify and speed up development.
The Runabout ⋆
"... Abstract. This paper presents a variation of the visitor pattern which allows programmers to write visitor-like code in a concise way. The Runabout is a library extension that adds a limited form of multi-dispatch to Java. While the Runabout is not as expressive as a general multiple dispatching fac ..."
Abstract
- Add to MetaCart
Abstract. This paper presents a variation of the visitor pattern which allows programmers to write visitor-like code in a concise way. The Runabout is a library extension that adds a limited form of multi-dispatch to Java. While the Runabout is not as expressive as a general multiple dispatching facility, the Runabout can be significantly faster than existing implementations of multiple dispatch for Java, such as MultiJava. Unlike MultiJava, the Runabout does not require changes to the syntax and the compiler. This paper illustrates how to use the Runabout, details its implementation, and provides benchmarks comparing its performance with other approaches. Furthermore, the effect of an automatic static program transformation tool that translates bytecode using the Runabout to equivalent bytecode is evaluated. The tool uses double dispatch and runtime type checks to achieve the same semantics that the Runabout has. The performance comparisons on large benchmarks that make extensive use multiple dispatch show that using the Runabout does not result in a significant loss of performance for realistic applications and that, depending on the application and platform, small performance gains are also possible. 1

