Wednesday, July 20, 2016

Interactive Model Animator for xMOF Models

By Matthias Hoellthaler and Tobias Ortmayr


Model-driven Development (MDD) gained significant popularity over the last couple of years. Because of the higher abstraction of domain-specific languages it is possible to minimize redundant activities and improve the understandability of complex problems. This leads to a software development process which is less code-centric and more model-centric. Models are no longer only used to document design decisions, but became the main development artifact and source for code generation. Therefore, adequate techniques for ensuring the quality of models and their correctness in terms of expected behavior are necessary.

Existing ecosystems like the Eclipse Modelling Framework (EMF) provide profound tooling support for well-established concepts but are lagging behind current trends and developments like executable Domain Specific Modelling Languages (xDSML). The research field of xDSML is in comparison a relative young one. Unfortunately, this results in a lack of well established standards. The Moliz project provides with xMOF a promising approach for specifying xDSMLs based on the OMG standards MOF and fUML.

The aim of this project was to build a prototype of a model animator for xMOF models to improve the tool support for xMOF. This animator extends the debugging functionality of the Moliz model execution engine by interpreting debugging events to retrieve information about the current execution state of the model and using this information to visualize the state in the graphical representation (in this case activity diagrams). The animator supports node-wise stepping of xMOF activities and animates the activity diagrams to give the language designer a visual feedback about the state of the ongoing execution. To facilitate the integration into the Moliz project the model animator is implemented as an Eclipse plug-in. We implemented the animation in Graphiti and Sirius to demonstrate the differences between the two approaches.

Animation with Graphiti

In Figure 1 we see the Graphiti-based animator during the execution of a Petri net. As we can see in the bottom right, the nodes of the activity diagram are animated. Even after the end of an activity they are still animated for better traceability. They will only be reset if the activity diagram is executed again.

Animation with Graphiti
Figure 1: Animation with Graphiti

Animation with Sirius 

In Figure 2 we can see the same model. This time it is animated with Sirius. Both animators provide comparable functionality, however, the Sirius-based animator provides a more sophisticated animation of activity diagrams.

Animation with Sirius
Figure 2: Animation with Sirius


The project should be extended in the future to further improve the tooling support. The following features are the most promising ones:

  • Animation support for simultaneously executing activities should be supported. In particular, if two or more caller execute the same activity, the current state of the diagram is currently overwritten by the newest caller.
  • Interactive stack traces are a useful addition to give the possibility for navigating between activity diagrams.
  • The Sirius editor should be capable of representing all xMOF metaclasses. At the moment only the Activity metaclass and associated elements are represented.
  • A better mapping algorithm should be implemented to guarantee a correct mapping between model elements and diagram elements. At the moment the name property of an element needs to be unique. A violation of this constraint can cause unexpected behavior.


The source code of the project can be found on Github.

No comments:

Post a Comment