|
ABSTRACT
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. MultiJava allows users to express desired programming idioms in a way that is declarative and supports static typechecking, in contrast to the tedious and type-unsafe workarounds required in Java. MultiJava also provides opportunities for new kinds of extensibility that are not easily available in Java.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
 |
1
|
Rakesh Agrawal , Linda G. Demichiel , Bruce G. Lindsay, Static type checking of multi-methods, Conference proceedings on Object-oriented programming systems, languages, and applications, p.113-128, October 06-11, 1991, Phoenix, Arizona, United States
|
| |
2
|
|
| |
3
|
|
| |
4
|
Larry Arnstein , Chia-Yang Hung , Robert Franza , Qing Hong Zhou , Gaetano Borriello , Sunny Consolvo , Jing Su, Labscape: A Smart Environment for the Cell Biology Laboratory, IEEE Pervasive Computing, v.1 n.3, p.13-21, July 2002
[doi> 10.1109/MPRV.2002.1037717]
|
| |
5
|
AspectJ Team. 2004. The AspectJ programming guide. Available online from http://eclipse.org/aspectj.
|
| |
6
|
Baumgartner, G., Jansche, M., and Läufer, K. 2002. Half & Half: Multiple dispatch and retroactive abstraction for Java. Tech. rep. OSU-CISRC-5/01-TR08. Department of Computer Science, The Ohio State University. Columbus, OH.
|
| |
7
|
Bonniot, D. 2003. Using kinds to type partially-polymorphic methods. In Electronic Notes in Theoretical Computer Science, G. Barthe and P. Thiemann, Eds. Vol. 75. Elsevier, New York, NY.
|
| |
8
|
Bonniot, D. and Keller, B. 2003. The Nice user's manual. Available online at http://nice.sourceforge.net.
|
 |
9
|
|
 |
10
|
John Boyland , Giuseppe Castagna, Parasitic methods: an implementation of multi-methods for Java, Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.66-76, October 05-09, 1997, Atlanta, Georgia, United States
|
 |
11
|
|
| |
12
|
Bridges, S., Figueroa, M., Hsu, D., and Diorio, C. 2003. Field-programmable learning arrays. In Advances in Neural Information Processing Systems 15. MIT Press, Cambridge, MA.
|
| |
13
|
|
| |
14
|
|
 |
15
|
|
| |
16
|
|
| |
17
|
|
| |
18
|
|
| |
19
|
Chambers, C. 1997. The Cecil language specification and rationale: Version 2.1. Available online from http://www.cs.washington.edu/research/projects/cecil/www/pubs/cecil-spec.html.
|
| |
20
|
Chambers, C. 1998. Towards Diesel, a next-generation OO language after Cecil. Invited talk. In Proceedings of the Fifth Workshop of Foundations of Object-Oriented Languages (San Diego, CA).
|
 |
21
|
Craig Chambers , Weimin Chen, Efficient multiple and predicated dispatching, Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.238-255, November 01-05, 1999, Denver, Colorado, United States
|
 |
22
|
|
| |
23
|
Clifton, C. 2001. MultiJava: Design, implementation, and evaluation of a Java-compatible language supporting modular open classes and symmetric multiple dispatch. Tech. Rep. 01-10. Department of Computer Science, Iowa State University, Ames, IA. The author's masters thesis.
|
 |
24
|
Curtis Clifton , Gary T. Leavens , Craig Chambers , Todd Millstein, MultiJava: modular open classes and symmetric multiple dispatch for Java, Proceedings of the 15th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.130-145, October 2000, Minneapolis, Minnesota, United States
|
| |
25
|
|
| |
26
|
|
 |
27
|
|
| |
28
|
Dutchyn, C., Szafron, D., Bromling, S., and Holst, W. 2001. Multi-dispatch in the Java virtual machine: Design and implementation. In Sixth Conference on Object-Oriented Technologies and Systems (COOTS). USENIX, Berkeley, CA.
|
| |
29
|
|
 |
30
|
|
| |
31
|
Feinberg, N., Keene, S. E., Mathews, R. O., and Withington., P. T. 1997. The Dylan Programming Book. Addison-Wesley Longman, Reading, MA.
|
 |
32
|
|
 |
33
|
|
 |
