Model-to-Metamodel (M2MM) Transformations Tooling

Model-to-Metamodel Transformations
Model-to-Metamodel Transformations

Tool:

  • core_tools.zip
  • M2MM_tool.zip
    The model-to-metamodel transformation uses the following tools:
    • CUP - LALR Parser Generator in Java

      CUP Parser Generator Copyright Notice, License, and Disclaimer

      Copyright 1996-1999 by Scott Hudson, Frank Flannery, C. Scott Ananian

      Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both the copyright notice and this permission notice and warranty disclaimer appear in supporting documentation, and that the names of the authors or their employers not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.

      The authors and their employers disclaim all warranties with regard to this software, including all implied warranties of merchantability and fitness. In no event shall the authors or their employers be liable for any special, indirect or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of this software.


      This is an open source license. It is also GPL-Compatible (see entry for "Standard ML of New Jersey"). The portions of CUP output which are hard-coded into the CUP source code are (naturally) covered by this same license, as is the CUP runtime code linked with the generated parser.

      Java is a trademark of Sun Microsystems, Inc. References to the Java programming language in relation to JLex are not meant to imply that Sun endorses this product.

    • JFlex - The Fast Scanner Generator for Java

      JFlex is free software, published under the terms of the GNU General Public License.

      There is absolutely NO WARRANTY for JFlex, its code and its documentation.

      The code generated by JFlex inherits the copyright of the specification it was produced from. If it was your specification, you may use the generated code without restriction.
    • classgen
      classgen and all it's future versions are free software and released under GPL.

Example:

Installation Instructions:

  1. Download core_tools.zip, M2MM_tool.zip, and M2MM_example.zip from this site
  2. Download and install Eclipse Modeling Tools from http://www.eclipse.org/downloads/
  3. Start Eclipse
  4. Open Help -> Install Modeling Components
    • Under Model To Text select Xpand
    • Under Concrete Syntax Development select Extended Editing Framework
    • Press Finish to install selected features
  5. Open File -> Import ...
    • Select General -> Existing Projects into Workspace
    • Under Select archive file: enter path to core_tools.zip
    • Import all the projects in the archive file
  6. Open Run -> Run Configurations ...
    • Select Eclipse Application
    • Create a new one
    • Press Run
  7. Open File -> Import ...
    • Select General -> Existing Projects into Workspace
    • Under Select archive file: enter path to M2MM_tool.zip
    • Import all the projects in the archive file
    • Select General -> Existing Projects into Workspace
    • Under Select archive file: enter path to core_tools.zip
    • Import the project org.eclipse.emf.ecore from the archive file
    • Note: The model-to-model tool is contained in the project org.fortiss.m2mm.
  8. Open Run -> Run Configurations ...
    • Select Eclipse Application
    • Create a new one
    • Press Run
  9. Open File -> Import ... in the new Eclipse Instance
    • Select General -> Existing Projects into Workspace
    • Under Select archive file: enter path to M2MM_example.zip
    • Import the project in the archive file
  10. Open file src/ant/build.xml of project m2mm_example
    • Note: Task can be executed by selecting them in the Outline view and selecting Run As -> Ant Build form the context menue. When executing the first task open Run As -> Ant Build .... On the register JRE select Run in the same JRE as the workspace and on the register Refresh select Refresh resources after completion and The project containing the selected resource.
    • Tasks capability types (hardware level 4), hardware specification (hardware level 3), hardware (hardware level 2), and nodes (hardware level 1) executes the model-to-metamodel transformations for hardware
      • Input: src/model/CapabilityTypes.xmi, src/model/HardwareSpecification.xmi, src/model/Hardware.xmi, and src/model/Nodes.xmi
      • Output: src-gen/metamodel/capabilitytypes.ecore, src-gen/metamodel/hardwarespecification.ecore, src-gen/metamodel/hardware.ecore, and src-gen/metamodel/nodes.ecore
    • Tasks services (services level 2) and service instances (services level 1) executes the model-to-metamodel transformations for software
      • Input: src/model/Services.xmi and src/model/ServiceInstances.xmi
      • Output: src-gen/metamodel/services.ecore and src-gen/metamodel/serviceinstances.ecore
    • Task clean all deletes all generated files

Model-to-Model (M2M) Transformations Tooling

Model-to-Model Transformation Chain
Model-to-Model Transformation Chain

Tool: 

Example:

Installation Instructions:

  1. Download M2M tool.zip and M2M_example.zip from this site
  2. Download and install Eclipse Modeling Tools from http://www.eclipse.org/downloads/
  3. Start Eclipse
  4. Open Help -> Install Modeling Components
    • Under Model To Text select Xpand
    • Under Concrete Syntax Development select Extended Editing Framework
    • Press Finish to install selected features
  5. Open File -> Import ...
    • Select General -> Existing Projects into Workspace
    • Under Select archive file: enter path to M2M_tool.zip
    • Import all the projects in the archive file
    • Note: The model-to-model tool is contained in the project org.fortiss.m2m.
  6. Open Run -> Run Configurations ...
    • Select Eclipse Application
    • Create a new one
    • Press Run
  7. Open File -> Import ... in the new Eclipse Instance
    • Select General -> Existing Projects into Workspace
    • Under Select archive file: enter path to M2M_example.zip
    • Import the project in the archive file
  8. Open file src/ant/build.xml of project m2m_example
    • Note: Task can be executed by selecting them in the Outline view and selecting Run As -> Ant Build form the context menue. When executing the first task open Run As -> Ant Build .... On the register JRE select Run in the same JRE as the workspace and on the register Refresh select Refresh resources after completion and The project containing the selected resource.
    • Task MM2MM transformations executes the metamodel-to-metamodel transformations
      • The MM2MM transformations are described by the model files src/model/model_combination.modeltransformation and src/model/model_refinement.modeltransformation
      • Input: src/metamodel/hardware.ecore, src/metamodel/software.ecore, src/model/model_combination.modeltransformation, and src/model/model_refinement.modeltransformation
      • Output: src-gen/metamodel/combination.ecore, src-gen/metamodel/refinement.ecore, and metamodel code under src-gen/org.fortiss.tooling.m2m
    • Task M2M transformations executes the model-to-model transformations
      • The M2M transformations are described by the transformation files src/extend/m2m_transformation_combination.ext and src/extend/m2m_transformation_refinement.ext
      • Input: src/model/Hardware.xmi, src/model/Software.xmi, src/model/model_combination.modeltransformation, and src/model/model_refinement.modeltransformation
      • Output: src-gen/model/Combination.xmi and src-gen/model/Refinement.xmi
      • Note: After executing M2M transformations the files can not be opened with the default editor. To correct that problem schema location entries have to be entered to the main tags (combination:Combination and refinement:Combination) of those files. The schema location entries can be found in src/model/SchemaLocations.txt.
    • Task clean all deletes all generated files

Contact

Gerd Kainz


fortiss GmbH - An-Institut der Technischen Universität München

Guerickestraße 25 | 80805 München | Deutschland
Tel: +49 89 3603522 0 | Fax: +49 89 3603522 50
info@fortiss.org | Impressum | Datenschutzerklärung