Framework Of Bidirectional Model To Model Transformations Computer Science Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Model driven development (MDD) is a new technology in software development paradigm in which it concerns on the usage of model. The developed model can be automatically transformed into other model by model transformation process. In general, model transformation is divided into two techniques is that model-to-code and model-to-model. Most MDD languages and tools supported model-to-code technique, and a few of them supported model-to-model technique which is used to generate platform specific model (PSM) from platform independent model (PIM). In software development, MDD is still in infancy phase which requires the appropriate formalisations, techniques, languages and tools.

Model-to-model (M2M) transformations are a new paradigm of Model Driven Development (MDD) in software development. M2M transformation is needed to reduce gabs between PIM and PSM through intermediate model go to the PSM as target model (Czarnecki and Helsen 2003). Beside that M2M transformations can also useful for computing models and synchronization. The foundation idea of M2M transformation is to create a model as domain and then transforms this model into another model which is defined as a specific platform. This is actually known with a transformation process from a source model to target model or vice versa. M2M transformation can be defined in two ways namely operational and declarative. How and when a target model is created from source model is defined in operational way, whilst declarative way focuses on the definition of the mapping between source and target models. The M2M transformations are specified in both directions either unidirectional or bidirectional. In this paper, we are concerned on bidirectional M2M transformation. In practice, unidirectional transformation is not recommended perform on model transformation right now, because if one model is modified thus the modified model can not reflect back to the original model. This condition lead inconsistency element between two models when applying M2M transformation.

Many research attempts to find a simply applicable way for building the M2M transformation in term of the specification and verification process in improving the quality of software development process. Among the proposed languages and frameworks that are used to write and execute M2M transformations are Query View Transformation (QVT 2008), ATLAS Transformation Language (ATLAS 2006), VIATRA2 (Varro and Balogh 2007), BOTL (Braun and Marschall 2003) and Fujaba. However, most of these languages and frameworks are insufficiently formalized for M2M transformation and unidirectional. In the most cases bidirectional transformation are still described as two unidirectional transformations.

The research to be carried out in our PhD thesis, the aim of this paper is to investigate and to systematically propose a novel specification and verification of bidirectional M2M transformation in MDD. To achieve this aim, a number related objectives of this research are set as follow: (i) to study and evaluate the state-of-the-art M2M transformation approaches in various perspectives. (ii) to design a conceptual framework for bidirectional M2M transformation that consists of the metamodel and verification process based on the mathematical foundation which is closely with human interpretation.

The rest of this paper is structured as follow: section 2 present the related work

related work

Model transformations are generally divided into two categories at the top level is that model-to-code and model-to-model transformation. Most MDD tools support model-to-code transformation and a few of them were found for specification of M2M transformations.

The M2M Approaches

The following classification of M2M transformation based on (Czarnecki and Helsen 2003; Czarnecki and Helsen 2006) is described:

Direct Manipulation Approaches.

To manipulate M2M transformation, these approaches proffer an internal model representation and some Meta Object Facility (MOF)-compliant API (e.g., JMI). The approach is usually performed on an object oriented framework and transformation (e.g., abstract class for transformation) is managed with a few infrastructures. A set of facilities such as transformation rules, tracing, scheduling and others should be defined by user from the start in a programming language e.g. Java. However, this approach does not provide an appropriate guideline in transformation implementations; it means that user full responsible to get the success of transformation process and this approach leads impractical in the long run.

Relational Approaches

These approaches based on mathematical relation that is defined in declarative manner. The main idea of this approach creates a relationship between two element model using constraints. The relation and mapping rules between two models are no executable. However, the executable semantics can be produced with the help of a declarative constraint e.g. in logic programming where the relation between models can be defined using predicate. In additional, these approaches have a set of characteristics such as side-effect-free and construct target model implicitly. The specification, relationship and mapping rules between two models can be defined in bidirectional. Unfortunately, relationship between two models is defined separately and provident in place update. Example of these approaches are QVT-Relation (OMG 2005).

Operational Approaches

It is identical to direct manipulation approach. These approaches expand the concept of modelling formalism to facilitate the computations model transformation with imperative construct through query language e.g. Object Constraint Language (OCL). The combination OCL and Meta Object Facility (MOF) become these approaches are fully-fledged in OOP (Object Oriented Programming) system. Example of this approach is QVT Operational mappings (OMG 2005).

Graph-based Transformation Approaches