34
|
Matthew Flatt , Shriram Krishnamurthi , Matthias Felleisen, Classes and mixins, Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.171-183, January 19-21, 1998, San Diego, California, United States
[doi> 10.1145/268946.268961]
|
| |
35
|
Forax, R., Duris, E., and Roussel, G. 2000. Java multi-method framework. In Proceedings of the International Conference on Technology of Object-Oriented Languages and Systems (TOOLS '00), Sydney, Australia. IEEE Computer Society Press, Los Alamitos, CA.
|
| |
36
|
|
| |
37
|
|
| |
38
|
Garrigue, J. 2000. Code reuse through polymorphic variants. In Proceedings of the Workshop on Foundations of Software Engineering, Sassaguri, Japan. Available online from http://wwwfun.kurims.kyoto-u.ac.jp/~garrigue/papers/fose2000.html.
|
| |
39
|
|
| |
40
|
James Gosling , Bill Joy , Guy Steele , Gilad Bracha, Java Language Specification, Second Edition: The Java Series, Addison-Wesley Longman Publishing Co., Inc., Boston, MA, 2000
|
| |
41
|
Grimm, R., Davis, J., Lemar, E., MacBeth, A., Swanson, S., Gribble, S., Anderson, T., Bershad, B., Borriello, G., and Wetherall, D. 2001. Programming for pervasive computing environments. Tech. Rep. UW-CSE-01-06-01. Department of Computer Science and Engineering, University of Washington, Seattle, WA.
|
| |
42
|
Grothoff, C. 2003. Walkabout revisited: The Runabout. In ECOOP 2003---Object-Oriented Programming, 17th European Conference, Darmstadt, Germany, Proceedings, L. Cardelli, Ed. Lecture Notes in Computer Science, vol. 2743. Springer-Verlag, New York, NY, 103--125.
|
 |
43
|
William Harrison , Harold Ossher, Subject-oriented programming: a critique of pure objects, Proceedings of the eighth annual conference on Object-oriented programming systems, languages, and applications, p.411-428, September 26-October 01, 1993, Washington, D.C., United States
|
| |
44
|
|
 |
45
|
|
| |
46
|
|
| |
47
|
Gregor Kiczales , Erik Hilsdale , Jim Hugunin , Mik Kersten , Jeffrey Palm , William G. Griswold, An Overview of AspectJ, Proceedings of the 15th European Conference on Object-Oriented Programming, p.327-353, June 18-22, 2001
|
| |
48
|
Kiczales, G., Lamping, J., Menhdhekar, A., Maeda, C., Lopes, C., Loingtier, J.-M., and Irwin, J. 1997. Aspect-oriented programming. In ECOOP '97---Object-Oriented Programming 11th European Conference, Jyväskylä, Finland, Proceedings, M. Akşit and S. Matsuoka, Eds. Lecture Notes in Computer Science, vol. 1241. Springer-Verlag, New York, NY, 220--242.
|
| |
49
|
Kopi 2004. Kopi project home page. Go online to http://www.dms.at/kopi.
|
| |
50
|
|
 |
51
|
Gary T. Leavens , Todd D. Millstein, Multiple dispatch as dispatch on Tuples, Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.374-387, October 18-22, 1998, Vancouver, British Columbia, Canada
|
 |
52
|
Keunwoo Lee , Anthony LaMarca , Craig Chambers, HydroJ: object-oriented pattern matching for evolvable distributed systems, Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications, October 26-30, 2003, Anaheim, California, USA
|
 |
53
|
Sheng Liang , Gilad Bracha, Dynamic class loading in the Java virtual machine, Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.36-44, October 18-22, 1998, Vancouver, British Columbia, Canada
|
| |
54
|
|
 |
55
|
Vassily Litvinov, Contraint-based polymorphism in Cecil: towards a practical and static type system, Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.388-411, October 18-22, 1998, Vancouver, British Columbia, Canada
|
 |
56
|
|
 |
57
|
Sean McDirmid , Matthew Flatt , Wilson C. Hsieh, Jiazzi: new-age components for old-fasioned Java, Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, p.211-222, October 14-18, 2001, Tampa Bay, FL, USA
|
| |
58
|
|
 |
59
|
Todd Millstein, Practical predicate dispatch, Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, October 24-28, 2004, Vancouver, BC, Canada
|
 |
60
|
Todd Millstein , Colin Bleckner , Craig Chambers, Modular typechecking for hierarchically extensible datatypes and functions, Proceedings of the seventh ACM SIGPLAN international conference on Functional programming, p.110-122, October 04-06, 2002, Pittsburgh, PA, USA
|
| |
61
|
Millstein, T. and Chambers, C. 2002. Modular statically typed multimethods. Inform. Computat. 175, 1 (May), 76--118.
|
 |
62
|
Todd Millstein , Mark Reay , Craig Chambers, Relaxed MultiJava: balancing extensibility and modular typechecking, Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications, October 26-30, 2003, Anaheim, California, USA
|
| |
63
|
|
| |
64
|
|
| |
65
|
Nystrom, N., Clarkson, M. R., and Myers, A. C. 2003. Polyglot: An extensible compiler framework for java. In Compiler Construction: 12'th International Conference, CC 2003. Vol. 2622. Springer-Verlag, New York, NY, 138--152.
|
| |
66
|
Odersky, M., Cremet, V., Röckl, C., and Zenger, M. 2003. A nominal theory of objects with dependent types. In ECOOP 2003---Object-Oriented Programming, 17th European Conference, Darmstadt, Germany, Proceedings, L. Cardelli, Ed. Lecture Notes in Computer Science, vol. 2743. Springer-Verlag, New York, NY, 201--224.
|
 |
67
|
|
 |
68
|
|
| |
69
|
|
| |
70
|
|
 |
71
|
|
| |
72
|
|
| |
73
|
Matthai Philipose , Kenneth P. Fishkin , Mike Perkowitz , Donald J. Patterson , Dieter Fox , Henry Kautz , Dirk Hahnel, Inferring Activities from Interactions with Objects, IEEE Pervasive Computing, v.3 n.4, p.50-57, October 2004
[doi> 10.1109/MPRV.2004.7]
|
| |
74
|
Rain 2004. Rain home page. Go online to http://seattleweb.intel_research.net/projects/rain.
|
| |
75
|
Reynolds, J. C. 1975. User-defined types and procedural data structures as complementary approaches to type abstraction. In New Directions in Algorithmic Languages, S. A. Schuman, Ed. INRIA, Rocquencourt, France, 157--168.
|
| |
76
|
|
| |
77
|
|
| |
78
|
|
| |
79
|
|
 |
80
|
Peri Tarr , Harold Ossher , William Harrison , Stanley M. Sutton, Jr., N degrees of separation: multi-dimensional separation of concerns, Proceedings of the 21st international conference on Software engineering, p.107-119, May 16-22, 1999, Los Angeles, California, United States
[doi> 10.1145/302405.302457]
|
| |
81
|
Torgersen, M. 2004. The expression problem revisited: Four new solutions using generics. In ECOOP 2004---Object-Oriented Programming, 18th European Conference, Oslo, Norway, Proceedings, M. Odersky, Ed. Lecture Notes in Computer Science, vol. 3086. Springer-Verlag, New York, NY, 123--143.
|
| |
82
|
|
| |
83
|
Vlissides, J. 1999. Visitor in frameworks. C++ Rep. 11, 10 (Nov./Dec.), 40--46.
|
 |
84
|
|
| |
85
|
Zenger, M. and Odersky, M. 2005. Independently extensible solutions to the expression problem. In Proceedings of the 12th International Workshop on Foundations of Object-Oriented Languages (FOOL 12, Long Beach, CA). ACM Press, New York, NY.
|
CITED BY 12
|
|
|
|
|
Eric Allen , J. J. Hallett , Victor Luchangco , Sukyoung Ryu , Guy L. Steele, Jr., Modular multiple dispatch with multiple inheritance, Proceedings of the 2007 ACM symposium on Applied computing, March 11-15, 2007, Seoul, Korea
|
|
|
|
|
|
D. Ancona , C. Anderson , F. Damiani , S. Drossopoulou , P. Giannini , E. Zucca, A provenly correct translation of Fickle into Java, ACM Transactions on Programming Languages and Systems (TOPLAS), v.29 n.2, p.13-es, April 2007
|
|
|
|
|
|
|
|
|
Davide Ancona , Massimo Ancona , Antonio Cuni , Nicholas D. Matsakis, RPython: a step towards reconciling dynamically and statically typed OO languages, Proceedings of the 2007 symposium on Dynamic languages, October 22-22, 2007, Montreal, Quebec, Canada
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
INDEX TERMS
Primary Classification:
D.
Software
D.1
PROGRAMMING TECHNIQUES
D.1.5
Object-oriented Programming
Additional Classification:
D.
Software
D.3
PROGRAMMING LANGUAGES
D.3.2
Language Classifications
Subjects:
Object-oriented languages
D.3.3
Language Constructs and Features
Subjects:
Abstract data types;
Patterns;
Classes and objects;
Inheritance;
Modules, packages;
Control structures;
Procedures, functions, and subroutines
D.3.4
Processors
Subjects:
Compilers
D.3.m
Miscellaneous
General Terms:
Design,
Languages
Keywords:
Java language,
MultiJava language,
Open classes,
augmenting method problem,
binary method problem,
encapsulation,
expression problem,
extensible classes,
extensible external methods,
external methods,
generic functions,
inheritance,
method families,
modularity,
multimethods,
multiple dispatch,
object-oriented programming languages,
open objects,
separate compilation,
single dispatch,
static typechecking,
subtyping
|