Precise identification of composition relationships for UML class diagrams

Knowing which associations are compositions is important in a tool for the reverse engineering of UML class diagrams. Firstly, recovery of composition relationships bridges the gap between design and code. Secondly, since composition relationships explicitly state a requirement that certain representations cannot be exposed, it is important to determine if this requirement is met by component code. Verifying that compositions are implemented properly may prevent serious program flaws due to representation exposure.We propose an implementation-level composition model based on ownership and a novel approach for identifying compositions in Java software. Our approach uses static ownership inference based on points-to analysis and is designed to work on incomplete programs. In our experiments, on average 40% of the examined fields account for relationships that are identified as compositions. We also present a precision evaluation which shows that for our code base our analysis achieves almost perfect precision---that is, it almost never misses composition relationships. The results indicate that precise identification of interclass relationships can be done with a simple and inexpensive analysis, and thus can be easily incorporated in reverse engineering tools that support iterative model-driven development.

[1]  Liuba Shrira,et al.  Ownership types for object encapsulation , 2003, POPL '03.

[2]  Jan Vitek,et al.  Flexible Alias Protection , 1998, ECOOP.

[3]  Barbara G. Ryder,et al.  Fragment class analysis for testing of polymorphism in Java software , 2004, IEEE Transactions on Software Engineering.

[4]  James Noble,et al.  The ins and outs of objects , 1998, Proceedings 1998 Australian Software Engineering Conference (Cat. No.98EX233).

[5]  Robert B. France,et al.  Improving the UML Metamodel to Rigorously Specify Aggregation and Composition , 2001, OOIS.

[6]  Ivar Jacobson,et al.  Unified Modeling Language Reference Manual, The (2nd Edition) , 2004 .

[7]  Guy L. Steele,et al.  Java Language Specification, Second Edition: The Java Series , 2000 .

[8]  James Noble,et al.  Saving the world from bad beans: deployment-time confinement checking , 2003, OOPSLA '03.

[9]  Jens Palsberg,et al.  Encapsulating objects with confined types , 2001, OOPSLA 2001.

[10]  Barbara G. Ryder,et al.  Points-to analysis for Java using annotated constraints , 2001, OOPSLA '01.

[11]  Ivar Jacobson,et al.  The unified modeling language reference manual , 2010 .

[12]  Craig Larman,et al.  Applying UML and patterns , 1997 .

[13]  James Noble,et al.  Ownership types for flexible alias protection , 1998, OOPSLA '98.

[14]  Atanas Rountev,et al.  Precise identification of side-effect-free methods in Java , 2004, 20th IEEE International Conference on Software Maintenance, 2004. Proceedings..

[15]  Amer Diwan,et al.  Converting Java classes to use generics , 2004, OOPSLA '04.

[16]  Daniel Jackson,et al.  Lightweight Extraction of Object Models from Bytecode , 2001, IEEE Trans. Software Eng..

[17]  Sophia Drossopoulou,et al.  Ownership, encapsulation and the disjointness of type and effect , 2002, OOPSLA '02.

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

[19]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[20]  Hee Beng Kuan Tan,et al.  On Formalization of the Whole-Part Relationship in the Unified Modeling Language , 2003, IEEE Trans. Software Eng..

[21]  Laurie J. Hendren,et al.  Optimizing Java Bytecode Using the Soot Framework: Is It Feasible? , 2000, CC.

[22]  Craig Chambers,et al.  Alias annotations for program understanding , 2002, OOPSLA '02.

[23]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[24]  Martin Gogolla,et al.  Application of UML associations and their adornments in design recovery , 2001, Proceedings Eighth Working Conference on Reverse Engineering.

[25]  Michael D. Ernst,et al.  Converting java programs to use generic libraries , 2004, OOPSLA '04.

[26]  Barbara G. Ryder,et al.  Dataflow analysis of software fragments , 2002 .

[27]  Guy L. Steele,et al.  Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley)) , 2005 .

[28]  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.