| <?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' |
| |
| #***************************************************************************** |
| # |
| # AMW_Match_SF_doc.php |
| # |
| # Author: Marcos Didonet Del Fabro |
| # Date: 2005-07-24 |
| # |
| # Description: Type your page comments here - these are not sent to the browser |
| # |
| # |
| #**************************************************************************** |
| |
| # |
| # Begin: page-specific settings. Change these. |
| $pageTitle = "Generation of ATL after executing equality and structural matchings"; |
| $pageKeywords = ""; |
| $pageAuthor = "Marcos Didonet Del Fabro"; |
| |
| # Paste your HTML content between the EOHTML markers! |
| $html = <<<EOHTML |
| |
| <!-- Main part --> |
| <div id="midcolumn"> |
| <table width="100%"> |
| <tr> |
| <td width="50%"> |
| <h1>$pageTitle</h1> |
| </td> |
| </tr> |
| </table> |
| |
| <p> |
| This example uses matching transformations to produce a weaving model between two versions of |
| the same metamodel. |
| It uses the same algorithms from the <a href="../AMW_Match_SF/AMW_Match_SF_doc.php">AMW_Match_SF</a> example (see below). |
| This example automatically produces an ATL transformation. |
| |
| <p/> |
| |
| This example modifies the <a href="http://www.eclipse.org/gmt/am3/zoos/atlanticZoo/#Book">Book.km3</a> |
| metamodel available the Atlantic Zoo. |
| This way we have two versions of the same metamodel. <br/> |
| This example executes a set of matching transformations to automatically produce |
| a weaving model. The weaving model contains links between the old and new versions of the metamodels. |
| |
| <h2>Instructions</h2> |
| |
| <h4>Executing the transformations</h4> |
| |
| <p/> |
| There is an Ant Script (scripts/executeAll.xml) that produces a weaving model |
| (models/mw_refined_match.ecore) between two metamodels (models/Book.ecore and models/BookNew.ecore). |
| BookNew.ecore is a modified version of Book.ecore. This weaving model in |
| The script executes the following actions: |
| <ul class="midlist"> |
| |
| <li> |
| Executes the PropagationGraph.atl transformation. This transformation creates the cartesian product |
| between the elements of the input metamodels and it calculates a similarity value between every pair of elements. |
| The similarities are calculated using the name, cardinality and type. |
| </li> |
| <li> |
| Executes the SimilarityFlood.atl transformation. It propagates the similarity values |
| calculated by PropagationGraph.atl through the elements that are connected. |
| </li> |
| <li> |
| Executes the Selects_SF_amw.atl transformation. This transformation selects a set of nodes with the best |
| similarity values and creates a weaving model (models/mw_refined_match.ecore). |
| </li> |
| <li> |
| Executes the hot/AMWtoATL_Match.atl transformation. This transformation takes as input the weaving model |
| generated by the matching transformations and it produces an ATL model as output (output/Book2BookNew.ecore). |
| </li> |
| <li> |
| Extracts the output/Book2BookNew.ecore model into an ATL file. |
| </li> |
| </ul> |
| <p/> |
| |
| <h4>Loading the weaving model into AMW:</h4> |
| The weaving model (models/mw_refined_match.amw) can be loaded by double-clicking on the |
| file or by using the wizard. |
| <p/> |
| |
| <b>Remarks:</b></br> |
| <ul class="midlist"> |
| <li> |
| The ATL transformations can also be executed separatedly by using the corresponding launch configuration scripts. |
| </li> |
| <li> |
| The PropagationGraph.atl transformation contains rules that match more than one input element. This |
| is a new feature still under testing that will be officially available in the new version of the ATL compiler. |
| To be able to execute this transformation, a beta version of the new compiler is available at compiler/ATLToASMCompiler.asm. <br/> |
| This file must be copied into "org.atl.eclipse.engine/src/org/atl/eclipse/engine/resources". More about the |
| compiler <a href="http://wiki.eclipse.org/index.php/Examples_HowTo">here</a>. |
| </li> |
| <li> |
| The "for" task that executes the SimilarityFlooding.atl transformation several times is not a |
| standard Ant task, but a task available at the <a href="http://ant-contrib.sourceforge.net/">Ant Contrib project</a>. |
| It is necessary to install the "for" task as described |
| <a href="http://ant-contrib.sourceforge.net/tasks/index.html">here</a>. |
| </li> |
| <li> |
| The SimilarityFlood.atl transformation has some performance issues when matching large models. |
| </li> |
| <li> |
| The final output transformation contains one expression that cannot be executed (transformation of <i>authors</i>). |
| This shows the necessity to create more accurate matching transformations. More complex examples |
| with more complex heuristics will be available gradually in this site. |
| </li> |
| |
| </ul> |
| <p/> |
| |
| </div> |
| |
| EOHTML; |
| |
| |
| # Generate the web page |
| $App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html); |
| ?> |