Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "VIATRA2/Benchmarks/Sierpinsky triangles Benchmark"

Line 1: Line 1:
 
=== Benchmark description ===
 
=== Benchmark description ===
 
This benchmark was presented as one of the case study of the 2007 [http://www.se.eecs.uni-kassel.de/se/?agtive Agtive] tool contest.
 
This benchmark was presented as one of the case study of the 2007 [http://www.se.eecs.uni-kassel.de/se/?agtive Agtive] tool contest.
The goal of this case study is to measure the performance of graph transformation tools constructing Sierpinski triangles. The Sierpinski triangle is a fractal named after Waclaw Sierpinski who described it in 1915. Originally constructed as a mathematical curve, this is one of the basic examples of self-similar sets, i.e. it is a mathematically generated pattern that can be reproduced at any magnification or reduction.
+
The goal of this case study is to measure the performance of graph transformation tools constructing Sierpinski triangles. The [http://en.wikipedia.org/wiki/Sierpinski_triangle Sierpinski triangle] is a fractal named after Waclaw Sierpinski who described it in 1915. Originally constructed as a mathematical curve, this is one of the basic examples of self-similar sets, i.e. it is a mathematically generated pattern that can be reproduced at any magnification or reduction.
  
 
An algorithm for obtaining arbitrarily close approximations to the Sierpinski triangle is as follows:
 
An algorithm for obtaining arbitrarily close approximations to the Sierpinski triangle is as follows:
Line 10: Line 10:
  
 
=== Metamodeling ===
 
=== Metamodeling ===
From the programmers point of view, the most difficult part of implementing the Sierpinski triangle generator is to create the correct triangle ”finder mechanisms”. In our solution, we tried to adhere to the typing scheme found in the problem description by taking advantage of the multiple-inheritance support of the Viatra2 framework resulting the metamodel depicted in Fig. [[Image:Sierpinsky_metamodel.jpg|frame|Fig.1 The Sierpinsky metamodel]]].
+
From the programmers point of view, the most difficult part of implementing the Sierpinski triangle generator is to create the correct triangle ”finder mechanisms”. In our solution, we tried to adhere to the typing scheme found in the problem description by taking advantage of the multiple-inheritance support of the Viatra2 framework resulting the metamodel depicted in Fig. 1[[Image:Sierpinsky_metamodel.jpg|frame|Fig.1 The Sierpinsky metamodel]].
  
 
<source lang="java">
 
<source lang="java">

Revision as of 12:07, 19 June 2008

Benchmark description

This benchmark was presented as one of the case study of the 2007 Agtive tool contest. The goal of this case study is to measure the performance of graph transformation tools constructing Sierpinski triangles. The Sierpinski triangle is a fractal named after Waclaw Sierpinski who described it in 1915. Originally constructed as a mathematical curve, this is one of the basic examples of self-similar sets, i.e. it is a mathematically generated pattern that can be reproduced at any magnification or reduction.

An algorithm for obtaining arbitrarily close approximations to the Sierpinski triangle is as follows:

  1. Start with an equilateral triangle with a base parallel to the horizontal axis.
  2. Shrink the triangle by 1
  3. make two copies, and position the three shrunk triangles so that each triangle touches each of the two other triangles at a corner.
  4. Repeat step 2 with each of the smaller triangles.

Metamodeling

From the programmers point of view, the most difficult part of implementing the Sierpinski triangle generator is to create the correct triangle ”finder mechanisms”. In our solution, we tried to adhere to the typing scheme found in the problem description by taking advantage of the multiple-inheritance support of the Viatra2 framework resulting the metamodel depicted in Fig. 1
Fig.1 The Sierpinsky metamodel
.
entity ( node );
entity (a);
entity (b);
entity (c);
entity (ac);
entity (ab);
entity (bc);
relation (e,node , node );
 
supertypeOf (node ,a);
supertypeOf (node ,b);
supertypeOf (node ,c);
supertypeOf (a,ab );
supertypeOf (a,ac );
supertypeOf (b,ab );
supertypeOf (b,bc );
supertypeOf (c,ac );
supertypeOf (c,bc );

Initial model

Measurement results

Back to the top