ACM Home Page
Please provide us with feedback. Feedback
A trait based re-engineering technique for Java hierarchies
Full text PdfPdf (689 KB)
Source
ACM International Conference Proceeding Series; Vol. 347 archive
Proceedings of the 6th international symposium on Principles and practice of programming in Java table of contents
Modena, Italy
SESSION: Class hierarchies & Java libraries table of contents
Pages 149-158  
Year of Publication: 2008
ISBN:978-1-60558-223-8
Authors
Lorenzo Bettini  Università di Torino
Viviana Bono  Università di Torino
Marco Naddeo  Università di Torino
Sponsor
ACM: Association for Computing Machinery
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 3,   Downloads (12 Months): 35,   Citation Count: 0
Additional Information:

abstract   references   index terms   collaborative colleagues  

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

ABSTRACT

Traits are pure behavior components introduced in the Smalltalk community in order to integrate the traditional class inheritance with a composition mechanism: a class is composed by traits and inherits from superclasses. This offers the advantage of promoting code reuse. In this paper, we tackle the problem of re-engineering a Java hierarchy into traits, by adapting to a Java setting a methodology developed by Lienhard, Ducasse, and Arévalo for a Smalltalk setting, based on Formal Concept Analysis. We illustrate the approach by applying it to the Java input stream library. We also obtain two by-products: (i) we identify clearly some workarounds that programmers must exploit in order to overcome some of the limitations of Java single inheritance; (ii) we single out some features a Java with traits might include, as none of the proposals in the literature in this sense has taken the lead yet.


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
The Fortress language specification. http://research.sun.com/projects/plrg/fortress.pdf.
 
2
 
3
A. Black, S. Ducasse, O. Nierstrasz, D. Pollet, D. Cassou, and M. Denker. Squeak by Example. Square Bracket Associates, 2007.
 
4
5
 
6
V. Bono, F. Damiani, and E. Giachino. Separating Type, Behavior, and State to Achieve Very Fine-grained Reuse. In Electronic proceedings of FTfJP '07 (http://www.cs.ru.nl/ftfjp/), 2007.
 
7
V. Bono, F. Damiani, and E. Giachino. On traits and types in a Java-like setting. In IFIP TCS 2008 (Track B). Springer, 2008. Availble at the url http://www.di.unito.it/~damiani/papers/tcs08B.pdf.
 
8
9
 
10
G. Bracha and D. Griswold. Extending Smalltalk with mixins. In OOPSLA96 Workshop on Extending the Smalltalk Language, 1996. http://www.javasoft.com/people/gbracha/mwp.html.
11
12
 
13
S. Ducasse, N. Schärli, and R. Wuyts. Uniform and safe metaclass composition. Computer Languages, Systems and Structures, 31(3--4):143--164, 2005.
 
14
K. Fisher and J. Reppy. Statically typed traits. Technical Report TR-2003-13, University of Chicago, Department of Computer Science, Dec. 2003.
 
15
K. Fisher and J. Reppy. A typed calculus of traits. In Electronic proceedings of FOOL 2004, 2004.
16
 
17
18
19
 
20
C. Lindig. Fast Concept Analysis. PhD thesis, Harvard University, Division of Engineering and Applied Sciences, Cambridge, Massachusetts, 2002.
21
 
22
 
23
M. Naddeo. Un possibile approccio alla soluzione di alcuni problemi legati all'ereditarietà singola nei linguaggi object-oriented. Laurea triennale in informatica, Università degli Studi di Torino, 2008.
 
24
O. Nierstrasz, S. Ducasse, and N. Schärli. Flattening traits. JOT (www.jot.fm), 5(4):129--148, 2006.
 
25
M. Odersky. The Scala Language Specification, version 2.4. Technical report, Programming Methods Laboratory, EPFL, Switzerland, 2007.
26
 
27
J. Reppy and A. Turon. A foundation for trait-based metaprogramming. In Electronic proceedings of FOOL/WOOD 2006, 2006.
 
28
J. Reppy and A. Turon. Metaprogramming with traits. In ECOOP 2007, volume 4609 of LNCS, pages 373--398. Springer, 2007.
 
29
N. Schärli, S. Ducasse, O. Nierstrasz, and A. Black. Traits: Composable units of behavior. In ECOOP 2003, volume 2743 of LNCS, pages 248--274. Springer, 2003.
 
30
 
31
C. Smith and S. Drossopoulou. Chai: Traits for Java-like languages. In ECOOP '05, LNCS 3586, pages 453--478. Springer, 2005.
 
32

Collaborative Colleagues:
Lorenzo Bettini: colleagues
Viviana Bono: colleagues
Marco Naddeo: colleagues