| |
| <h1>Henshin - Giraph Code Generator Example: Movies</h1> |
| |
| <p> |
| <small><i>contributed by Christian Krause and Matthis Tichy</i></small> |
| </p> |
| |
| <p> |
| This is an example for the Giraph code generator in Henshin. It is described |
| in the paper <i>Implementing Graph Transformations in the Bulk Synchronous |
| Parallel Model</i> submitted to FASE 2014. |
| </p> |
| |
| <p> |
| The original example consists of a transformation on a part of the |
| data found in the IMDB movie database. We use here the simplified metamodel |
| schon below. |
| </p> |
| |
| <p> |
| <img src="examples/giraphmovies/movies.png" /> |
| </p> |
| |
| <p> |
| The goal is to find all persons (actors or actresses) that starred together |
| in at least three movies. For every such pair we want to create an instance |
| of the Couple class and add links to the movies the couple played in. Note that |
| this is a simplified version with the following limitations: 1) due to symmetry |
| we actually create 2 couple object for every pair of persons, and 2) we do not |
| consider attributes, such as actor / actress names or movie ratings. |
| For this simplified task, we use the rules and the sequential unit shown below. |
| </p> |
| |
| <p> |
| <img src="examples/giraphmovies/couples.png" /> |
| </p> |
| |
| <p> |
| To generate the Giraph code, right-click on the sequential unit and select |
| <i>Generate Giraph Code</i>. This will generate two classes: one general |
| utility class and one class for this particular transformation. You can |
| find the generated classes in the |
| <a href="http://git.eclipse.org/c/henshin/org.eclipse.emft.henshin.git/tree/plugins/org.eclipse.emf.henshin.examples/giraph/movies/">giraph/movies</a> folder |
| in the examples plugin. |
| </p> |
| |
| <p> |
| </p> |
| |