xMOF (eXecutable MOF) is a metamodeling language integrating fUML with MOF which enables the specification of the behavioral semantics of domain-specific modeling languages (DSML).
With xMOF the behavioral semantics of a DSML is specified by introducing operations in the DSML’s metamodel and by providing an implementation of these operations using the fUML action language. These implementations define the behavior of the DSML. The usage of fUML for specifying the behavioral semantics enables the execution of models conforming to the DSML by leveraging the fUML virtual machine.
For developing executable DSMLs using xMOF we elaborated a methodology fostering the separation of the specification of the abstract syntax, the behavioral semantics, and additional data that is needed for the execution of domain-specific models.
We also developed an EMF-based implementation of this methodology which enables the definition of executable DSMLs using xMOF as well as the execution of domain-specific models according to the semantics specification of the DSML.
Figure 1 depicts our tool-supported methodology. In the first step language design the DSML is developed by specifying its abstract syntax by means of an Ecore-based metamodel as well as its behavioral semantics using fUML resulting in an xMOF-based configuration of the DSML. In the model creation step, a model of the before developed DSML is created. In order to enable the execution of the created model, the semantics specification of the DSML has to be instantiated for this specific model resulting in an xMOF-based model of the domain-specific model. This is done in the model execution preparation step. For providing the result of the model execution to the modeler, we make use of the EMF Profiles mechanism. Thus, a runtime profile has to be generated once for a semantics specification in the execution infrastructure generation step. In the last step model execution, the domain-specific model is finally executed according to the semantics specification leveraging the fUML virtual machine and runtime information about the model execution is provided as feedback to the modeler in the form of an application of the generated runtime profile on the executed domain-specific model.
The following screencasts demonstrate the xMOF tool support implemented for Eclipse.
Language Design and Execution Infrastructure Generation
This screencast demonstrates the following tasks.
- Generation of xMOF-based configuration from Ecore-based metamodel
- Specification of the semantics in xMOF-based configuration
- Generation of runtime profile from xMOF-based configuration
Model Creation and Model Execution Preparation
This screencast shows the following tasks.
- Creation of a domain-specific model
- Instantiation of the xMOF initialization classes for defining additional input for the execution of the domain-specific model
This screencast shows the following tasks.
- Execution of a domain-specific model
- Loading of the stereotype application providing the result of the model execution
- Metamodel of xMOF: xmof.ecore
You can also view the xMOF metamodel in the MetaModelbrowser: xmof.ecore
- Source code
- Update Site: http://www.modelexecution.org/updates/
Visit the installation guide for more details
We carried out case studies were we used xMOF for developing three executable DSML and executed models conforming to these DSMLs. The following DSMLs were considered in the case studies.
- Petri Net DSML Variant 1
- Petri Net DSML Variant 2
- Finite State Automata DSML
- Imperative Modeling Language
T. Mayerhofer, P. Langer, M. Wimmer, G. Kappel. xMOF: Executable DSMLs based on fUML. In: Proceedings of the 6th International Conference on Software Language Engineering (SLE), Springer, LNCS 8225, 2013, 1 – 20.
T. Mayerhofer. Using fUML as Semantics Specification Language in Model Driven Engineering. In: Proceedings of Satellite Events of MODELS 2013, CEUR, 2013, 1 – 6.
T. Mayerhofer, P. Langer, M. Wimmer. xMOF: A Semantics Specification Language for Metamodeling. In: Proceedings of Satellite Events of MODELS 2013, CEUR, 2013, 1 – 5.
Tanja Mayerhofer, Philip Langer, and Manuel Wimmer. Towards xMOF: Executable DSMLs based on fUML. In Proceedings of the 2012 Workshop on Domain-specific modeling, DSM ’12, 2012. ACM.