|
ABSTRACT
Inheritance is well-known and accepted as a mechanism for reuse in object-oriented languages. Unfortunately, due to the coarse granularity of inheritance, it may be difficult to decompose an application into an optimal class hierarchy that maximizes software reuse. Existing schemes based on single inheritance, multiple inheritance, or mixins, all pose numerous problems for reuse. To overcome these problems we propose traits, pure units of reuse consisting only of methods. We develop a formal model of traits that establishes how traits can be composed, either to form other traits, or to form classes. We also outline an experimental validation in which we apply traits to refactor a nontrivial application into composable units.
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
|
|
| |
2
|
|
| |
3
|
Bak, L., Grarup, G. B. S., Griesemer, R., Griswold, D., and Hölzle, U. 2002. Mixins in Strongtalk. In ECOOP '02 Workshop on Inheritance.
|
 |
4
|
Kim Barrett , Bob Cassels , Paul Haahr , David A. Moon , Keith Playford , P. Tucker Withington, A monotonic superclass linearization for Dylan, Proceedings of the 11th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.69-82, October 06-10, 1996, San Jose, California, United States
|
 |
5
|
|
| |
6
|
|
| |
7
|
|
 |
8
|
Andrew P. Black , Nathanael Schärli , Stéphane Ducasse, Applying traits to the smalltalk collection classes, Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications, October 26-30, 2003, Anaheim, California, USA
|
| |
9
|
Bobrow, D. G. and Goldstein, I. P. 1980. Representing design alternatives. In Proceedings of the Conference on Artificial Intelligence and the Simulation of Behavior.
|
| |
10
|
Bobrow, D. G. and Winograd, T. 1977. An overview of KRL, a knowledge representation language. Cognitive Science 1, 1, 3--46.
|
 |
11
|
|
| |
12
|
Bouraqadi, N. 2004. Safe metaclass composition using mixin-based inheritance. J. Comput. Lang. Syst. Struct. 30, 1--2 (Apr.), 49--61.
|
 |
13
|
Noury M. N. Bouraqadi-Saâdani , Thomas Ledoux , Fred Rivard, Safe metaclass programming, Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.84-96, October 18-22, 1998, Vancouver, British Columbia, Canada
|
| |
14
|
|
 |
15
|
|
 |
16
|
Gilad Bracha , David Griswold, Strongtalk: typechecking Smalltalk in a production environment, Proceedings of the eighth annual conference on Object-oriented programming systems, languages, and applications, p.215-230, September 26-October 01, 1993, Washington, D.C., United States
|
| |
17
|
|
 |
18
|
|
| |
19
|
Cannon, H. I. 1982. Flavors: A non-hierarchical approach to object-oriented programming. Tech. rep., Symbolics Inc.
|
 |
20
|
|
 |
21
|
|
| |
22
|
Cook, S. 1987. OOPSLA '87 Panel P2: Varieties of inheritance. In OOPSLA '87 Addendum To The Proceedings. ACM Press, 35--40.
|
 |
23
|
|
 |
24
|
W. Cook , J. Palsberg, A denotational semantics of inheritance and its correctness, Conference proceedings on Object-oriented programming systems, languages and applications, p.433-443, October 02-06, 1989, New Orleans, Louisiana, United States
|
 |
25
|
William R. Cook, Interfaces and specifications for the Smalltalk-80 collection classes, conference proceedings on Object-oriented programming systems, languages, and applications, p.1-15, October 18-22, 1992, Vancouver, British Columbia, Canada
|
 |
26
|
|
| |
27
|
Danforth, S. and Forman, I. R. 1994. Derived metaclass in SOM. In Proceedings of TOOLS EUROPE '94. 63--73.
|
 |
28
|
R. Dixon , T. McKee , M. Vaughan , P. Schweizer, A fast method dispatcher for compiled languages with multiple inheritance, Conference proceedings on Object-oriented programming systems, languages and applications, p.211-214, October 02-06, 1989, New Orleans, Louisiana, United States
|
| |
29
|
Ducasse, S., Schärli, N., and Wuyts, R. 2005. Uniform and safe metaclass composition. J. Comput. Lang. Syst. Struct. 31, 3--4 (May), 143--164.
|
 |
