1 Reverse Engineering of Object-Oriented Code into Umple using an Incremental and Rule-Based Approach Miguel A. Garzón 1 , Timothy C. Lethbridge 1 , Hamoud Aljamaan 1 , Omar Badreddin 2 School of Electrical Engineering and Computer Science University of Ottawa, Canada 1 School of Electrical Engineering and Computer Science Northern Arizona University, Flagstaff, U.S.A 2 mgarzon@uottawa.ca, tcl@eecs.uottawa.ca, hjamaan@uottawa.ca, Omar.Badreddin@nau.edu Abstract In this paper we present a novel approach to re- verse engineering, in which modeling information such as UML associations, state machines and attributes is incrementally added to code written in Java or C++, while maintaining the system in a textual format. Umple is a textual representation that blends modeling in UML with programming language code. The approach, called umplification, produces a program with behavior identical to the original one, but written in Umple and enhanced with model-level abstractions. As the resulting program is Umple code, our approach eliminates the distinction between code and model. In this paper we discuss the principles of Umple, the umplification approach and a rule-driven tool called the Umplificator, which implements and validates the depicted approach. 1 Introduction Many software systems experience growth and change for an extended period of time. Maintain- ing consistency between documentation and the corresponding code becomes challenging. This situation has long been recognized by researchers, and significant effort has been made to tackle it. Copyright 2014 Miguel A. Garzón, Timothy C. Lethbridge, Hamoud Aljamaan and Omar Badreddin. Permission to copy is hereby granted provided the original copyright notice is reproduced in copies made. Reverse engineering is one of the fruits of this effort and has been defined as the process of cre- ating a representation of the system at a higher level of abstraction [1]. Reverse engineering, in general, recovers documentation from code of software systems. When such documentation follows a well-defined syntax it is often now referred to as a model. Such models are often represented using UML (Unified Modeling Language), which visually represents the static and dynamic characteristics of a system. There is a long and rich literature in reverse engineering [2]. Most existing techniques result in the generation of documentation that can be con- sulted separately from the code. Other techniques generate models in the form of UML diagrams that are intended to be used for code generation of a new version of the system. The technique dis- cussed in this paper goes one step further: It mod- ifies the source code to add model constructs that are represented textually, but can also be viewed and edited as diagrams. The target language of our reverse engineering process is Umple [3], which adds UML and other constructs textually to Java, C++ and PHP. We call our approach to reverse engineering a software system umplification. This is a play on words with the concept of ‘amplification’ and also the notion of converting into Umple. In our previ- ous work [4], we have found that umplifying code is reasonably straightforward for someone famil- iar with Umple, and with knowledge of UML