These approaches describe model transformation based on the graph transformation in which source and target model is depicted by a set of graphs. To transform one model into another is defined by graph transformation rules that consist of two patterns (graph pattern) i.e. Left Hand Side (LHS) and Right Hand Side (RHS). LHS describes pre-conditions of given rules, while RHS presents post-conditions. LHS is also used to define negative conditions, some additional logic which is needed to compute RHS as target model. Examples of this approach are Attributed Graph Grammar or AGG (Taentzer. 2003), Bidirectional Object-oriented Tranformation Language or BOTL (Braun and Marschall 2003), Visual Automated model TRAnsformation or VIATRA2 (Varro, Balogh et al. 2003), Graph Rewriting and Transformation language or GReAT (Agrawal 2003), Model transformation LAnguage or MOLA (Kalnins, Barzdins et al. 2004) and From UML to Java And Back Again or FUJABA (Fujaba). Graph-based transformation is a powerful approach and declarative. There are a number of theoretical works related to this approach. However experience in practical is still limited.

Hybrid Approach

It combines two or more different techniques from the previous approaches on the application. Example of this approach is the Atlas Transformation Language (ATL). ATL (Benzivin, Dupe et al. 2003; Jouault and Kurtev 2005) is the combination of both declarative and imperative techniques.

Existing Languages & Frameworks

A set of existing languages and framework support M2M transformation as follows:

VIATRA2

VIATRA2 (Varró and Pataricza 2003) is a framework of model transformation supported for general purpose such as specification, design, execution, validation and maintenance of transformation between different modelling language in model driven architecture (MDA). VIATRA2 describe modelling language and model using metamodeling approach based mathematical formalisms namely VPM (Visual Precise Metamodeling). In VIATRA2, model transformation is specified by graph transformation that is a combination of both visual rules and pattern-based paradigm. It provides model checking, negative pattern, generic and meta-transformation to manipulate M2M transformations as ordinary models. VIATRA2 is unidirectional transformation which uses constraints technique to specify the matching graph pattern and applies abstract state machine (ASM) to capture the control flow of system. VIATRA2 can capture a set of features, as follows:

Queries on model are denoted by graph pattern that consists of negative condition and it is able to interrelate with other patterns.

Elementary model manipulation is stated by graph transformation rules, LHS and RHS can be predefined using graph pattern.

Complex transformation programs are captured using ASM (abstract state machine) construct that support control structure for the higher-level transformation.

Code generation is produced by ASM rules.

GReAT

It is a metamodel-based graph transformation that can capture the complex specification of model transformation program on the high-level. GReAT construct a target model as output from input model using transformation process that is defined as a sequence graph rewriting rules. It can also generate target and source metamodel by representing vertex and edge as link between various domains during the transformation process. GReAT uses the control structure is to reduce the complexity in matching case. In GReAT, transformation rules are defined by matching pattern. The rules are visually defined in graphical model. LHS composes of OCL constraint to refine the structure, however post-conditions are not maintained. In additional, GReAT is an unidirectional transformation and it is not provided traceability information including inconsistency. The features of GReAT are divided into three parts.

Pattern Specification Language (PSL). It is used to depict complex pattern and then to select element in the existing graph and including the notion of cardinality on the pattern of each vertex and edge.

Graph transformation language (GTL). It is used to describe PSL by a rewriting language. The source model, target model and temporary object are defined as a single graph that should conform to their metamodel. Each object's type of pattern match to this metamodel and temporary object will be removed at the end of the transformation.

Control flow language (CFL). It is used as application control in parctical and it is able to manage the complexity of the transformation. CFL consists of a set of rules which support a set of features: Sequencing, non-determinism, hierarchy, recursion and test/case.

ATL

ATL (Atlas Transformation Language) is a hybrid M2M transformation language that is constructed by a combination of declarative and imperative style. ATL can capture simple transformation and complex transformation by imperative part. ATL transform one model into another model in one direction (unidirectional). During the transformation execution between two models, source model can be steered but not on target model and then source model cannot be modified. Transformation in ATL is defined using modules that is comprised of three section i.e. header, import, helper and transformation rules. ATL provides declarative and imperative construct. Declarative construct is called matched rules to define relationship between two patterns (source and target pattern). Whilst, imperative construct consist of two features i.e. called rules (it is like a procedure) and action blocks.

BOTL

BOTL (Bidirectional Object-oriented Tranformation Language) is a relational approach based on graph transformation and metamodel to specify the bidirectional transformation. The transformation rules in BOTL are specified using UML notation and the transformation process is described in a batch-oriented way. However, BOTL does not support how to inconsistency should be renovated.

MOLA

MOLA (MOdel transformation LAnguage) is a transformation language which is graphically formed by combination of traditional structured programming language with pattern-based rules. MOLA provide a graphical loop concept, an explicit loop variable which will be combined with rule pattern. MOLA transform a source model into target model where both models should be conformed to their metamodel. A program of MOLA contains a sequence of statement i.e. rules. A rule have pattern and then pattern element consist of attribute constraint which is expressed using OCL.

