Henshin Example: Sierpinski Triangle
contributed by Enrico Biermann and Christian Krause
This is a very simple example which we use to do some benchmarking for the Henshin interpreter. The Sierpinski triangle is a fractal which is constructed by iteratively dividing triangles into sub-triangles. The number of nodes in the triangle grows exponentially with the number of iterations.
The transformation consists of a single rule, which divides and adds new triangles. The screenshot below shows this rule in the graphical editor.
The transformation files and the Java source code are available in the examples plug-in in the sierpinski package.
The following benchmark was conducted on a Intel(R) Xeon(R) CPU @ 2.50GHz with 8GB of main memory using Henshin 0.9.2. The parameters for the benchmark were automatically set using a script. All times are in milliseconds.
|Level||Rule applications||Nodes||Matching Time||Application Time||Total Time|