Main Page/Resources/MTBenchmark/Identity

From Atenea

Jump to: navigation, search

Contents

Identity

This case study aims to do a simple identity transformation that obtains as output the same model as it is given as input.

Metamodel

Download Class.ecore or show Class.ecore tree view

Image:ClassMM.png

Transformation

As an example, in the following we show the ATL transformation for the Identity case study. The .atl file can be downloaded from here.

module Identity;
create OUT : MM1 from IN : MM;
rule Package {
  from
     p : MM!Package
  to 
     p1 : MM1!Package (
        name <- p.name,
        classes <- p.classes
     )
} 
rule Class {
  from
     c : MM!Class
  to 
     c1 : MM1!Class (
        name <- c.name,
        isAbstract <- c.isAbstract,
        visibility <- c.visibility,
        package <- c.package,
        super <- c.super,
        att <- c.att,
        methods <- c.methods
     )
}
rule Attribute {
  from
     a : MM!Attribute
  to 
     a1 : MM1!Attribute (
        name <- a.name,
        multivalued <- a.multivalued,
        owner <- a.owner,
        type <- a.type,
        visibility <- a.visibility
     )
}
rule Method {
  from
     m : MM!Method
  to 
     m1 : MM1!Method (
        name <- m.name,
        owner <- m.owner,
        params <- m.params
     )
}
rule Parameter {
  from
     p : MM!Parameter
  to 
     p1 : MM1!Parameter (
        name <- p.name,
        owner <- p.owner,
        type <- p.type
     )
}
rule DataType {
  from
     dt : MM!DataType
  to 
     dt1 : MM1!DataType (
        name <- dt.name
     )
}

Input models

In the following table, we provide a set of input models with different number of elements and relationships among them. All the models contain three elements of type DataType and ten of type Package. Apart from that, the leftmost column in the table categorizes the input models by the number of elements of type Class that they have and the uppermost row the number of containment relationships that every element has at the most. For example, model-1000-3 placed in cell V=1000 E=3 has 1000 elements of type Class and every class has at the most 3 super classes and also contains at the most 3 attributes and 3 methods, and the latter contains at the most 3 parameters.

Finally, each cell in the table, apart from the link to download the file, there are two numbers. The one above indicates the number of elements in the model, while the one below indicates the size of the XMI file in kilobytes.


Models conform to Class metamodel
E=0 E=1 E=2 E=3 E=4 E=5 E=6
N=10 model-10-0
2.3E1
1.48
model-10-1
3.5E1
2.14
model-10-2
6.1E1
3.83
model-10-3
8.7E1
4.85
model-10-4
1.09E2
6.2
model-10-5
1.58E2
8.4
model-10-6
2.03E2
7.04
N=100 model-100-0
1.14E2
8.23
model-100-1
2.36E2
1.64E1
model-100-2
4.25E2
2.65E1
model-100-3
6.02E2
3.76E1
model-100-4
9,52E2
5.41E1
model-100-5
1.25E3
6,86E1
model-100-6
1.51E3
8.25E1
N=1000 model-1000-0
1.01E3
7.66E1
model-1000-1
2.3E3
1.62E2
model-1000-2
4.06E3
2.63E2
model-10000-3
6.09E3
3.74E2
model-1000-4
8.98E3
5.28E2
model-1000-5
1.22E4
6.95E2
model-1000-6
1.59E4
8.84E2
N=10000 model-10000-0
1.0E4
7.68E2
model-10000-1
2.26E4
1.64E3
model-10000-2
4.01E4
2.66E3
model-10000-3
6.22E4
3.91E3
model-10000-4
9.02E4
5.43E3
model-10000-5
1.22E5
7.16E3
model-10000-6
1.6E5
9.17E3
N=0.1M model-100000-0
1.0E5
7.78E3
model-100000-1
2.25E5
1.66E4
model-100000-2
4.01E5
2.71E4
model-100000-3
6.24E5
4.0E4
model-100000-4
9.03E5
5.57E4
model-100000-5
1.22E5
7.35E4
model-100000-6
1.6E6
9.44E4
N=1M model-1000000-0
1.0E6
7.88E4
model-1000000-1
2.25E6
1.69E5
model-1000000-2
4.0E6
2.77E5
model-1000000-3
6.25E6
4.1E5
model-1000000-4
9.0E6
5.69E5
model-1000000-5
1.23E7
7.55E5
model-1000000-6
1.61E7
9.66E5


Personal tools