|
OverviewThe aim of the MARS system is to be able to infer a metamodel from a collection of instance models. The motivating problem was to address the issue of metamodel drift, which occurs when instance models in a repository are separated from their defining metamodel. In most metamodeling environments, the instance models cannot be loaded properly into the modeling tool without the metamodel. Some examples of problems that require the need to recover or reverse engineer a metamodel are: losing a metamodel definition due to a hard-drive crash, and encountering versioning conflicts when trying to load instance models (also called domain models) based on obsolete metamodels. From our experience in model-driven engineering, it is often the case that a metamodel undergoes frequent evolution, which may result in previous instances being orphaned from the new definition. The key contribution of this system is the application of grammar inference algorithms to the metamodel recovery problem. Although the application of MARS has focused specifically on recovering metamodels for the GME, we believe that the same process can be applied to other metamodeling tools, such as MetaCase's metaEdit+ (http://www.metacase.com) and Honeywell's Domain Modeling Environment (DOME) (http://www.htc.honeywell.com/dome/). As an area of future work, we plan to explore the ability to apply MARS to these other environments. The remainder of this concluding section provides a discussion of experimental results, limitations of the current approach, and details about where to find more information about the MARS project. The MARS SystemThe figure below gives an overview of the MARS system:
Figure
1. Overview of MARS An overview of MARS is illustrated in Fig. 1. At the core of the system, the metamodel inference process begins with the translation of a set of instance models in XML (most modeling tools provide a capability to export a model as an XML file) into a Domain-Specific Language called the MRL (Model Representation Language) that filters the accidental complexities of the XML representation of a model in order to capture the essence of the instance models (step 1 in Fig. 1). The inference is performed within the LISA language description environment (step 2 in Fig. 1) which is an interactive environment for programming language development and was chosen for this project because of its benefits in designing DSLs. Moreover, the LISA system has been used successfully in our evolutionary-based context-free grammar (CFG) inference engine. The result of the inference process is a context-free grammar that is generated and concurrently transformed to the inferred metamodel in XML file (the transformation was formalized), which can be used to load the instance models into the modeling tool (step 3 in Fig. 1). The MARS system is a step-by-step application of the following tasks:
Download the files here: XSLT Transformer [step2] Latest: Version 2.0 Mars LisaTransformer [step4] Latest: Version 4.1 The key technologies used in MARS are: 1. Grammar InferenceInductive learning is the process of learning from examples. The related area of grammatical inference can be defined as a particular instance of inductive learning where the examples are sets of strings defined on a specific alphabet. In MARS, grammar inference techniques are used to mine information about metamodels from available instance models by first representing the visual metamodels as an equivalent textural representation in a Domain-Specific Language, MRL, and then performing language inference techniques on it. 2. Generic Modeling EnvironmentThe Generic Modeling Environment (GME) is a modeling tool used in MARS. The GME is a modeling environment that can be configured and adapted from meta-level specifications (called the metamodel, or modeling paradigm) that describe the domain. When using the GME, a modeler loads a metamodel into the tool to define an environment containing all the modeling elements and valid relationships that can be constructed in a specific domain. Models are stored in the GME as objects in a database repository, and an API is provided by GME for model traversal using a standard integration mechanism (i.e., Microsoft Component Object Model http://www.microsoft.com/com). The GME tool can be downloaded from http://www.isis.vanderbilt.edu/Projects/gme 3. The LISA Language Development EnvironmentLISA is an interactive environment for programming language development where users can specify, generate, compile-on-the-fly and execute programs in a newly specified language. From the formal language specifications and attribute grammars, LISA produces a language-specific environment that includes a compiler/interpreter and various language-based tools (e.g., language knowledgeable editor, visualizers, and animators) for the specified language. LISA was created to assist language designers and implementers in incremental language development of Domain Specific Languages. The Model Representation Language (MRL) and the metamodel inference engine in MARS were implemented using LISA. The LISA tool can be downloaded from http://marcel.uni-mb.si/lisa/ Experimental DomainsTo measure the effectiveness of MARS, we applied the system to both single-tiered domains and multi-tiered domains which are distinguished with each other by the number of viewpoints they could allow users to capture. For multi-tiered domains, they could allow users to capture multiple viewpoints of the system while single-tiered domains only allow users to capture a single one viewpoint of the system. In GME each viewpoint is established as a separate folder (a model organization concept in GME) under the "Root Folder"to store its own elements. But for single-tiered domains all elements are directly placed in the "Root Folder" Some single-tiered domains we used:
The FSM model is a simple model of computation consisting of a set of states, a start state, an input alphabet, a transition function, and a set of end states. It is also smaller and less elaborate than the Network model. The Network metamodel contains networking concepts (e.g., routers, hosts, and ports) as well as the valid connections among all entities. The Petri Net metamodel consists of the elements Place and Transition, as well as the connections between them. A Place can also hold a certain number of tokens. The AudioVideo System metamodel describes a language for configuring a home entertainment system consisting of domain elements (e.g., VCR, DVD, LD, MiniDisc, and other assorted electronics) and the connections between them. A Multi-tiered domain we used:
The ESML is a domain-specific graphical modeling language developed for modeling Real-Time Mission Computing Embedded Avionics applications. It is a typical multi-tiered domain which could allow users to capture 7 viewpoints: "Configuration", "Component", "Event", "Interaction", "Interface", "Parameters"and "TNA" Case StudiesIn this section, we provide snapshots and results of our experiments on diverse domains mentioned previously. Single-tiered Domain1: Finite State Machine (FSM):The original and inferred FSM Metamodel are illustrated separately in Fig. 2 and Fig. 3. And in Fig. 4 we give the inferred context free grammar. We used 4 instance models of this domain, which could be downloaded here:
Figure 2. Original FSM Metamodel
Figure 3. Inferred FSM Metamodel
Figure 4. Inferred CFG Single-tiered Domain2: Network Diagram Modeling Language: Download a sample instance model here The original and inferred Metamodel are illustrated separately in Fig. 5 and Fig. 6. And in Fig. 7 we give the inferred context free grammar.
Figure 5. Original Network Diagram Metamodel
Figure 6. Inferred Network Diagram Metamodel
Figure 7. Inferred CFG Single-tiered Domain 3: Petri Net Modeling Language:Download a sample instance model here The original and inferred Metamodel are illustrated separately in Fig. 8 and Fig. 9. And in Fig. 10 we give the inferred context free grammar.
Figure 8. Original Petri Net Metamodel
Figure 9. Inferred Petri Net Metamodel
Figure 10. Inferred CFG Single-tiered Domain 4: AudioVideo System Modeling Language:Download a sample instance model here The original and inferred Metamodel are illustrated separately in Fig. 11 and Fig. 12. And in Fig. 13 we give the inferred context free grammar.
Figure 11. Original AudioVideo System Metamodel
Figure 12. Inferred AudioVideo System Metamodel
Figure 13. Inferred CFG Multi-tiered Domain: ESML Domain We have also applied MARS on the large multi-tiered ESML domain. ESML is a domain-specific graphical modeling language developed for modeling Real-Time Mission Computing Embedded Avionics applications. The ESML contains instance models representing mission computing avionics scenarios. The ESML is a large domain, with models arranged in multiple folders. Currently MARS is limited to inferring single folder metamodel domains. We hope to extend this capability to infer multi-tiered metamodels. Download the files here: XSLT Transformer Latest for Multi-tiered Domain
Publications1) Faizan Javed, Marjan Mernik, Jeff Gray and Barrett Bryant, "MARS: A MetaModel Recovery System Using Grammar Inference", Technical Report UABCIS-TR-2006-0724-1, UAB, 2006 [PDF] This paper has been accepted by the journal Information and Software Technology, Elsevier, 2007, doi:10.1016/j.infsof.2007.08.003 Copyright ©2008-2009 Dept. of Computer and Information Sciences, University of Alabama at Birmingham. All rights reserved. Comments or suggestions to the site editor. Last modified: May 21, 2009 by Qichao |