The unified Modeling Language (UML) has become a standard for the design and development of object oriented systems. Its usage during the inception step of the development process allows describing the system at a high level, thus hiding irrelevant details and providing a common language to discuss about design rationale and alternative decisions. UML diagrams, and in particular the most frequently used one, the class diagram, represent a valuable source of information even after the delivery of the system, when it enters the maintenance phase. Several tools provide a reverse engineering engine to recover it directly from the code. In this paper an algorithm is proposed for the improvement of the accuracy of the UML class diagram extracted from the code. Specifically, important information about inter-class relations may be missed in a reverse engineered class diagram, when weakly typed containers, i.e., containers collecting objects whose type is the top of the inheritance hierarchy, are employed. In fact, the class of the contained objects is unknown, and therefore no relation with it can be recovered. The container type inference algorithm we propose is based on a flow insensitive propagation of type information along all variables that can store a reference to the contained objects. Details are provided for its implementation with reference to the C++ language. A tool was developed for the reverse engineering of the UML class diagram from C++ code, embedding the proposed algorithm. Experimental results highlight that a substantial improvement is achieved when the container type information is refined with the inferred data

Reverse Engineering of the UML Class Diagram from C++ Code in Presence of Weakly Typed Containers

Tonella, Paolo;Potrich, Alessandra
2001-01-01

Abstract

The unified Modeling Language (UML) has become a standard for the design and development of object oriented systems. Its usage during the inception step of the development process allows describing the system at a high level, thus hiding irrelevant details and providing a common language to discuss about design rationale and alternative decisions. UML diagrams, and in particular the most frequently used one, the class diagram, represent a valuable source of information even after the delivery of the system, when it enters the maintenance phase. Several tools provide a reverse engineering engine to recover it directly from the code. In this paper an algorithm is proposed for the improvement of the accuracy of the UML class diagram extracted from the code. Specifically, important information about inter-class relations may be missed in a reverse engineered class diagram, when weakly typed containers, i.e., containers collecting objects whose type is the top of the inheritance hierarchy, are employed. In fact, the class of the contained objects is unknown, and therefore no relation with it can be recovered. The container type inference algorithm we propose is based on a flow insensitive propagation of type information along all variables that can store a reference to the contained objects. Details are provided for its implementation with reference to the C++ language. A tool was developed for the reverse engineering of the UML class diagram from C++ code, embedding the proposed algorithm. Experimental results highlight that a substantial improvement is achieved when the container type information is refined with the inferred data
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11582/73
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo

Citazioni
  • ???jsp.display-item.citation.pmc??? ND
social impact