Skip to content

MultEcore tool, related to the PhD thesis 'Multilevel Modelling and Domain-Specific Languages'

License

Notifications You must be signed in to change notification settings

femaciasg/multecore

Repository files navigation

MultEcore

MultEcore

MultEcore is a metamodelling tool which brings together the best of the worlds of fixed-level and multilevel metamodelling approaches.

The tool consists of two parts, created as plugins for the Eclipse Modelling Framework (EMF). The main set of plugins provide an editor based in Sirius. It combines the tool support, modelling ecosystem and low learning curve of EMF with the unlimited number of abstraction levels, potencies and flexible typing of multilevel metamodelling. A second part of the tool allows for the specification of Multilevel Coupled Model Transformations that exploit the multilevel capabilities of the framework for model manipulation.

MultEcore is developed at the ICT Engineering Department of the Western Norway University of Applied Sciences. It has also been used in a joint work with University of Lübeck and a joint work with Universidad Autónoma de Madrid, which led to the creation of a tool for MLM rearchitecting and MLM tool exchange, available on Github.

Installation and usage

Main tool

Installation

  1. Download and install the Eclipse Oxygen Modelling package.
  2. Install Sirius and Xtext using the "Install modelling components" button.
  3. Close Eclipse.
  4. Install MultEcore by putting the plugin files (and the optional MCMT-related plugin files) in your plugins directory. Alternatively, if you want to install MultEcore directly from the source, clone the repository (see Source below), import the projects, and click "Run as..." > "Run as Eclipse Application". The second instance of Eclipse will have MultEcore available.
  5. Start Eclipse again.

Working with EMF

  1. Create a General Eclipse project.
  2. Create a metamodel.
  3. Activate MLM by clicking MultEcore’s button.
  4. Create a new dynamic instance by right-clicking in the Root EClass, which is always created automatically by MultEcore.
  5. A new Ecore representation, AIRD file for the graphical editor and MEF internal file are created to the new instance, so that it can be edited and used as a metamodel for the next level (and therefore repeat step 4).

MLM can be deactivated and reactivated as long as all file changes are saved. While active, the plugin will take care of maintaining the hierarchy every time a model (XMI), metamodel (Ecore) or representation (AIRD) is saved. If the created model is invalid, the tool will raise an error (see Troubleshooting). If this happens, the model will be restored to the last saved change, so it is recommended to save often!

We also recommend working with the graphical editor, to avoid dealing with annotations and synthetic attributes generated by the tool to maintain multilevel information in the Ecore and XMI files.

Importing an existing MLM project

  1. Import it normally using the Eclipse wizard.
  2. Activate MLM.

See Resources for example projects with multilevel hierarchies.

Demo and tutorial

Check a video demo and tutorial on YouTube.

Adding supplementary hierarchies

To be able to incorporate a supplementary hierarchy, you will need to have at least two projects where MultEcore is enabled.

Let us assume you want to add H2 as supplementary of H1:

  1. Right-click in H1 project, go to "MultEcore" and select "Add supplementary hierarchies".
  2. In the dialog, select the entry for H2 and press "OK".
  3. Now, it is recommendable to close the tabs for the editors if some of them are opened. Refresh the H1 project and also the AIRD file of the model where we will add supplementary types to the elements.
  4. Open the "metamodelDiagram" of the model in H1 where you will add the supplementary types.
  5. Select the canvas and, in the "Properties" view there should be, in the "MultEcore" tab, a list with the supplementary Hierarchies added (H2 in this case). In the textbox, put the name of the model of H2 from where the supplementary types will come. Select again the canvas and save.
  6. To add a supplementary type to a node, select the node. In the "Properties" view, "MultEcore" tab, there should be a droplist that has the name of the model of H2. Each item in the droplist is one of the nodes residing in the supplementary model and can be selected.

Troubleshooting/FAQs

  • Q: I get an "Invalid Thread" error when I create a first project and activate MLM.

    • A: Make sure you have the "Hierarchy View" vew opened and active. Close the error message and expand the *.aird file created. If there are two "Representations per category" folders. If so, remove the entire *.aird file, deactivate MLM and activate it again in the project. Now the *.aird file should be properly created and ready to use.
  • Q: My diagram appears empty, even if the model is not.

    • A: Check that the "Unsynchronized" option is not enabled, by right clicking in the canvas of the diagram (see the screenshot below), and then refresh the diagram, also by right-clicking or pressing F5.

    Unsynchronized

  • Q: I get a pop-up window telling me that I am doing something wrong. For example:

    Popup

    • A: The tool controls that the types and potencies of the elements are consistent. Double check that you are not trying to do something not allowed!
  • Q: I get ugly errors and exceptions.

    Error

    • A: The tool is still a prototype, and some actions may break it. In some cases, you can safely ignore the error and continue working. In the worst case scenario, deactivating and reactivating MLM (and ignoring the new errors that may appear) normally gets the tool back to a consistent state.
  • Q: Can I push the enable/disable button at anytime?

    • A: Only when a project or a file/folder inside it is selected in the Project Explorer (not the Java Package Explorer or any similar tree-based explorer). The project must contain some model files, or MLM will not be activated.
  • Q: Do I always need to create an instance by right-clicking on the Root EClass?

    • A: Yes. An instance created by using another EClass as root will not be compatible with MultEcore.
  • Q: Which version of Java do I need to run MultEcore?

    • A: Version 1.8.X (Java 8) or newer.
  • Q: When adding supplementary hierarchies and types, the fields appear empty.

    • A: Close the editors, and refresh the projects/representation files to get them updated.