AGG

AGG (Attributed Graph Grammar) is a visual transformation language that is constructed by rule-based and graph rewriting concept. This language is carried out from an algebraic approach to graph transformation. Transformation rules of AGG provide negative pattern that is explicitly defined using java code. AGG graphs are attributed by java object and types i.e. type graph, type inheritance and multiplicities. Type graph is used to describe source and target model including its metamodel. AGG have a set of features such as validation, model checking of graph transformation based on graph constraint, termination checking as well as it can be applied in analysis to recover conflict occurred between rules.

QVT-Relation

QVT-Relation (QVT-R) is a declarative specification of the relationships between MOF models. The Relations language supports complex object pattern matching, and implicitly creates trace classes and their instances to record what occurred during a transformation execution. Relations can assert that other relations also hold between particular model elements matched by their patterns. Finally, Relations language has a graphical syntax. The existing tools of QVT-R support model synchronization, however it is not optimized and full synchronization is not navigateable.

FUJABA

FUJABA (From UML to Java And Back Again) is one of the open source tools that converts UML diagram to java source code and vice versa. This conversion likes a round-trip engineering. In FUJABA, the operational behaviour of a system is described by UML activity and collaboration diagrams, while UML class diagram is used to describe the static graph schema. FUJABA can also demonstrate model transformation in both horizontal and vertical transformation (Zhao and Zhang 2007). FUJABA uses triple graph grammar (TGG) for visual specification and it support model synchronization. In (Guerra, Lara et al. 2009; Orejas, Guerra et al. 2009) proposed pattern-based for specifying M2M transformation in a declarative, formal and relational style. The M2M specification is compiled into bidirectional languages like triple graph grammar (TGG) rules (Schurr 1994; Königs and Schürr 2006; Ehrig, Ehrig et al. 2007). However, FUJABA is not applicable to apply in the large model transformation and it is not support update propagation.

The Approaches Comparison

Criteria Model Transformation Language

In this section, criteria of model transformation languages are defined. A few criteria are adopted from (Czarnecki and Helsen 2003; Czarnecki and Helsen 2006) and divided into several categories.

Model transformation paradigms are grouped into three main kinds' i.e. declarative, imperative, and hybrid. Declarative approach defines transformation using rules which is specified through pre- (the condition of a model before transformation is executed) and post-condition (the condition after a successful transformation). Imperative (or operational) approach is the transformation activities performs from source model to target model should be described explicitly through an action sequence. Hybrid is a combination of declarative and imperative.

Transformation Rules. It is the smallest part of transformation. Rules are divided into left hand side (LHS) and right hand side (RHS). Transformation rules can be defined using variable, pattern and logic. In transformation rules, there are two aspects used to rule application control i.e. location determination and scheduling. Rule scheduling defines when a set of rules are applied that can be specified in an implicit (has no direct control) and explicit (internal or external) way. Internal explicit means that the developer can call other rules within rules, while external explicit states that the execution order can be specified separated from the rules themselves. Rules organization defines a set of features which capture composing and structuring of transformation rules such as modularity (or packaging mechanism) and reuse (rule inheritance and logical composition) mechanism as well as organizational structure. Source-target relationship states how target model elements are constructed from source model elements i.e. new target and in place manipulation.

Directionality. The directionality of transformation language can either be unidirectional (one direction) and bidirectional (two directions). Unidirectional language transform from a source model into a target model but not the converse. Bidirectional language transform a source model into a target model and vice versa that can be written in non-bijective or bijective form.

Traceability. Tracing is defined as an appropriate connection between a source and target model in M2M transformation. Most model transformations do not support tracing. Traceability in model transformation language can be created automatically or the developer defines the tracing links himself (user defined).

Cardinality. It indicates the number of input and output models involved in a transformation definition such as M:N or 1:1.

Query language. A transformation language provides a function that is used to select elements of source model to be considered in the transformation execution. Query language can be based on OCL, graph-pattern and object-pattern.

Verification and Validation (V&V). V&V is very essential to detect errors, inconsistency, and incompleteness as soon as possible in software development. Verification deal with transformational accuracy, while validation deals with representational or behaviour accuracy.

Model Synchronization. Model Synchronization is defined as an activity to preserve the relationship between two models during the transformation process. It means that if one model is modified, then a related model should also be modified. Most approaches do not perform this requirement.

