Understanding class hierarchies using concept analysis

A new method is presented for analyzing and reengineering class hierarchies. In our approach, a class hierarchy is processed along with a set of applications that use it, and a fine-grained analysis of the access and subtype relationships between objects, variables, and class members is performed. The result of this analysis is again a class hierarchy, which is guaranteed to be behaviorally equivalent to the original hierarchy, but in which each object only contains the members that are required. Our method is semantically well-founded in concept analysis: the new class hierarchy is a minimal and maximally factorized concept lattice that reflects the access and subtype relationships between variables, objects and class members. The method is primarily intended as a tool for finding imperfections in the design of class hierarchies, and can be used as the basis for tools that largely automate the process of reengineering such hierachies. The method can also be used as a space-optimizing source-to-source transformation that removes redundant fields from objects. A prototype implementation for Java has been constructed, and used to conduct several case studies. Our results demonstrate that the method can provide valuable insights into the usage of a class hierarchy in a specific context, and lead to useful restructuring proposals.

[1]  Rokia Missaoui,et al.  Design of Class Hierarchies Based on Concept (Galois) Lattices , 1998, Theory Pract. Object Syst..

[2]  Frank Tip,et al.  Class hierarchy specialization , 1997, OOPSLA '97.

[3]  John Wiley,et al.  Maximizing object reuse with a biological metaphor , 1997 .

[4]  Gregor Snelting,et al.  Reengineering of configurations based on mathematical concept analysis , 1996, TSEM.

[5]  Jonathan G. Rossie,et al.  An algebraic semantics of subobjects , 1995, OOPSLA.

[6]  Ralph E. Johnson,et al.  Creating abstract superclasses by refactoring , 1993, CSC '93.

[7]  Brian A. Davey,et al.  An Introduction to Lattices and Order , 1989 .

[8]  Frank Tip,et al.  Practical experience with an application extractor for Java , 1999, OOPSLA '99.

[9]  Gregor Snelting,et al.  Concept analysis—a new framework for program understanding , 1998, PASTE '98.

[10]  Manuvir Das,et al.  Unification-based pointer analysis with directional assignments , 2000, PLDI '00.

[11]  Thomas Ball,et al.  The concept of dynamic analysis , 1999, ESEC/FSE-7.

[12]  Frank Tip,et al.  Reengineering class hierarchies using concept analysis , 1998, SIGSOFT '98/FSE-6.

[13]  David F. Bacon,et al.  Fast static analysis of C++ virtual function calls , 1996, OOPSLA '96.

[14]  Thomas W. Reps,et al.  Identifying modules via concept analysis , 1997, 1997 Proceedings International Conference on Software Maintenance.

[15]  Frank Tip,et al.  A study of dead data members in C++ applications , 1998, PLDI.

[16]  Jong-Deok Choi,et al.  Efficient and precise modeling of exceptions for the analysis of Java programs , 1999, PASTE '99.

[17]  Gregor Snelting,et al.  On the inference of configuration structures from source code , 1994, Proceedings of 16th International Conference on Software Engineering.

[18]  Jong-Deok Choi,et al.  Slicing class hierarchies in C++ , 1996, OOPSLA '96.

[19]  Hafedh Mili,et al.  Building and maintaining analysis-level class hierarchies using Galois Lattices , 1993, OOPSLA '93.

[20]  Gregor Snelting,et al.  Assessing Modular Structure of Legacy Code Based on Mathematical Concept Analysis , 1997, Proceedings of the (19th) International Conference on Software Engineering.

[21]  Barbara G. Ryder,et al.  Data-Flow-Based Virtual Function Resolution , 1996, SAS.

[22]  Hernán Astudillo Maximizing Object Reuse with a Biological Metaphor , 1997, Theory Pract. Object Syst..

[23]  William G. Griswold,et al.  A Comparative Study of Two Whole Program Slicers for C , 2001 .

[24]  William Pugh,et al.  Constraint-based array dependence analysis , 1998, TOPL.

[25]  Frank Tip,et al.  Extracting library-based object-oriented applications , 2000, SIGSOFT '00/FSE-8.

[26]  Christian Lindig,et al.  Algorithmen zur Begriffsanalyse und ihre Anwendung bei Softwarebibliotheken , 1999 .

[27]  Bernhard Ganter,et al.  Formal Concept Analysis: Mathematical Foundations , 1998 .

[28]  Jong-Deok Choi,et al.  Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side effects , 1993, POPL '93.

[29]  Barbara G. Ryder,et al.  Practical Points-to Analysis for Programs Built with Libraries , 2000 .

[30]  Michael Hind,et al.  Which pointer analysis should I use? , 2000, ISSTA '00.

[31]  Ivan Moore,et al.  Automatic inheritance hierarchy restructuring and method refactoring , 1996, OOPSLA '96.

[32]  David Ungar,et al.  Sifting out the gold: delivering compact applications from an exploratory object-oriented programming environment , 1994, OOPSLA '94.

[33]  Susan Horwitz,et al.  Fast and accurate flow-insensitive points-to analysis , 1997, POPL '97.

[34]  Bjarne Steensgaard,et al.  Points-to analysis in almost linear time , 1996, POPL '96.

[35]  William F. Opdyke,et al.  Refactoring object-oriented frameworks , 1992 .