MCMT tool

Resources and tutorials for the MCMT-related part of the tool are available in the MultEcore website and in the MultEcore MCMT repository.

Source

A stable version of the source code of the main tool, discussed in the PhD thesis "Multilevel Modelling and Domain-Specific Languages" can be found on Github. An updated version of the code created afterwards, together with other parts of the tool and more examples are available on Bitbucket.

The plugins which conform the main part of the tool are three:

  • common: Contains common classes used by the rest of the plugins to represent multilevel hierarchies, throw exceptions, keep a registry of models, etc.
  • core: Performs the necessary transformations to keep the Ecore/XMI representations of each level synchronized.
  • editor: Sirius-related code for the graphical editor of multilevel models.

The stable versions of the plugins are also available as JAR files which can be directly added to EMF.

Publications

PhD Theses

  • Fernando Macias. Multilevel Modelling and Domain-Specific Languages. PhD thesis submitted to the Faculty of Mathematics and Natural Sciences. No. 2141. ISSN 1501-7710, University of Oslo, June 2019. [arXiv]

Journals

  • Fernando Macias, Uwe Wolter, Adrian Rutle, Francisco Duran, and Roberto Rodriguez-Echeverria. Multilevel Coupled Model Transformations for Precise and Reusable Definition of Model Behaviour. J.LAMP, 106:167– 195, August 2019. [arXiv]
  • Fernando Macias, Adrian Rutle, Volker Stolz, Roberto Rodriguez-Echeverria, and Uwe Wolter. An Approach to Flexible Multilevel Modelling. Enterprise Modelling and Information Systems Architectures, 13:10:1– 10:35, 2018. [EMISAJ]

Workshops

  • Alejandro Rodriguez and Fernando Macias. Multilevel Modelling with MultEcore: A contribution to the MULTI Process challenge. In 6th International Workshop on Multi-Level Modelling (MULTI2019), pages 152–163, 2019. [CEUR-WS (to appear)]
  • Fernando Macias, Volker Stolz, Torben Scheffel, Malte Schmitz, and Adrian Rutle. Empowering Multilevel DSMLs with Integrated Runtime Verification. In 3rd International Workshop on Verification of Objects at Runtime Execution (VORTEX 2019), To appear on EPTCS, 2019. [EPTCS (to appear)]
  • Alejandro Rodriguez, Adrian Rutle, Francisco Duran, Lars Michael Kristensen, and Fernando Macias. Multilevel modelling of coloured Petri nets. In 5th International Workshop on Multi-Level Modelling (MULTI2018), volume 2245 of CEUR Workshop Proceedings, pages 663–672, 2018. [CEUR-WS]
  • Fernando Macias, Adrian Rutle, and Volker Stolz. Multilevel Modelling with MultEcore: A Contribution to the MULTI 2017 Challenge. In 4th International Workshop on Multi-Level Modelling (MULTI2017), volume 2019 of CEUR Workshop Proceedings, 2017. [CEUR-WS]
  • Fernando Macias, Adrian Rutle, and Volker Stolz. MultEcore: Combining the best of fixed-level and multilevel metamodelling. In 3rd International Workshop on Multi-Level Modelling (MULTI2016), volume 1722 of CEUR Workshop Proceedings, 2016. [CEUR-WS]
  • Fernando Macias, Torben Scheffel, Malte Schmitz, and Rui Wang. Integration of Runtime Verification into Metamodeling for Simulation and Code Generation (Position Paper). In 16th International Conference in Runtime Verification (RV 2016), pages 454–461, 2016. [Springer]

Technical reports

  • Uwe Wolter, Fernando Macias, and Adrian Rutle. On the Category of Graph Chains and Graph Chain Morphisms. Technical Report 2017-416, University of Bergen, Department of Informatics, January 2018. [UiB]

Resources

  • The MultEcore website. [Website]
  • The plugin files for the tool. [Main] [MCMT]
  • The repositories with the source code. [Main] [Main - stable] [MCMT]
  • The video tutorial that demonstrates the common way of using the main part of the tool. [Youtube]
  • The project with the multilevel hierarchy created in the video demo. [ZIP]
  • The project with the multilevel hierarchy for the PLS example. [ZIP]
  • Repositories with more example projects with multilevel hierarchies. [Bitbucket]
  • SVG files containing the source of the big commutative diagrams in the PhD thesis "Multilevel Modelling and Domain-Specific Languages" (see Publications), with layers that can be disabled to ease readability. [ZIP]

License

MultEcore is offered under the GNU General Public License, version 3.

Contact

Fernando Macias – http://fernandomacias.es

Alejandro Rodriguez - [email protected]

Adrian Rutle – [email protected]

Volker Stolz – [email protected]

About

MultEcore tool, related to the PhD thesis 'Multilevel Modelling and Domain-Specific Languages'

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages