Tooling for Executable Metamodelling with xMOF
By Simon Georg Hecht, Christoph Kubin, Melanie Nothmüller,
and Angela Purker
Model execution is very useful for
fast prototyping, trace analysis, and many other areas. One important
executable modeling language is foundational UML (fUML) - a subset of UML that
is executable thanks to a standardized execution semantics. xMOF lifts fUML a
meta-level up to the meta-metamodel level M3 to enable the precise
specification of the execution semantics of behavioral modelling languages. Therewith,
it allows leveraging fUML’s execution semantics for executing models compliant
to such behavioral modeling languages defined with xMOF.
Model execution - and especially model
execution of fUML and xMOF models - is a very young topic in the modelling
domain and therefore also the tools for model execution are not yet in a mature
state. However, to enable the work with executable models like xMOF, it is
necessary to have tools providing efficient and effective support for the
modelling process. To bring this to a different context, a Java developer needs
a good IDE to ease his/her development process. It is the same for the model-based
approach. To ease the modelling process, good tools are needed. But model
execution is not as old as Java development, so the tools do not support all
needed tasks yet.
Improvements of the xMOF Editor and Debugger
The purpose of the xMOF editor is to
allow an efficient and effective creation of xMOF models. Besides editing
support, it is very important to have a debugger to trace the model execution and
thereby simplify troubleshooting when errors occur. Both tools can also improve
the understandability of the created model itself.
xMOF Editor
There is already an editor available
for xMOF providing basic editing functionality needed to create xMOF
models.
The structure of the xMOF editor is
subdivided in 4 major parts as you can see in the figure above. On the left
hand side (1) there is the tree-based structural view similar to the standard Ecore
modelling view. In the middle (2) there is the activity editor itself, based on
Graphiti. It is the editor for creating activities in a graphical way. On the right
hand side (3) there is the feature palette for the activity editor. At the
bottom (4) there is the standard property view for editing the elements in the
diagram as well as in the structural view.
Our goal was to enhance the efficiency, effectiveness, and usability of the xMOF editor. Therefore, we extended the original xMOF editor in the following way:
- First, we implemented and improved the initialization of xMOF model elements to speed up the modeling process and reduce potential error sources.
- Second, we added support for the visualization and editing of xMOF model elements contained within other elements, which could before be only edited in the tree-based structural view.
- Third, we automated the modeling steps needed when overriding the behavior of operations defined in xMOF models.
- Fourth, we implemented some heretofore missing usability features of the editor, in particular, the closing and moving of tabs opened within the xMOF editor.
- Fifth, we implemented a specialized validation for xMOF facilitating the localization of potential bugs in xMOF models.
xMOF Debugger
xMOF Debugger |
For debugging, an fUML debug plugin was already available, which was taken as basis for the new xMOF debug plugin. While the fUML debug plugin was able to debug plain fUML models, our goal was to expand its applicability to xMOF models. Therefore, the most important step was the generalization of the debug functionality for both languages fUML and xMOF in order to avoid code duplicates in the two debug plugins. Another improvement - which is a result of the generalization - is the implementation of the stepping mechanism (use of the debugging methods stepInto(), stepOver() and stepReturn() from the Eclipse debug toolbar) for the xMOF debug plugin. The figure above gives an overview of the newly created classes in the generalized plugin and shows the elements in the Eclipse debug perspective for xMOF.
Outlook
Throughout the project we identified
many more interesting improvements of the xMOF editor and debugger. Further
improvements for the xMOF editor in detail could be:
- A more customized property view showing only the necessary properties
- Direct editing features for the diagram components
- Context buttons for object suggestions
- Enabling the creation and setting of pins in the graphical representation
- Layouting of diagrams, e.g. allowing color for any activity object
- Decorating the activity diagrams based on the errors of validation
- A better validation/error output
- A more sophisticated approach on the modularity of validators, for example a setting window where you can choose which validators are needed for your project
- Live validation and markers
The
xMOF debugger currently supports basic debug functionality, such as stepping
through activity diagrams. However, interesting further and more advanced features include trace
visualization, such as the visualization of a debugged model’s state as an
object diagram.