This is a refreshing paper on ten open-source systems and their use of “inheritance” programing concepts. Computer languages have evolved with the type-safe extensibility concept of inheritance, which is embodied in object-oriented (OO) languages. The two dominate OO patterns are analyzed: (1) type inheritance and (2) module reuse (the authors’ terms). Results are shown through innovative graphic feedback charts, showing modifications over the life of the system. The authors also include historical approaches to inheritance using the Liskov substitution principle (LSP), while discussing insight from OO giants like Barbara Liskov, Bertrand Meyer, Grady Booch, and Gamma et al.’s “patterns” work.
The paper analyzes ten open-source Java systems, with a total of 665 inheritance hierarchies across 262 versions over time. This includes projects like Ant, ArgoUML, JGraph, and FreeMind across ten domains. The analysis looks at the depth of subtree hierarchies, and especially how they changed over time from shallow to deep (sometimes 39 levels). This led to identifying design qualities of these “complex, multi-branching, ‘subtree’ inheritance hierarchies.” They provide a nice framing of the issues faced by complex frameworks and systems.
Four main system attributes are analyzed: (1) change in size, (2) hierarchy age, (3) hierarchy shape, and (4) stability of shape. The study’s instrumentation is interesting as they used Eclipse integrated development environment (IDE) tools to look at size, depth of hierarchy, age of hierarchy, shape (“fan,” “line,” “subtree,” “branch”), and the stability of the hierarchy through change. Using visual hierarchy tools highlights how the size of hierarchies evolved as they were refactored or extended.
Ant, ArgoUL, and FreeCol have their subtree use analyzed, showing interesting class cluster diagrams and those relationships over time. For example, Ant evolved from six subtrees, but only three of those survived more than one version. Other characteristics, like a shape morphing from a fan shape to a subtree shape, are classified.
Their high-level goal “is to improve the guidance relating to object-oriented inheritance hierarchy design.” They mainly want to identify how inheritance features change over the lifetime of a system. The final section tries to answer this by classifying the different effects of type inheritance versus composition after analyzing hundreds of classes.
The authors do recognize the issue with only being able to examine open-source systems, so they are concerned about the validity of their results. It seems their analysis could still help end-user application development, which uses large-scale frameworks (such as Apple iOS libraries). These frameworks expose hundreds of inheritance features and composition tools (protocols and so on). While the guts are hidden, the applications are still very complex and exhibit all the OO design challenges (that is, “fragile base classes”). The presented visual tools could help identify future issues and characterize the shape and complexity of their application.
It’s also interesting that a recent issue of CACM included Niklaus Wirth’s discussion of the Pascal language at age 50 . Object-oriented and especially inheritance were the natural progressions from type-safe Pascal, which eventually included a type-safe procedure pointer (similar to today’s OO mix-in or protocol inheritance).