The MOFScript subproject aims at developing tools and frameworks for supporting model to text transformations, e.g., to support generation of implementation code or documentation from models. It should provide a metamodel-agnostic framework that allows usage of any kind of metamodel and its instances for text generation.
The MOFScript language was currently a candidate in the OMG RFP process on MOF Model to Text Transformation. The MOFScript subproject aims to support the MOFScript language in terms of editing, parsing, and execution.
The MOFScript subproject will cover the aspects needed in the context of text generation in software engineering, including:
Reverse engineering is kept out of scope at this time, but may be included in the scope at a later point in time.
At this time, code has been developed that supports parsing, checking, editing, and execution of MOFScript code. Currently, these are deployed as separate Eclipse plug-in components, which run within Eclipse. The parser and run-time may also be used independently of Eclipse.
The following code is ready for submission to an Eclipse MOFScript subproject:
An initial user guide and examples will also be made available.
The MOFScript tool is developed as two main logical architectural parts: tool components and service components (see Figure 1). The tool components are end user tools that provide the editing capabilities and interaction with the services. The services provide capabilities for parsing, checking, and executing the transformation language. The language is represented by a model (the MOFScript model), an Eclipse Modeling Framework (EMF) model populated by the parser. This model is the basis for semantic checking and execution. The MOFScript tool is implemented as an Eclipse plug-in using the EMF plug-in for handling of models and metamodels.
The Service Components consist of these component parts: The Model Manager is an EMF-based component which handles management of MOFScript models. The Parser and Lexer are responsible for parsing textual definitions of MOFScript transformations, and populating a MOFScript model using the Model Manager. The parser is based on antlr. The Semantic Checker provides functionality for checking a transformation’s correctness with respect to validity of the rules called, references to metamodel elements, etc. The Execution Engine handles the execution of a transformation. It interprets a model and produces an output text, typically to a set of output files. The Text Synchroniser handles the traceability between generated text and the original model, aiming to be able to synchronize the text in response to model changes and vice versa.
The MOFScript binaries are available for download, please see the descriptions at http://www.modelbased.net/mofscript
At this time, MOFScript is developed in a development community at SINTEF, supported and tested by the European Integrated Project MODELWARE (IST Project 511731). We will continue development of MOFScript in this context.
The MODELWARE project, and other successor projects will provide the necessary time and resources to ensure a continuity of development in the subproject.
We will encourage user communities to use the technology and contribute to improvement through feedback. We will also encourage user and external developers to contribute examples, reusable transformations, and code.
We aim to involve users and developers through publicity in publications, conferences, and presentations. We will also use and encourage usage of MOFScript in lecturing at University courses in model-driven development.