EnAr-Gromp

EnAr-Gromp and was developed to describe the operations that can be made over graphical representations in order to compose them.

Author(s)

Name Email
Ivan Mauricio Melo S. im.melo33@uniandes.edu.co

Language

This language allows adapting and composing graphical representations created with EnAr-Picture in order to reuse them in new projects or during the evolution of graphical syntaxes. EnAr-Gromp operates over two visual general concepts of models: nodes and relations. It provides seven operations concerning how to paint nodes and the 3 operations to describe how to paint relations among visual concepts.

Example

Upnext we present a short example of the instructions available in EnAr-Gromp, but first we need to introduce the 2metamodels and graphical representations we will compound in the example. In the next picture we present the two metamodels we want to compose.

MM1

MM1: represents the earnings of a person. The next image present the graphical representation of MM1.

Graphical representation for MM1

MM2

MM2: represent a town that has houses, habitants, and cars.The next image present the graphical representation of MM2.

Graphical representation for MM2

In this example we want to compose the graphical representation and the metamodels. The first step is to compose the metamodels, and this accomplish by using EnAr-Fusion. After doing so we present the compose metamodel MM12':

Composed Metamodel MM12'

As the picture presents, we adapted and composed the metamodel creating MM12’. The next step is to decide how we want to represent this new Metamodel. In our example we want to use the graphical representation of the first metamodel to represent the composition of person and habitant. Also we will keep the others representation and allow to paint the relations from all the Entities of the model.

Enar-Gromp script

As our goal is to create a graphical representation for Metamodel MM12’ describe in EnAr-Picture, reusing as much as possible our first step is to create a new script and import the metamodels (MM1, MM2, MM12) and the graphical representations in EnAr-Picture (GR_MM1, GR_MM2).

    import MM1; 
    import MM2;
    import MM12; 
    import GR_MM1; 
    import GR_MM2;
      

After importing all the imputs we need, the next step is to declare the new Nodes and Relations we would add to the graphical representation:

    //declarations
    new NodeLine simpleLine {
      style=solid;
    }
    

In Our example we would only use a line to connect the nodes. Finally we use the following instructions to compound the graphical representations.

    //instructions
    or(Person, Habitant) in Person{
      class <- MM12.Person;
      toolName <- 'Person';
      toolDescription <- 'person who has a salary';
    }
    

This first Instruction use the OR Instruction to select which graphical representation we will keep to represent the composition of person and habitant. Also in the instruction we express which concept of the metamodel will this new graphical representation represent, and which new properties will have. The next 2 instructions deletes de preview relation between Person and Salary and then links it again using the graphical representation declare at the beginning of the script.

    UnLink(Person, Salary);
    toLink(Person, Salary) -> simpleLine;
    

After the script is finish, using the composition engine we will have the new graphical description and will look like this:

Graphical Representation for Metamodel MM12'

Instructions

Over Nodes

Over Relations

gromp.txt · Última modificación: 2011/09/09 17:30 por im.melo33
Departamento de Ingeniería de Sistemas y Computación - Facultad de Ingeniería - Universidad de los Andes
CC Attribution-Noncommercial-Share Alike 3.0 Unported
Valid CSS Driven by DokuWiki Recent changes RSS feed Valid XHTML 1.0