As an Eclipse component, MoDisco can be
integrated with plug-ins or technologies available in
the Eclipse environment. The MoDisco project is
working in collaboration with ADMTF. To facilitate
reuse of components between several modernization
solutions, MoDisco is organized in three layers. The
Infrastructure layer contains generic components
independent from any legacy technology such as
EMF implementations of ASTM, KDM, the KDM
Source discoverer, and the KDM to UML converter.
The Technology layer contains component dedicated
to one legacy technology such as metamodels for the
Java language, Java AST and Java Discoverer. The
Use-cases layer contains components providing a
solution for a specific modernization use-case.
2.4 Related Work
Many works have contributed to reverse engineering
object-oriented code. Tonella and Potrich (2005)
provide a relevant overview of techniques that have
been recently investigated and applied in the field of
reverse engineering of object-oriented code. Authors
describe the algorithms involved in the recovery of
UML diagrams from code. Our proposal can be
considered as a formalization of the recovery
processes described at Tonella and Potrich (2005) in
terms of standards involved in ADM.
Among the works related to MDD-based reverse
engineering but not in the ADM context, it is worth
mentioning (Izquierdo and Molina, 2009a) and
(Deissenboeck and Ratiu, 2006).
With the emergence of ADM, new approaches
and tools are being developed. Martinez, Favre and
Pereira (2013) describe the state of the art in the
model-driven modernization area and discuss about
existing tools and future trends. A process to extract
models that conform to KDM is presented in
(Cánovas Izquierdo and García Molina, 2009b). This
approach does not recovery UML models. Barbier et
al., (2011) describe a model driven reverse
engineering method and illustrate it with two
COBOL legacy systems. Authors explain the future
actions to generalize it by using KDM.
Several tools support the recovering of sequence
diagrams from object-oriented code. Most of them
are not based on the principles of MDA and ADM,
recent examples are Visual Paradigm (Visual
Paradigm, 2014), Java Call Tracer (Java Call Tracer,
2014) and RevEng (Tonella and Potrich, 2005). Blu
Age follows the principles of MDA and ADM
through Eclipse (Blu Age Reverse Modeling, 2014).
This tool has been targeting the modernization of
COBOL in particular, to facilitate the transferring of
legacy code towards object-oriented technologies of
the JEE or .Net type. Our approach has been
targeting with a different aim, the modernization of
object-oriented code to facilitate the adaptation of
legacy applications to mobile platforms.
3 A FRAMEWORK FOR ADM
Three main steps in software modernization: Model
Discovery, Model Understanding and Model (Re)
Generation are distinguished in (Brambilla et al.,
2012). The first phase “discovers” a set of initial
models that represent the legacy system at the same
abstraction level. The second phase employs query
and transformation techniques that built models in a
higher-level of abstraction, which are the source
models in the Model (Re) Generation phase. The
present work describes a framework for architecture-
driven reverse engineering (ADRE) to recover
models from object-oriented code that focus on the
first two above-mentioned steps of the
modernization (Figure 1). In the MDD context, the
reverse engineering process extracts elements from
existing systems and represents them into Platform
Specific Models (PSMs), and subsequently Platform
Independent Models (PIMs) are obtained from the
PSMs. In the ADM context, KDM is the support for
representing PSMs by using AST as intermediate
representation of a software system. In particular, we
describe how to recover models that represent an
abstract view of existing systems from its code in the
ADM context.
The model level includes code models
(Implementation Specific Model - ISM), KDM
models (PSM) and UML models (PIM). The last
ones provide a uniform representation of the system
in the ADM context and include class, use case,
activity, interaction, and state diagrams.
The metamodel level includes metamodels
defined via MOF that are the foundation to describe
the transformations at model level. The metamodel
level includes ASTM that describes AST models,
KDM that describes families of PSM models and the
UML metamodel that describes families of PIMs.
The models at PIM level are built applying
successive transformations from source code. For
each transformation, source and target metamodels
are specified.
The reverse engineering process at metamodel
level consists of two major steps:
1. Model Discovery: a code model is obtained by
applying
a text-to-model (T2M) transformation
from source code; it is transformed into an
ENASE2014-9thInternationalConferenceonEvaluationofNovelSoftwareApproachestoSoftwareEngineering
190