• Nem Talált Eredményt

3 Domain-Specific Modeling and Model Processing

3.3 Related Work

Model-based application development necessitates the modeling of software requirements and the transformation of models between different stages of the design process. These transformations must be precisely specified. Many approaches have been introduced in the field of modeling, graph grammars and transformations to capture graph domains; for instance, Eclipse [Eclipse], GME [Lédeczi et al, 2001], MetaEdit+ [Tolvanen, 2006], GReAT [Karsai et al, 2003], FUJABA [Köhler et al, 2000], VIATRA [Varró et al, 2003], Attributed Graph Grammar (AGG) [Taentzer, 2004] and AToM3 [de Lara et al, 2004]. These approaches are specific to the particular system, and each of them has some features that others do not offer.

Eclipse is a highly generic modeling environment. Eclipse Graphical Editing Framework (GEF) [GEF] is an open source infrastructure for creating and using graphical editors based on Eclipse. The underlying architecture of GEF is the Model-View-Controller pattern [Gamma et al, 1995]. The manageable data (model), the visualization (view) and the interaction features (controller) are separated into different classes. The model classes can be arbitrary Java classes, however, the controller classes should derive from the common EditParts class. The visualization can be performed by an arbitrary Java class by implementing a predefined interface (IFigure). GEF does not support automatic change-notification services, due to the underlying arbitrary model object. Notification mechanisms should be performed through manually written listener and adapter objects.

Graphical Modeling Framework (GMF) [GMF] is another Eclipse project, GMF utilizes GEF.

Compared to GEF, GMF uses Eclipse Modeling Framework (EMF) [EMF] models as the underlying model object. EMF facilitates the serialization of models in various formats and the change notification mechanism is also a built-in feature. The editor environments in GMF are generated. The code generation is based on four models: (i) the EMF model (domain model) which serves as the model of the visual language; (ii) the Graphical Definition Model that defines the visualization of each model element; (iii) the Tooling Definition Model, which describes the additional visual elements required for the user interface (including editor palettes, menus) and (iv) the Mapping Definition Model, which realizes the mapping between the domain model and the visual models. The creation of models (ii)-(iv) and the generation of the editor from the input models is supported by the GMF Dashboard wizard.

Xtext [Xtext] is a framework for development of programming languages and domain specific languages. Xtext supports several aspects of a complete language infrastructure: parsing, linking, compiling, and interpretation.

Generic Modeling Environment (GME) is a general-purpose metamodeling and program synthesis environment. The modeling concepts of GME are represented by the MultiGraph Architecture (MGA) object network. MGA (and also GME) is built on the COM architecture.

MGA objects provide change notification, transaction handling and support of multi-client collaboration on the same model. Model elements can be persisted through a unified storage interface to various storage types including relational database and XML formats. MGA provides general classes to represent model elements the properties of which can be reached through the same interface. However, it is also possible to edit model properties through a typed interface called Builder Object Network (BON), which is generated for a specific domain. BON also builds on core MGA objects and only wraps their features. Compared to GME, our framework does not use wrappers to support writing model processors. Our framework generates the typed interfaces and objects for each domain.

MetaEdit+ is an integrated modeling and metamodeling environment for DSLs. In MetaEdit+, developer can define a domain-specific modeling language with roles, constrains and specify the mapping these elements to code fragments in domain-specific generator. The model execution can be emulated, the generated code and the model elements are linked to each other, MetaEdit+ shows which model elements is under execute and also shows the corresponding source code.

A common drawback of all the tools above is that each of them uses the same class and object hierarchy to perform various operations on them (including visualization, model transformation, custom model processing) and do not support to use optimized solutions for different purposes. In contrast, VMTS can provide optimized data-representation for different kinds of applications.

The GReAT framework is a transformation system for domain-specific languages (DSL) built on metamodeling and graph rewriting concepts. The control structure of the GReAT allows specifying an initial context for the matching to reduce the complexity of the general matching case. The pattern matcher returns all the possible matches to avoid the inherent

non-determinism in the matching process. The attribute transformation is specified by a proprietary attribute mapping language, whose syntax is close to C. The LHS of the rules can contain OCL constraint to refine the pattern.

GReAT has a construct called test rule. A test rule is a special expression and it is used to change the control flow during execution. A test rule has only LHS. If a test rule is successful (matching was successful), the rule after the test node is executable.

In FUJABA, the combination of activity diagrams and collaboration diagrams (story-diagrams) are used to express control structures. Story-diagrams are a visual programming language that facilitates the specification of complex application-specific object structures.

Moreover, FUJABA extended story-diagrams by statecharts to story-charts. Story-charts use statecharts and activity diagrams to define complex control flows and collaboration diagrams to specify the entry, exit, do, and transition actions that deal with complex object-structures.

VIATRA (Visual Automated Transformations) is a model transformation framework developed mainly for the formal dependability analysis of UML models. In VIATRA, metamodeling is conceived specially: the instantiation is based on mathematical formalisms and called Visual Precise Metamodeling. The attribute transformation is performed by abstract state machine statements, and there is built-in support for attributes of basic Java types. The model constraints can be expressed by graph patterns with arbitrary levels of negation. The rule constraints are also specified by graph patterns. VIATRA uses abstract state machines (ASM) to define the control flow of the system.

VIATRA is a model transformation framework developed mainly for the formal dependability analysis of UML models. In VIATRA, metamodeling is conceived specially: the instantiation is based on mathematical formalisms and called Visual Precise Metamodeling. The transformation language of VIATRA supports type checking, negative patterns, attribute conditions and traditional pattern matching issues. The rule specification language is a proprietary pattern language with type information. The attribute specification is graph-based.

The attribute transformation is performed by abstract state machine statements, and there is built-in support for attributes of basic Java types. The model and rule constraints can be expressed by graph patterns with arbitrary levels of negation. VIATRA uses abstract state machines (ASM) to define the control flow of the system

AGG is a visual tool environment consisting of editors, interpreter, and debugger for attributed graph transformation; attribute computation by Java; supports a hybrid programming style based on graph transformation and Java. In AGG, termination criteria are implemented for Layered Graph Transformation Systems (LGTS). The layers fix the order how rules are applied. The interpretation process first has to apply all rules of layer 0 as long as possible, and then all rules of layer 1, etc. Rule layers allow specifying a simple control flow graph transformation. Once the highest layer has been finished, the transformation stops, unless the option “loop over layers” is turned on.

VIATRA and AGG applies negative application conditions (NACs). Using NACs it is possible to express structures and attribute value, but multiplicity conditions cannot be defined without additional constraints.

The transformation and simulation tool AToM3 uses model transformation to simulation traces in order to simulate the operations. The rule constraints can contain generalized negative application conditions and can be pre- and postconditions to events. Constraints can be both semantic and graphical constraints. Similarly to AGG, the control flow consists of layers; the rules are sequenced by priority numbers within the layers. A rule is executed only once, but in case of non-overlapping matches, the rules are applied to all the matches.

The Model-Driven Architecture offers a standard interface to implement model transformation tools. The transformation related part of MDA is the Query, Views, Transformation for MOF 2.0 [OMG QVT]. Three types of operations are provided: queries on models, views on metamodels and transformation on models.

Compared to other approaches, VMTS meets the expectations in to-model and model-to-code transformation. VMTS has state of the art mechanisms for validated model transformation, constraint management and control flow definition. The environment has several standalone algorithms and other solutions that make them efficient.

VMTS has a unique constraint management and online transformation validation support. It provides a high-level control flow language with several constructs that optimize and make the transformations highly configurable.