30
|
R. Ducournau , M. Habib , M. Huchard , M. L. Mugnier, Monotonic conflict resolution mechanisms for inheritance, conference proceedings on Object-oriented programming systems, languages, and applications, p.16-24, October 18-22, 1992, Vancouver, British Columbia, Canada
|
 |
31
|
Dominic Duggan , Ching-Ching Techaubol, Modular mixin-based inheritance for application frameworks, Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, p.223-240, October 14-18, 2001, Tampa Bay, FL, USA
|
 |
32
|
|
 |
33
|
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]
|
| |
34
|
|
| |
35
|
|
| |
36
|
Goldstein, I. P. and Bobrow, D. G. 1980a. Descriptions for a programming environment. In Proceedings of the First Annual Conference of the National Association for Artificial Intelligence.
|
 |
37
|
|
| |
38
|
Goldstein, I. P. and Roberts, R. B. 1977. Nudge, a knowledge-based scheduling program. In Proceedings of the Fifth International Joint Conference on Artifical Intelligence. 257--263.
|
 |
39
|
|
| |
40
|
Guttag, J. V., Horning, J. J., and Wing, J. M. 1985. The Larch family of specification languages. IEEE Trans. Softw. Eng. 2, 5 (Sept.), 24--36.
|
 |
41
|
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
|
| |
42
|
|
 |
43
|
Joseph E. Hollingsworth , Lori Blankenship , Bruce W. Weide, Experience report: using RESOLVE/C++ for commercial software, Proceedings of the 8th ACM SIGSOFT international symposium on Foundations of software engineering: twenty-first century applications, p.11-19, November 06-10, 2000, San Diego, California, United States
|
 |
44
|
|
 |
45
|
|
 |
46
|
Dan Ingalls , Ted Kaehler , John Maloney , Scott Wallace , Alan Kay, Back to the future: the story of Squeak, a practical Smalltalk written in itself, Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.318-326, October 05-09, 1997, Atlanta, Georgia, United States
|
| |
47
|
|
| |
48
|
|
| |
49
|
|
| |
50
|
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
|
| |
51
|
Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C., Loingtier, J.-M., and Irwin, J. 1997. Aspect-Oriented Programming. In Proceedings of ECOOP '97, M. Aksit and S. Matsuoka, Eds. LNCS, vol. 1241. Springer-Verlag, Jyvaskyla, Finland, 220--242.
|
| |
52
|
|
| |
53
|
|
 |
54
|
|
| |
55
|
|
| |
56
|
Lienhard, A. 2004. Bootstrapping Traits. M.S. thesis, University of Bern.
|
 |
57
|
Ole Lehrmann Madsen , Boris Magnusson , Birger Mølier-Pedersen, Strong typing of object-oriented languages revisited, Proceedings of the European conference on object-oriented programming on Object-oriented programming systems, languages, and applications, p.140-150, September 1990, Ottawa, Canada
|
| |
58
|
Mens, T. and van Limberghen, M. 1996. Encapsulation and composition as orthogonal operators on mixins: A solution to multiple inheritance problems. Object Oriented Systems 3, 1, 1--30.
|
| |
59
|
|
| |
60
|
|
| |
61
|
|
| |
62
|
Mezini, M. 1997. Dynamic object evolution without name collisions. In Proceedings of ECOOP '97. Springer-Verlag, 190--219.
|
 |
63
|
Mira Mezini , Klaus Ostermann, Integrating independent components with on-demand remodularization, Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, November 04-08, 2002, Seattle, Washington, USA
|
| |
64
|
|
 |
