| <?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop' | |
| #***************************************************************************** | |
| # | |
| # template.php | |
| # | |
| # Author: Freddy Allilaire | |
| # Date: 2005-12-07 | |
| # | |
| # Description: Type your page comments here - these are not sent to the browser | |
| # | |
| # | |
| #**************************************************************************** | |
| # | |
| # Begin: page-specific settings. Change these. | |
| $pageTitle = "AMW Use Case - Calculating the difference between models"; | |
| $pageKeywords = "Metamodel comparison, model weaving, transformations, ATL, AMW, AMMA"; | |
| $pageAuthor = "Marcos Didonet Del Fabro"; | |
| # End: page-specific settings | |
| # | |
| # Paste your HTML content between the EOHTML markers! | |
| $html = <<<EOHTML | |
| <!-- Main part --> | |
| <div id="midcolumn"> | |
| <h1>$pageTitle</h1> | |
| <a name="goals"></a> | |
| <img align="right" src="../../resources/amwLogoSmall.png" valign="top" style="padding-left: 10px;" alt="AMW Logo" /> | |
| <blockquote> | |
| <ul> | |
| <li><a href="#overview"><b>Overview</b></a></li> | |
| <li><a href="#download"><b>Download and examples</b></a></li> | |
| <li><a href="#related"><b>Related use cases</b></a></li> | |
| <!-- <li><a href="#acknowledgement"><b>Acknowledgement</b></a></li> --> | |
| </ul> | |
| </blockquote> | |
| <hr class="clearer" /> | |
| <table> | |
| <COLGROUP> | |
| <COL width="2%"> | |
| <COL width="98%"> | |
| <tr> | |
| <td></td> | |
| <td> | |
| This use case presents a Model Driven Engineering solution to calculate automatically the difference between two KM3 models. | |
| Calculating the difference between two models is an essential process to control the changes and evolutions of models. | |
| The result of the difference is used to apply a patch in one of the models. | |
| <h4 STYLE="font-size: 10pt; padding: 0; border-bottom: 2px solid #49457C; background-position: top left; background-repeat; repeat-x;"> | |
| <a name="overview">Overview</a></h4> | |
| <p align="justify"> | |
| Consider a distributed development environment in which a KM3 model can be modified by different persons. There is one centralized repository | |
| that contains the <i>"official"</i> version <i>M(v1)</i>. A developer recuperates M(v1), creates a personal working copy M(v2), and modifies it. | |
| Both versions must be synchronized (i.e., a new up to date version is created). The operation that synchronizes these two versions is called <i>Patch</i>. | |
| Before the patch can be executed, it is necessary to discover the <b>differences</b> | |
| between these models (see below). | |
| <p align="center"> | |
| <img src="../resources/diff_overview.png"/> | |
| <br /><br /> | |
| <b>Difference and Patch overview</b> | |
| </p> | |
| The calculation of the difference is divided in two phases: | |
| <ul> | |
| <li><b>Matching</b> : | |
| the matching phase identifies the elements that did not change between the two models (see the <a href="../matching">matching use case</a>). | |
| The result of a matching is saved in a weaving model. The weaving model contains equivalence links between the elements that were not | |
| modified in both KM3 models. | |
| </li> | |
| <li><b>Difference calculation</b> : | |
| the result of the matching is used to compute which elements were added, removed or modified. The difference algorithm is | |
| implemented using ATL transformations. It produces another weaving model that represents the difference between the two versions. | |
| This weaving model conforms to a metamodel extension for difference (as illustrated below). | |
| </li> | |
| </ul> | |
| <p/> | |
| This extension supports deletion or inclusion of elements. <i>Added</i> links are created for the elements that were added in the | |
| repository model. <i>Deleted</i> links are created for the elements that were removed. For instance, if a Class A is added in the Package B | |
| of the repository model, the addition element links the Package B (<i>from</i> reference) with Class A (<i>to</i> reference). | |
| <p align="center"> | |
| <img src="../resources/diff_metamodel.png"/> | |
| <br /><br /> | |
| <b>Difference metamodel extension</b> | |
| </p> | |
| The screenshot below shows the difference between the two KM3 models (Relational). The selected element is an <i>Added</i> link that indicates | |
| the <i>value</i> Attribute was added into the class <i>Named</i> in the new version. | |
| <p align="center"> | |
| <img src="../resources/diff_amw.png"/> | |
| <br /><br /> | |
| <b>Difference in the Atlas Model Weaver</b> | |
| </p> | |
| The difference weaving model is used as input to a <i>Patch transformation</i>. This transformation analyses the different kinds of links | |
| and executes the patch operation, i.e., addition or deletion of elements. | |
| <p/> | |
| <table border="3" width = "100%" cellspacing="0" cellpadding="20"> | |
| <td align="justify" bgcolor="#b0c8f4"> | |
| We illustrated this use case using KM3 models. The equivalence and the difference between the models elements are captured by weaving | |
| models. The operations (Match, Diff and Patch) are implemented using ATL transformations. | |
| <p/> | |
| We generalize our solution to perform the difference and patch independently of the metamodel. In this case higher-order transformations | |
| are used to analyse the input metamodels (e.g., KM3, SQL) and to produce ATL transformations that execute the metamodel-specific | |
| Match, Diff and Patch operations. | |
| </td> | |
| </table> | |
| <h4 STYLE="font-size: 10pt; padding: 0; border-bottom: 2px solid #49457C; | |
| background-position: top left; background-repeat; repeat-x;"> | |
| <a name="download">Download and examples</a></h4> | |
| <table> | |
| <COLGROUP> | |
| <COL width="25%"> | |
| <COL width="75%"> | |
| <tr> | |
| <td align="center"> | |
| <h3><a href="../../examples/difference/HOTMatchAndDiff.zip">Model difference</a></h3> | |
| </td> | |
| <td> | |
| This is a complete example of generic model difference and match. It contains the ATL transformations that | |
| generate the difference and the patch operations, and the weaving models that were produced. | |
| </td> | |
| </tr> | |
| <td align="center"> | |
| <h3><a href="../../examples/difference/HOTMatchAndDiff_doc.php">Example HowTo</a></h3> | |
| <td> | |
| This document is a step-by-step <b>HowTo</b> that explains how to execute the example. | |
| </td> | |
| </tr> | |
| </tr> | |
| </table> | |
| <h4 STYLE="font-size: 10pt; padding: 0; border-bottom: 2px solid #49457C; | |
| background-position: top left; background-repeat; repeat-x;"> | |
| <a name="related">Related use cases</a></h4> | |
| <table> | |
| <COLGROUP> | |
| <COL width="25%"> | |
| <COL width="68%"> | |
| <tr> | |
| <td align="center"> | |
| <a href="../matching/"><h3>Matching</h3></a> | |
| </td> | |
| <td> | |
| Matching is the generic process that creates weaving models. | |
| This use case gives a general overview of the matching process, and how it is handled by AMW and ATL. | |
| </td> | |
| </tr> | |
| <tr> | |
| <td align="center"> | |
| <a href="../compare/"><h3>Metamodel comparison</h3></a> | |
| </td> | |
| <td> | |
| This use case demonstrates how weaving models are used to compare different | |
| metamodels and to produce executable model transformations (we use two metamodels used to define embedded | |
| software in the avionics industry). | |
| </td> | |
| </tr> | |
| </table> | |
| <p/> | |
| <!-- | |
| <h4 STYLE="font-size: 10pt; padding: 0; border-bottom: 2px solid #49457C; background-position: top left; background-repeat; repeat-x;"> | |
| <a name="acknowledgement"></a> | |
| Acknowledgement | |
| </h4> | |
| <table width="100%"> | |
| <COLGROUP> | |
| <COL width="2%"> | |
| <COL width="98%"> | |
| </COLGROUP> | |
| <tr> | |
| <td></td> | |
| <td> | |
| The present work is supported by the <a href="http://www.modelplex-ist.org/">ModelPlex european project</a>. It was also developed in collaboration | |
| with <a href="http://www.sodifrance.com/en/index.php">Sodifrance</a>. | |
| </td> | |
| </tr> | |
| </table>--> | |
| </table> | |
| <p/> | |
| </div> | |
| EOHTML; | |
| # Generate the web page | |
| $App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html); | |
| ?> |