2008 · 10 citations · 17 references
ComputingComputer ScienceFormal MethodsProgramming LanguagesSoftware EngineeringObject-oriented DesignObject-oriented ProgrammingSoftware ArchitectureSoftware ConstructionSoftware DesignType SystemsCode ReuseCompositionConcept AnalysisFormal Concept AnalysisHierarchyInheritance HierarchiesInheritance ModelingObject-oriented Language Design
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.
17
Information and Software Technology · 1992 · 994 citations
Gilad Bracha, William R. Cook · 1990 · 811 citations
Engineering, Systems Engineering, Knowledge Representation +13
Matthew Flatt, Shriram Krishnamurthi, Matthias Felleisen · 1998 · 491 citations · Full text
Dan Ingalls, Ted Kaehler, John Maloney et al. · 1997 · 457 citations · Full text
Sté́phane Ducasse, Oscar Nierstrasz, Nathanael Schärli et al. · ACM Transactions on Programming Languages and Systems · 2006 · 275 citations · Full text