65
|
|
| |
66
|
Moura, P. 2003. Logtalk. Ph.D. thesis, Universidade da Beira Interior.
|
| |
67
|
|
| |
68
|
Odersky, M., Altherr, P., Cremet, V., Emir, B., Maneth, S., Micheloud, S., Mihaylov, N., Schinz, M., Stenman, E., and Zenger, M. 2004. An overview of the Scala programming language. Tech. Rep. 64, école Polytechnique Fédérale de Lausanne, 1015 Lausanne, Switzerland.
|
 |
69
|
|
| |
70
|
|
| |
71
|
Rivard, F. 1997. évolution du comportement des objets dans les langages à classes réflexifs. Ph.D. thesis, Ecole des Mines de Nantes, Université de Nantes, France.
|
| |
72
|
Sakkinen, M. 1989. Disciplined inheritance. In Proceedings of ECOOP '89, S. Cook, Ed. Cambridge University Press, Nottingham, 39--56.
|
| |
73
|
Sakkinen, M. 1992. The darker side of C++ revisited. Structured Programming 13, 4, 155--177.
|
| |
74
|
Schärli, N. 2005. Traits---composing classes from behavioral building blocks. Ph.D. thesis, University of Berne.
|
| |
75
|
Schärli, N. and Black, A. P. 2003. A browser for incremental programming. Tech. Rep. CSE-03-008, OGI School of Science & Engineering, Beaverton, Oregon, USA. Apr.
|
| |
76
|
Schärli, N., Ducasse, S., Nierstrasz, O., and Black, A. 2003. Traits: Composable units of behavior. In Proceedings of ECOOP 2003 (European Conference on Object-Oriented Programming). LNCS, vol. 2743. Springer Verlag, 248--274.
|
| |
77
|
Schärli, N., Ducasse, S., Nierstrasz, O., and Wuyts, R. 2004. Composable encapsulation policies. In Proceedings of ECOOP 2004 (European Conference on Object-Oriented Programming). LNCS 3086. Springer Verlag, 26--50.
|
 |
78
|
|
| |
79
|
|
| |
80
|
|
| |
81
|
|
 |
82
|
|
| |
83
|
|
| |
84
|
Stefik, M. and Bobrow, D. G. 1985. Object-oriented programming: Themes and variations. The AI Magazine.
|
| |
85
|
|
| |
86
|
|
 |
87
|
Peter F. Sweeney , Joseph (Yossi) Gil, Space and time-efficient memory layout for multiple inheritance, Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.256-275, November 01-05, 1999, Denver, Colorado, United States
|
 |
88
|
|
 |
89
|
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]
|
| |
90
|
|
 |
91
|
David Ungar , Randall B. Smith, Self: The power of simplicity, Conference proceedings on Object-oriented programming systems, languages and applications, p.227-242, October 04-08, 1987, Orlando, Florida, United States
|
| |
92
|
|
 |
93
|
Michael VanHilst , David Notkin, Using role components in implement collaboration-based designs, Proceedings of the 11th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.359-369, October 06-10, 1996, San Jose, California, United States
|
| |
94
|
|
CITED BY 25
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
J. J. Hallett , Victor Luchangco , Sukyoung Ryu , Guy L. Steele, Jr., Integrating coercion with subtyping and multiple dispatch, Proceedings of the 2008 ACM symposium on Applied computing, March 16-20, 2008, Fortaleza, Ceara, Brazil
|
|
|
|
|
|
|
|
|
|
|
|
Alexandre Bergel , Stéphane Ducasse , Oscar Nierstrasz , Roel Wuyts, Stateful traits and their formalization, Computer Languages, Systems and Structures, v.34 n.2-3, p.83-108, July, 2008
|
|
|
Alexandre Bergel , Stéphane Ducasse , Colin Putney , Roel Wuyts, Creating sophisticated development tools with OmniBrowser, Computer Languages, Systems and Structures, v.34 n.2-3, p.109-129, July, 2008
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Niklaus Haldiman , Marcus Denker , Oscar Nierstrasz, Practical, pluggable types for a dynamic language, Computer Languages, Systems and Structures, v.35 n.1, p.48-62, April, 2009
|
|
|
|
|
|
|
|
|
|
|
|
|
|