Model-driven reverse engineering (MDRE) tiene muchas aplicaciones interesantes (migración de código a nuevas plataformas, generación de documentación, impact analysis,…). Hemos explorado ya varias de ellas en nuestro proyecto MoDisco (resumiendo mucho: un framework extensible para el desarrollo de herramientas destinadas a la modernización de software), un proyecto que desarrollamos conjuntamente con la empresa MIA Software .

Hoy quiero hablar de una nuevo escenario de aplicación para MoDisco (y para MDRE en general): usar MDRE para, de forma automática, calcular las métricas relevantes de un proyecto software. Disponer de un conjunto de métricas que resuman tu proyecto software es cada vez más importante. Por ejemplo, Eclipse ahora obliga a todos los proyectos a que proporcionen métricas acerca del proyecto en sí (número de participantes, líneas de código, número de bugs abiertos,…) y sobre el código del proyecto como prerequisito obligatorio para poder incluir el proyecto en las próximas releases de Eclipse.

Conjuntamente con Hugo Bruneliere (del equipo AtlanMod ) y Frédéric Madiot (de MIA Software) hemos definido un roadmap para esta nueva aplicación de MDRE. Este roadmap se presentará en el 2nd Biannual Symposium on Eclipse Open Source Software & OMG Open Specifications .

La idea que tenemos en mente es usar la implementación en MoDisco del OMG Structured Metrics Metamodel (SMM) para desarrollar una herramienta nueva que permita definir, calcular y representar (como modelos SMM) toda la información del proyecto (los datos del proyecto a analizar se pueden obtener de los repositorios de Eclipse). El resumen de la charla que daremos en el Symposium es el siguiente:

Using the Structured Metrics MetamodelTM and MoDisco to Facilitate the Eclipse Development Process

Many OMG standards play a key role as core components of Eclipse-based tools (e.g. see [1] for a list of Eclipse tools built on top of the UML2 OMG standard). Here, we explore an additional collaboration relationship between Eclipse and the OMG: using OMG standards to improve the actual Eclipse tool development process. In particular, we will describe how the current Structured Metrics Metamodel (SMMTM) [2] implementation in MoDisco [3] can help developers of new Eclipse projects to comply with the requirements stated by the Eclipse development process for Simultaneous Releases [4], such as Helios.

SMM [2] is a standard specification proposed and developed by the OMGTM Architecture Driven Modernization (ADMTM) task force. It defines a unified way of representing the different kinds of measurement information related to software in general, i.e. to their design, implementation, execution, etc. It concerns both the definition of the measures and the representation of their computed results. However, it does not support the representation of the measured entities/artifacts, which are already represented in other metamodels such as Knowledge Discovery Metamodel (KDMTM) or Abstract Syntax Tree Metamodel (ASTMTM).

MoDisco [3] is an Eclipse project which provides an extensible and customizable MDE framework to develop model-driven tools supporting different reverse engineering scenarios such as legacy migration or modernization, quality assurance, retro-documentation, etc. As part of the available components in MoDisco, a reference implementation of SMM has been contributed in Ecore format (EMF) by partners from the OMG ADM task force.

We believe that Eclipse developers can benefit from MoDisco (and in particular its SMM component) when following the steps defined in the Eclipse development process for Simultaneous Releases [3].
This process provides a set of criteria designed to ensure that all Eclipse projects work well both as standalone projects and as part of simultaneous releases. One of the criteria requires providing several metrics about the project (number of bundles, number of committers, lines of code, number of bugs opened and fixed, etc) and about the source code quality (dependencies, usage of Eclipse message bundles, 4-part version numbers, jarred plug-ins and so forth).

SMM is an evident candidate for expressing these required metrics. Therefore, our goal is to use our SMM implementation in MoDisco to create a dedicated tooling allowing to (semi-)automatically specify, compute (by automatically retrieving the required data from the Eclipse repositories) and represent as SMM models all the relevant metrics information for given Eclipse projects or plug-ins.

This tooling would be composed of:

  • An SMM editor allowing the definition of a quality grid for Eclipse projects including the metrics and their relationships with several quality properties (complexity, portability, maintainability, etc);
  • A semi-automatic discoverer of SMM models computing measurements from the project repositories;
  • Views to display the measurements contained in a SMM model;
  • Traceability links between the measurements in the SMM model and the relevant sources for that measurement (code, configuration file, Bugzilla, etc) in the repositories.

By integrating SMM, an OMG open specification, Eclipse clearly benefits from the standardization process which has leaded to its definition. In return, by providing a reference implementation of SMM and a concrete use-case illustrating how it can be used on real development process, Eclipse actually supports the adoption of this standard.

[1] MDT UML2-based tools: http://wiki.eclipse.org/MDT-UML2-Tool-Compatibility
[2] SMM OMG Specification: http://www.omg.org/spec/SMM/
[3] MoDisco Project: http://www.eclipse.org/gmt/modisco/
[4] Eclipse Simultaneous Release – Guidelines from the Eclipse Planning Council: http://www.eclipse.org/helios/planning/EclipseSimultaneousRelease.php

Si te ha gustado esta entrada, puedes subscribirte a este Software Modeling blog y/o seguirme en twitter y/o a través de la lista de distribución del portal Y si realmente te ha gustado ayúdame a hacerlo llegar a otros utilizando los bookmarks que tienes a continuación:

Pin It on Pinterest

Share This