Home | Sourceforge Project Page | Download | ManualContact

Introduction

Metamodel Engine (ME) takes place between an UML modelization tool and a programming tool. ME offers two main functionnalities:

  • transform an UML modelization into its code: this is called the code generation.
  • transform a code into its UML modelization: this is called the reverse-engineering.

    Position of ME in development cycle
    Position of ME in development cycle


    So, ME allows to maintain a modelization and a code at the same time. This way of doing is called the round-trip and is explained in the corresponding
    section.

    ME features

    Metamodel Engine is delivered in the form of a library (me-lib.dll) providing the functionalities we will now describe.

    Importation of the UML model

    In order to recover the UML model, ME uses the XMI standard format, defined by the OMG, because this format is now supported by a majority of UML editors.
    Versions 1.0 and 1.1 are supported by ME for the moment.
    The software producing of compatible files XMI are listed
    here.

    The model imported by ME is represented in memory by elements of the ME metamodel. An element could be a package, a class, a method, an association, a generalization, or any other element of a UML model. Each element can contain tags, which will make possible to attach informations to the elements. These tags, for example, are used to attach documentation (with the JavaDoc format for example) with an element of the model. We will see thereafter that these tags are also used to attach ME information to an element.
    These elements could be traversed by using the design pattern visitor. We will see in detail the concepts of
    visitor and metamodel.

    Code generation

    To generate code, ME uses "maps". A map is in fact a library (DLL) or a XME file (xme) which implements a visitor. Thus, the visitor implemented in the map will be able to traverse the elements of the metamodel and to progressively generate the associated code.
    The interest of this system is to make it possible to the user to personalize the generated code, but also to develop new maps by using the C# language available in the .NET framework, or by using the ME map format, namely the XME, which is a XML file.

    In fact, a map is a plug-in which will be loaded dynamically by ME. Thus, ME is more easily integrable with other tools.
    The maps are detailed
    here and also here

    Reverse-engineering

    To recover the UML model from the code, ME uses regular expressions which will enable us to identify the structure of the packages, the classes, the methods and the attributes.
    Any text being found between the elements identified by the regular expressions is attached, thanks to the tags, to the element at side of which it was found.
    Thus, if it finds the following Java code:

    public whole String method(int)/* comment */
    {
    return "Hello world!";
    }
    /* comment */ will be attached at the end of the method declaration, and return "Hello world!"; will be attached to the block corresponding to the body of the method.

    A tutorial can be found here, but this is a little complex so be sure to be ready.

    Generation of UML model

    To generate UML model, ME also uses the XMI. It could thus be imported in a tool of UML modeling, be modified, and re-exported towards ME.
    To generate the model into XMI, ME derives its functionnment from the "standard one": ME uses a map quite simply implementing the generation into XMI instead of code.
    That shows that ME can be used for all the transformations of the XMI and not only to generate code, even if that remains the main goal. One could for example import diagrams of use cases to transform them into images via the appropiated library of the .NET framework. Description

    Project team

    The project team is composed of
    Epita SIGL students. ME is a school project related to LaboSIE, wich is the Epita Laboratory on Information Systems (and also Software Engineering).
    • Participant Email Address Year
      Julien Guisset julien.guisset@epita.fr 2003 (Intervenant)
      Laurent Mascherpa laurent.mascherpa@epita.fr 2003 (Intervenant)
      Paul Cayon paul.cayon@epita.fr 2004
      Rémy Engelmann remy.e@free.fr 2004
      Jean-Baptiste Julien jb.julien@wanadoo.fr 2004
      Guillaume Le Cousin guillaume@lecousin.net 2004
      Ismaël Mameche ismael.mameche@epita.fr 2004
      Eric Pantera eric.pantera@epita.fr 2004
      Renaud Saulnier renaud.saulnier@epita.fr 2004
      Christophe Blin christophe.blin@epita.fr 2005 (Refactoring)
      Paul Chabas paul.chabas@epita.fr 2005 (Recherche)
      Laurent Couchez laurent.couchez@epita.fr 2005 (Refactoring)
      Camille Duschesne camille.duschesne@epita.fr 2005 (Recherche)
      Guillem Mazarico guillem.mazarico@epita.fr 2005 (Refactoring, CDP)
      Benoît Mérouze benoit.merouze@epita.fr 2005 (Refactoring)
      Sébastien Riss sebastien.riss@epita.fr 2005 (Recherche, CDP)
      Thomas Sarlandie thomas.sarlandie@epita.fr 2005 (Refactoring)
      Antoine Verret antoine.verret@epita.fr 2005 (Recherche)

      Software

      This software is made using Microsoft .NET Framework 1.0, and C# Language.
      To run the software you need one of the following :


    ©2002 - Metamodel Engine Team

    EPITA SIGL
    SourceForge Logo