|
ABSTRACT
Traits are basically mixins or interfaces but with method bodies. In languages that support traits, classes are composed out of traits. There are two main advantages with traits. Firstly, decomposing existing classes into traits from which they can be recomposed improves the factoring of hierarchies. Secondly it increases the library reuse potential by providing more reusable traits. Identifying traits and decomposing class hierarchies into traits is therefore an important and challenging task to facilitate maintainability and evolution. In this paper we present how we use Formal Concept Analysis to identify traits in inheritance hierarchies. Our approach is two-staged: first we identify within a hierarchy maximal groups of methods that have a set of classes in common, second we cluster cohesive groups of methods based on method invocations as potential traits. We applied our approach on two significant hierarchies and compare our results with the manual refactorization of the same code which was done by the authors of traits.
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. Arévalo. Understanding Behavioral Dependencies in Class Hierarchies using Concept Analysis. In Proceedings of LMO '03, pages 47--59. Hermes, Paris, Jan. 2003.
|
| |
2
|
A. Arfi, R. Godin, H. Mili, G. W. Mineau, and R. Missaoui. Generating the interface hierarchy of a class library. In Colloquium on Object Orientation in Databases and Software Engineering, pages 42--57, 1994.
|
| |
3
|
|
| |
4
|
|
 |
5
|
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
|
 |
6
|
|
| |
7
|
E. Casais. Automatic reorganization of object-oriented hierarchies: A case study. Object-Oriented Systems, 1(2):95--115, Dec. 1994.
|
 |
8
|
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
|
 |
9
|
|
| |
10
|
K. Fisher and J. Reppy. Statically typed traits. Technical Report TR-2003-13, University of Chicago, Department of Computer Science, Dec. 2003.
|
| |
11
|
The fortress language specification. research.sun.com/projects/plrg/fortress0618.pdf.
|
| |
12
|
|
| |
13
|
|
| |
14
|
|
| |
15
|
Robert Godin , Hafedh Mili , Guy W. Mineau , Rokia Missaoui , Amina Arfi , Thuy-Tien Chau, Design of class hierarchies based on concept (Galois) lattices, Theory and Practice of Object Systems, v.4 n.2, p.117-133, April 1998
[doi> 10.1002/(SICI)1096-9942(1998)4:2<117::AID-TAPO6>3.3.CO;2-I
]
|
| |
16
|
|
 |
17
|
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
|
 |
18
|
Ivan Moore, Automatic inheritance hierarchy restructuring and method refactoring, Proceedings of the 11th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.235-250, October 06-10, 1996, San Jose, California, United States
|
| |
19
|
Scala home page. http://lamp.epfl.ch/scala/.
|
| |
20
|
N. Schärli, S. Ducasse, O. Nierstrasz, and A. Black. Traits: Composable units of behavior. In Proceedings of ECOOP 2003, pages 248--274. Springer Verlag, July 2003.
|
| |
21
|
C. Smith and S. Drossopoulou. Chai: Typed traits in java. In Proceedings ECOOP 2005, 2005.
|
| |
22
|
G. Snelting and F. Tip. Reengineering Class Hierarchies using Concept Analysis. In ACM Trans. Programming Languages and Systems, 1998.
|
 |
23
|
Mirko Streckenbach , Gregor Snelting, Refactoring class hierarchies with KABA, Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, October 24-28, 2004, Vancouver, BC, Canada
|
| |
24
|
D. Taenzer, M. Ganti, and S. Podar. Problems in object-oriented software reuse. In S. Cook, editor, Proceedings of ECOOP '89, pages 25--38, Nottingham, July 1989. Cambridge University Press.
|
 |
25
|
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
|
| |
26
|
|
|