|
ABSTRACT
This paper introduces the expander, a new object-oriented (OO) programming language construct designed to support object adaptation. Expanders allow existing classes to be noninvasively updated with new methods, fields, and superinterfaces. Each client can customize its view of a class by explicitly importing any number of expanders. This view then applies to all instances of that class, including objects passed to the client from other components. A form of expander overriding allows expanders to interact naturally with OO-style inheritance.We describe the design, implementation, and evaluation of eJava, an extension to Java supporting expanders. We illustrate eJava's syntax and semantics through several examples. The statically scoped nature of expander usage allows for a modular static type system that prevents several important classes of errors. We describe this modular static type system informally, formalize eJava and its type system in an extension to Featherweight Java, and prove a type soundness theorem for the formalization. We also describe a modular compilation strategy for eJava, which we have implemented using the Polyglot extensible compiler framework. Finally, we illustrate the practical benefits of eJava by using this compiler in two experiments.
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
|
G. Baumgartner, M. Jansche, and K. Laufer. Half & Half: Multiple dispatch and retroactive abstraction for Java. Technical Report OSU-CISRC-5/01-TR08, Department of Computer and Information Science, The Ohio State University, revised March 2002.
|
| |
2
|
A. Bergel. Personal communication, Oct. 2005.
|
 |
3
|
Alexandre Bergel , Stéphane Ducasse , Oscar Nierstrasz, Classbox/J: controlling the scope of change in Java, Proceedings of the 20th annual ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, October 16-20, 2005, San Diego, CA, USA
|
| |
4
|
A. Bergel, S. Ducasse, and R. Wuyts. Classboxes: A minimal module model supporting local rebinding. In Proceedings of JMLC 2003 (Joint Modular Languages Conference), volume 2789 of LNCS, pages 122--131. Springer-Verlag, 2003. Best Award Paper.
|
 |
5
|
|
 |
6
|
|
 |
7
|
Curtis Clifton , Todd Millstein , Gary T. Leavens , Craig Chambers, MultiJava: Design rationale, compiler implementation, and applications, ACM Transactions on Programming Languages and Systems (TOPLAS), v.28 n.3, p.517-575, May 2006
[doi> 10.1145/1133651.1133655]
|
| |
8
|
Eclipse home page. http://www.eclipse.org.
|
| |
9
|
Eclipse Bug System home page. https://bugs.eclipse.org/bugs.
|
| |
10
|
|
| |
11
|
E. Ernst. Higher-order hierarchies. In Proceedings of the European Conference on Object-Oriented Programming, LNCS, Darmstadt, Germany, July 2003. Springer Verlag.
|
 |
12
|
|
 |
13
|
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]
|
| |
14
|
|
| |
15
|
|
| |
16
|
|
 |
17
|
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
|
 |
18
|
|
| |
19
|
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
|
 |
20
|
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
|
 |
21
|
Nathaniel Nystrom , Stephen Chong , Andrew C. Myers, Scalable extensibility via nested inheritance, Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, October 24-28, 2004, Vancouver, BC, Canada
|
| |
22
|
N. Nystrom, M. R. Clarkson, and A. C. Myers. Polyglot: An extensible compiler framework for Java. In Proceedings of CC 2003: 12'th International Conference on Compiler Construction. Springer-Verlag, Apr. 2003.
|
 |
23
|
Martin Odersky , Matthias Zenger, Scalable component abstractions, Proceedings of the 20th annual ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, October 16-20, 2005, San Diego, CA, USA
|
| |
24
|
|
 |
25
|
|
| |
26
|
Polyglot for Java 1.5 home page. http://www.sable.mcgill.ca/~jlhotak/polyglot-custom.
|
| |
27
|
The Scala language home page. http://scala.epfl.ch.
|
| |
28
|
N. Schärli, S. Ducasse, O. Nierstrasz, and A. Black. Traits: Composable units of behavior. In Proceedings ECOOP 2003 (European Conference on Object-Oriented Programming), volume 2743 of LNCS, pages 248--274. Springer Verlag, July 2003.
|
| |
29
|
|
| |
30
|
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
|
| |
31
|
|
| |
32
|
M. Torgersen. Virtual types are statically safe. In International Workshop on Foundations of Object-Oriented Languages (FOOL), informal proceedings, Jan. 1998.
|
| |
33
|
A. Warth and T. Millstein. Featherweight eJava. Technical Report CSD-TR-060013, UCLA Computer Science Department, 2006. ftp://ftp.cs.ucla.edu/tech-report/2006-reports/060013.pdf.
|
| |
34
|
|
|