A reverse engineering tool for precise class diagrams

Developers use class diagrams to describe the architecture of their programs intensively. Class diagrams represent the structure and global behaviour of programs. They show the programs classes and interfaces and their relationships of inheritance, instantiation, use, association, aggregation and composition. Class diagrams could provide useful data during programs maintenance. However, they often are obsolete and imprecise: They do not reflect the real implementation and behaviour of programs. We propose a reverse-engineering tool suite, Ptidej, to build precise class diagrams from Java programs, with respect to their implementation and behaviour. We describe static and dynamic models of Java programs and algorithms to analyse these models and to build class diagrams. In particular, we detail algorithms to infer use, association, aggregation, and composition relationships, because these relationships do not have precise definitions. We show that class diagrams obtained semi-automatically are similar to those obtained manually and more precise than those provided usually. (A demonstration applet of the Ptidej tool suite is provided also. The latest version of the Ptidej tool suite is available at www.yann-gael.gueheneuc.net/Work/.)

[1]  Franco Civello,et al.  Roles for composite objects in object-oriented analysis and design , 1993, OOPSLA '93.

[2]  Jochen Seemann,et al.  Extending the Sugiyama Algorithm for Drawing UML Class Diagrams: Towards Automatic Layout of Object-Oriented Software Diagrams , 1997, GD.

[3]  Giuliano Antoniol,et al.  Design pattern recovery in object-oriented software , 1998, Proceedings. 6th International Workshop on Program Comprehension. IWPC'98 (Cat. No.98TB100242).

[4]  Shigeru Chiba Javassist - A Reflection-based Programming Wizard for Java , 1998 .

[5]  Brian Henderson-Sellers,et al.  A Survey of UML's Aggregation and Composition Relationships , 1999, Obj. Logiciel Base données Réseaux.

[6]  Daniel Jackson,et al.  Lightweight extraction of object models from bytecode , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[7]  Jeffrey L. Korn,et al.  Chava: reverse engineering and tracking of Java applets , 1999, Sixth Working Conference on Reverse Engineering (Cat. No.PR00303).

[8]  Oscar Nierstrasz,et al.  Finding refactorings via change metrics , 2000, OOPSLA '00.

[9]  Paolo Tonella,et al.  Reverse engineering of the UML class diagram from c++ code in presence of weakly typed containers , 2001, Proceedings IEEE International Conference on Software Maintenance. ICSM 2001.

[10]  Yann-Gaël Guéhéneuc,et al.  Meta-modeling Design Patterns: application to pattern detection and code synthesis , 2001 .

[11]  Yann-Gaël Guéhéneuc,et al.  Instantiating and detecting design patterns: putting bits and pieces together , 2001, Proceedings 16th Annual International Conference on Automated Software Engineering (ASE 2001).

[12]  Yann-Gaël Guéhéneuc,et al.  Using design patterns and constraints to automate the detection and correction of inter-class design defects , 2001, Proceedings 39th International Conference and Exhibition on Technology of Object-Oriented Languages and Systems. TOOLS 39.

[13]  Jürgen Wolff von Gudenberg,et al.  On the Visualization of Java Programs , 2001, Software Visualization.

[14]  Yann-Gaël Guéhéneuc,et al.  No Java without caffeine: A tool for dynamic analysis of Java programs , 2002, Proceedings 17th IEEE International Conference on Automated Software Engineering,.

[15]  Yann-Gaël Guéhéneuc,et al.  Recovering binary class relationships: putting icing on the UML cake , 2004, OOPSLA.