ACM Home Page
Please provide us with feedback. Feedback
Traits: A mechanism for fine-grained reuse
Full text PdfPdf (1.02 MB)
Source ACM Transactions on Programming Languages and Systems (TOPLAS) archive
Volume 28 ,  Issue 2  (March 2006) table of contents
Pages: 331 - 388  
Year of Publication: 2006
ISSN:0164-0925
Authors
Stéphane Ducasse  University of Berne and LISTIC, University of Savoie, Annecy Cedex, France
Oscar Nierstrasz  University of Berne, Berne, Switzerland
Nathanael Schärli  University of Berne, Zürich, Switzerland
Roel Wuyts  Université Libre de Bruxelles, Belgium
Andrew P. Black  Portland State University, Portland, Oregon
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 24,   Downloads (12 Months): 169,   Citation Count: 25
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1119479.1119483
What is a DOI?

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
5
 
6
 
7
8
 
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
 
14
15
16
 
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
25
26
 
27
Danforth, S. and Forman, I. R. 1994. Derived metaclass in SOM. In Proceedings of TOOLS EUROPE '94. 63--73.
28
 
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
31
32
33
 
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
 
42
43
44
45
46
 
47
 
48
 
49
 
50
 
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
 
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
 
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
88
89
 
90
91
 
92
93
 
94

CITED BY  25

Collaborative Colleagues:
Stéphane Ducasse: colleagues
Oscar Nierstrasz: colleagues
Nathanael Schärli: colleagues
Roel Wuyts: colleagues
Andrew P. Black: colleagues