
extraction of the model from a legacy code
according to grammar. After a Text-to-model
transformation implemented in Gra2MoL, an AST
is generated thus representing the source code with
all the event handlers. After that, the AST is
transformed to an intermediate model called
RADBehaviour by the mean of a model-to-model
transformation according to a RADBehaviour
metamodel. Then, another model is generated based
on RADBehaviour which is called EventConcerns.
It aims to describe the legacy code in the form of a
control flow graph, [41].
To resume this approach, we have established in
Table 11:
Table 11. Summary of, [39] publication
AST
RADBehaviour
EventConcerns
Generation of
AST
Transforming the
AST into
RADBehaviour
Transforming
RADBehiaviour
into
EventConcerns
RubyTL (All
the model-to-
model
transformations
are
implemented
using it)
In, [42]
The objective of this approach is to migrate
automatically the web application into CMS
(Content Management System). For the moment,
this approach only focuses on open-source CMS
like WordPress, Drupal, and Joomla, [43]. To do
that, the authors propose three steps for the
approach: reverse engineering, restructuring, and
forward engineering. Concerning the reverse
engineering phase starts with the generation of AST
models from the legacy code to have a description
of the source code, according to the AST_PHP
metamodel. Then, two KDM models are generated
based on the previous AST models which are the
code model and the inventory model. Finally, by the
mean of model-to-model transformations, a CMS
model is generated based on KDM model data
according to the CMS Common Metamodel.
To resume this approach, we have established in
Table 12:
Table 12. Summary of, [42] publication
AST_PHP
metamodel
AST
KDM
CMS Common
metamodel
Generation of
AST
Transforming the
AST into PSM
Transforming the
PSM into PIM
Xtext
EBNF (Extended
Backus-Naur
Form)
2.3 Analysis
As mentioned previously in the last section, we
analyze each approach according to five elements.
Those elements are the models used, the scope of
the approach, the application fields of the approach,
the automation level, and the analysis type of the
approach whether it is static or dynamic. We have
established in Table 13 to resume the whole. By
going through the latter, we notice that four out of
the ten approaches mentioned use KDM
metamodels for different purposes. For instance,
Normantas and Vasilecas use KDM for legacy code
modeling, GUI modeling, and business processes.
Two out of ten approaches, [28], [25], use UML,
specifically either its default or personalized
profiles. Three out of the ten approaches, [23], [29],
[39], define new ad-hoc metamodels. One out of the
ten approaches, [31], reuse, in the context of 3D
Web systems, domain-specific models. Concerning
tools, we distinguish two kinds of approaches, those
who use new tools and those who use existing tools.
Six out of ten approaches use new tools, [21], [29],
[31], [36], [39], [42]. The most common new tool
used by these approaches is MoDisco. The latter
plays a major role in using KDM under the
condition of tool support. For the rest of the
mentioned approaches, they use available tools,
such as ATL-based ones. Concerning the
automation level, six of the ten approaches are
automated. The goal behind this is to avoid as much
as possible the human intervention to reduce errors.
In our literature review, 60% of the approaches are
fully automated which means that the model-driven
reverse engineering tools are mature enough to
support such an automation. Automation has other
advantages like improving productivity and
reducing costs. After that review, we can determine
leads to choose the best approach. Therefore, which
one is the best after analyzing a legacy code? It
seems to us that there are four elements to take into
consideration while choosing an approach. The first
one is the application domain. From our analysis,
we already distinguished between generic and
specific approaches, and we can tell that the specific
ones are more efficient in their respective domain.
The second one is standards. We have already seen
some approaches that use standardized models and
others use newly defined models. Therefore, finding
experts in standardized models is easier to recruit
because of the availability of documentation. From
what we have seen, specific approaches often rely
on KDM models. The third one is model validation.
Most of the approaches don’t integrate such a phase
in their process. But we think that this is an issue
that has to be a threat because model-to-model
WSEAS TRANSACTIONS on INFORMATION SCIENCE and APPLICATIONS
DOI: 10.37394/23209.2023.20.32
Mohamed Karim Khachouch,
Ayoub Korchi, Younes Lakhrissi