Metamodeling approach. Metamodeling techniques play a key role in MDD or Model Driven Architecture (MDA). It can be used to define the abstract syntax of a model and interrelationship between element2 of models. In other hand, metamodeling is a collection of a concept set within a certain domain. A model is an abstraction of a real world, while metamodel is another abstraction, emphasize properties of model itself which is called that this model conforms to its metamodel.

The comparison Result

The comparison result presents that most M2M transformation approaches are unidirectional (Table 1. In practice, unidirectional transformation has limitation for several cases. For example, when a model is changed, the changed model cannot automatically reflect back to the related changed. This can lead inconsistency problem in model transformation process. Subsequently, most the existing approaches of M2M transformation do not support the requirement for model synchronization and a few attentions have been paid to verification of model transformation. In contrast, bidirectional transformations are an useful approach in M2M transformation, however a set of its drawback make it is difficult and seldom implemented in industrial applications. Examples of bidirectional's drawbacks are unclear bidirectional semantics, lack of systematic development framework, bidirectional is defined non-bijective (it means that one model is not inverse of each other model) and limited tool supported.

Table 1. The Existing Approaches Comparison

Dimension

VIATRA2

GReAT

ATL

BOTL

MOLA

AGG

QVT-R

FUJABA

Paradigm

Declarative

Yes

Yes

Yes

Yes

Yes

Yes

Imperative

Yes

No

No

No

No

No

Hybrid

Yes

Yes

Yes

No

No

No

No

No

Transformation rules

Rule Definition

Pattern-based

Pattern-based

(graph-based)

Pattern-based (term-based structure)

Pattern-based (Graph-based)

Pattern-based

Pattern-based

Pattern-based (Graph-based)

Rule Scheduling

External explicit

External explicit

Implicit, internal explicit

Implicit

Internal explicit

(rule iteration)

External explicit, implicit

implicit

External Explicit, implicit

Rule Organization

Modularity mechanism (packaging rules)

Organizational structure (hierarchy of rule block)

Reuse mechanism (rule inheritance, libraries)

Reuse Mechanism (rule inheritance)

Organizational structure

Organization structure (layering)

Reuse mechanism (rule inherintance)

Reuse mechanism

Source-Target Relationship

In place update

In place update

In place update

In place upadte

In place update

In place update, interactive

In place update, new model

In place and new model

Directionality

Unidirectional

Unidirectional

Unidirectional

Bidirectional

Unidirectional

unidirectional

Bidirectional

Bidirectional

Traceability

User specified

User specified

Automatic

Automatic

Not supported

User specified

Automatic

Automatic

Cardinality

M:N; 1:1

M:N; 1:1

M:N 1:1

M:N 1:1

1:1

M:N 1:1

M:N 1:1

Query Language

Graph Pattern, recursion allowed

Graph-pattern, C++

Based on OCL

Object-pattern (OCL)

Based on OCL

Graph-pattern

Object-pattern

Object-pattern

Verification & Validation

Yes

No

No

Verification

No

No

No

No

Model Synchronization

No

No

No

No

No

Yes

Yes

Metamodeling

Yes

Yes

Yes

Yes

Yes

No

Yes

Tool Supported

Yes

Goal and hypotheses

The main goal of the thesis is to define a conceptual framework for bijective bidirectional model transformation that consists of both the metamodel and verification process based on the mathematical foundation which is closely to human interpretations i.e. Description Logics. (DL). Next are stated the working hypotheses which will be addressed.

H1: An approach applying MDD techniques can be defined for developing and evolving Bijective Bidirectional M2M Transformation (BiBM2MT).

The proposed Solution

We propose to solve the existing problem by defining a framework of bijective bidirectional M2M Transformation or BiBM2MT in shortly that consists of two major goals. Firstly, conceptual framework describes the overview of the proposed approach in its application context. Second, descriptive specification specifies the metamodel of the source model and target model.

Modeling is one of the common scientific description techniques describing a system in term of pre-established concepts and rules. Description logics (DL) is an logic-based approach of knowledge representation formalism (Baader, Calvanese et al. 2003) that concern on the notion of the concept (unary predicate) and roles (binary predicate). It is also completed a set of constructors to build a complex concepts and roles from atomic ones. The selection of DL is based on the following reasons,

DL is the logic-based knowledge which is able to formalise a complex system.

DL defines the static structure of software application by using a representation language that has been established.

DLs are easy to understand and well-studied because it is closed to human interpretation as well as it has formal semantics.

The community of DL is well-organised and its important feature is its reasoning ability.

Traditionally, a DL knowledge base (KB) is comprised three main parts:

Terminology or schema called TBox that defines the vocabulary of an application domain.

Assertion (world description) called ABox which presents assertion of individuals named in term of this vocabulary. The vocabulary comprises concepts (set of individual) and roles (binary relation between individual).

Description language that specify term and operator in building expressions. The expressiveness of DL depends on its description language.

The Conceptual Framework

In general, the conceptual framework consists of two major points i.e. DL metamodel and the concept of ransformation process.

DL Metamodel

In model driven development (MDD), metamodel is one of the key concepts to describe a system under study. If a valid metamodel can be produced well, then it can automatically define a certain modelling language. A metamodel is an appropriate approach to specify well-formed models. In order to able to perform in MDD, DL knowledge base metamodel is defined based on the ontology definition metamodel (ODM) core that proposed by OMG (OMG) as shown in Figure 1.

Figure 1. DL-KB metamodel

At the top level defines meta-classes of both DLTBox and DLABox that communicate with TBox and ABox of DL KB as shown in Figure 2. DLTBox meta-class composes of a set of DLTerm meta-classes and its specialisation. DLABox consists of a set of DLInstances. DLTerm defines an abstract class that has specialisations DLExpression that conform to the DL metamodels description language and DLElement conform to concepts and roles.

Figure 2. The specialization of TBox elements (left) and ABox instance (right) of DL metamodel

Figure 2 sketches that the specialisation of DLInstance in ABox which relates to each element of TBox. DLAssertion specifies DLrole. DLIndividuals define the member of DLConcept. Two specilization of DLConcept is specified by DLDatatype with DLLiteral as instance. Both DLCollection and DLExtent are as instance. DLExpression consists of DLTerm using DlConstructor as shown in Figure 3.

Figure 3. The DL metamodel for Description language expression

The Concept of Model Transformation

Model transformation is defined by Sendall et al. in (Sendall, Hauser et al. 2004) as a mapping process between element models where a mapping defines the correspondence between them. Figure 5 illustrates the basic concept of model transformation. Transformation from a model M into a model N is bridged by mapping process where each model conforms to their metamodel and then it satisfies to DL metamodel. Mapping process is used to correspond between models using a set of roles.

Figure 4. The basic concept of model transformation

In Object Management Group (OMG), the defining of the relationship between concepts and individual has the same way with DL. Meta Object Facility (MOF) of OMG is defined as concepts, and then elements of process metamodel layer can be defined as individuals. The metamodel layer is defined as concepts and then model layer is defined as individual. Figure 5 present four layer architecture of modeling as defined by OMG's.

Figure 5. The Modeling Level.

The Descriptive Specification

As described previously that DL-KB has two major points namely TBox and ABox. TBox is stated using concepts, rules and subsumptions, while ABox is defined using constants of instantiate the concepts and rules in the TBox. TBox represent UML class model and MySQL model and ABox represent an instance model of them. As running example, we use UML Class Diagram as model M and MySQL as model N. In the mapping example, the traditional of model transformation language is chosen for transforming PIMs to PSMs (or UML class diagram to database definition) which is based on (Kleppe, Warmer et al. 2003). The metamodel of both the metamodel M (as a source language) and metamodel N (as a target language) is used to define a formal transformation definition. Figure 6 depict a simplified UML class diagram and Figure 7 shows a simplified SQL metamodel.

Figure 6. Metamodel M (UML Metamodel)

Figure 7. SQL Metamodel (as Metamodel N)

Evaluation of the proposed approach

Conclusions and future work

Hope you find the information in this template useful in the preparation of your submission.

Writing Services

Essay Writing
Service

Find out how the very best essay writing service can help you accomplish more and achieve higher marks today.

Assignment Writing Service

From complicated assignments to tricky tasks, our experts can tackle virtually any question thrown at them.

Dissertation Writing Service

A dissertation (also known as a thesis or research project) is probably the most important piece of work for any student! From full dissertations to individual chapters, we’re on hand to support you.

Coursework Writing Service

Our expert qualified writers can help you get your coursework right first time, every time.

Dissertation Proposal Service

The first step to completing a dissertation is to create a proposal that talks about what you wish to do. Our experts can design suitable methodologies - perfect to help you get started with a dissertation.

Report Writing
Service

Reports for any audience. Perfectly structured, professionally written, and tailored to suit your exact requirements.

Essay Skeleton Answer Service

If you’re just looking for some help to get started on an essay, our outline service provides you with a perfect essay plan.

Marking & Proofreading Service

Not sure if your work is hitting the mark? Struggling to get feedback from your lecturer? Our premium marking service was created just for you - get the feedback you deserve now.

Exam Revision
Service

Exams can be one of the most stressful experiences you’ll ever have! Revision is key, and we’re here to help. With custom created revision notes and exam answers, you’ll never feel underprepared again.