How to Deal with your IT Legacy

MoDisco in a Nutshell!

For the second time, the MoDisco project is integrated in the yearly Eclipse Simultaneous Release. After Helios last year with its version 0.8.0, MoDisco version 0.9.0 is now officially released as part of Indigo. In addition to the already existing reverse engineering features (notably for Java), which are upgraded for the occasion, MoDisco is released this year with some interesting brand new components and dedicated JEE technology support. Of course, it's still model-driven ...

Looking to the large diversity of technologies available nowadays to build software systems can be quite disturbing, and the number and complexity of these systems is still considerably increasing! Add the fact that the amount of more "old-fashioned" existing systems still relevant and used today by the industry is also huge, and the problem of dealing with all these legacy systems can be naturally considered as a major challenge in the software industry. Having a better understanding of the IT legacy in order to document, maintain, improve or migrate them is not an easy task. The Eclipse-MDT MoDisco project intends to facilitate the elaboration of such reverse engineering solutions by offering a reusable and extensible model-based framework. Relying on different Modeling technologies provided in Eclipse, all based on the Eclipse Modeling Framework (EMF,) it provides concrete components to tackle this important issue.

A Short History

The MoDisco initiative actually started back in 2006 when the AtlanMod Team (INRIA, Ecole des Mines de Nantes & LINA) and Mia-Software (Sodifrance group) were working together in the context of the IST-FP6 MODELPLEX European projectIST FP6 MODELPLEX European Project: As part of this collaborative project, and for one of the tasks dedicated to (model driven) reverse engineering, AtlanMod created the MoDisco project in Eclipse-GMT (Generative Modeling Technologies), which acted at the time as an incubator for modeling prototypes. Several experimental components were then developed by AtlanMod and contributed to this newly created project. Mia-Software rapidly joined the project and started committing actively to it. In 2008, Mia-Software was officially part of the project and increased their involvement accordingly. Since this period, the MoDisco community has grown progressively and the project has been regularly presented at the major Eclipse events (EclipseCon and Eclipse Summit Europe, now EclipseCon Europe), among others. In the meantime the MoDisco base infrastructure and set of components were settled and, consequently, the project has been promoted naturally to Eclipse-MDT (Model Development Tools).

The Eclipse Project

MoDisco is thus an official Eclipse-MDT project dedicated to Model Driven Reverse Engineering (MDRE) from IT legacy systems. It is officially integrated within the yearly Eclipse Simultaneous Releases and part of the "Eclipse Modeling Tools" bundles (last year's Helios, this year's Indigo, next year's Juno...). It provides a set of extensible and reusable components, which form a generic framework allowing the elaboration of concrete solutions to support the specificities of different reverse engineering scenarios.

As shown from Figure 1, it can be effectively used as part of modernization processes (technology migration, software refactoring, architecture restructuring, etc), but also for retro-documentation, quality assurance or basically any kind of use case requiring a better understanding of existing systems.

MoDisco is considered by the OMG Architecture Driven Modernization (ADM) Task Force as the reference provider for real implementations of several of its standards: Knowledge Discovery Metamodel (KDM) OMG, OMG Software Metrics Metamodel (SMM) and Abstract Syntax Tree Metamodel (ASTM). In addition to this, it already provides an advanced support for the Java, JEE and XML technologies, including complete metamodels, corresponding discoverers and generators, customizations, query libraries, etc. Now let's see in a bit more detail what's in there...

Model-based Features

MoDisco offers a set of model-based components allowing elaborating on reverse engineering solutions. The concerned legacy systems (to be "reverse engineered") can be of varied and various natures. In addition to its technology-independent components, MoDisco natively provides an extensive support for Java legacy systems. From now on, let's consider Java as our legacy technology example to show the different features available in the framework.

The support for a given technology starts by providing the corresponding metamodel(s) – (a metamodel can be generally defined as a model specifying the set of concepts, relations between them and constraints required for modeling a given domain or range of problems.) Depending on the selected technology, the detail level of such metamodels may vary. In the case of Java, the metamodel implemented in MoDisco and directly usable covers the full Java language and constructs: it specifies everything a Java program can contain from the global structure (i.e. packages, classes, dependencies) to the internal one (i.e. detailed instructions and statements inside the methods). Thus, it is possible to completely represent an existing program as a (Java) model!

In order to obtain such a model, so-called "discoverers" have to be used. All the available discoverers can be plugged to the framework, and then used accordingly, by registering them via the Discoverer Manager. Their goal is to take as input legacy artifacts and generate as output one (or several) models. Concerning the specific Java Discoverer available from MoDisco, it automatically produces a Java model out of selected Eclipse plug-in(s). As stated before, the content of the obtained Java models exactly reflects the content of the corresponding source code. There is no loss of information here, and this is fundamental as it then allows performing the following reverse engineering actions directly on the models (instead of on the source code).

In a large majority of the possible scenarios (cf. Figure 1) and related processes, it is necessary to be able to navigate efficiently such models of legacy systems.



However, one of the main characteristics of these models is their important size and complexity. To directly address this, MoDisco provides as part of its framework a customizable generic Model Browser. It can be used to more easily browse all EMF models (independently from their metamodels) and provides advanced features such as full exploring, infinite navigation, filtering, sorting, searching, etc. As shown on Figure 2, a dedicated Java customization is directly provided and comes with the standard Eclipse icons and formatting.



In addition to the Model Browser, MoDisco has an integrated mechanism to define and execute queries over the handled models. Such queries, implemented in Java, OCL Eclipse-MDT Object Constraint Language (OCL,) ATL Eclipse-M2M ATL Transformation Language or any other language pluggable to the framework via the provided extension points (cf. the Query Manager component), are particularly relevant when some specific information needs to be extracted out of huge models. This is done most of the time in order to have a better understanding of their actual content. The results of the running of these queries can also be reused as part of the so-called "Facet" mechanism, which allows dynamically extending existing models with data computed at runtime (via the queries). Originally developed as part of MoDisco, this mechanism now has its own life within the context of the dedicated Eclipse-EMFT Facet project. But of course, facets are still integrated and used intensively in MoDisco for reverse engineering purposes.

Similarly to "discoverers", MoDisco also comes with "generators" corresponding to the supported technology metamodels. Thus, Java has its specific generator which allows producing the Java source code from the handled Java models. Moreover, in order to be able to obtain other kinds of artifacts out of these models (as shown on Figure 3), transformations can also be defined and plugged within the framework via an integrated Discovery Workflow. Some transformations from Java to various Object Management Group (OMG) standards are already provided such as notably KDM OMG Knowledge Discovery Metamodel (KDM) and UML2 OMG Unified Modeling Language (UML).



All the presented features and Java-dedicated support are very useful when dealing with reverse engineering from Java legacy systems. Note that, as complementary components but still very interesting, a generic XML metamodel (based on the related W3C specification) and corresponding discoverer are also given for free. Let's now take a look to the complete novelties brought by the Indigo release of MoDisco...




Hugo Bruneliere
Hugo Bruneliere

What do you think?

JAX Magazine - 2014 - 06 Exclucively for iPad users JAX Magazine on Android


Latest opinions