Article Preview
Top1. Introduction
The goal of model-driven software development (MDSD) (Schmidt, 2006) is to increase the productivity of software engineers by replacing low-level programming with the development of high-level models. Over the years, the Unified Modeling Language (UML) (Object Management Group [OMG], 2015a) has been established as the standard modeling language for MDSD. The model-driven architecture (MDA) (Mellor, Kendall, Uhl, & Weise, 2004) process starts with an initial model containing the requirements and uses a series of subsequent models being refined over multiple levels of abstraction until the system is eventually implemented. For a full-fledged support of MDSD, model transformations are required as a key enabling technology.
A wide variety of languages and tools for model transformations has been developed (Czarnecki & Helsen, 2006). Available languages differ with respect to underlying computational paradigms (procedural, functional, rule-based, object-oriented), directionality (unidirectional, bidirectional), granularity (batch, incremental) and the source/target model relationship (in-place, out-place).
The QVT (Query-View-Transformation) standard (OMG, 2015b) issued by the OMG, defines a family of model transformation languages residing at different levels of abstraction. QVT Relations (QVT-R) is the most high-level language providing means for a declarative specification of transformations between MOF (OMG, 2008) based models. Furthermore, it reuses the Object Constraint Language (OCL) (OMG, 2012), an expression language for MOF models. A wide spectrum of model transformation scenarios is addressed by QVT-R, including enforcing and checking, unidirectional and bidirectional, batch and incremental, and n:1 transformations.
This article, which is a revised version of a conference paper (Greiner, Buchmann, & Westfechtel, 2016), presents a case study dealing with incremental round-trip enginering of UML class models and Java source code. Furthermore, it presents an alternative implementation of the bidirectional transformation, which avoids a combinatorial explosion of the number of rules. Using the MoDisco (Brunliere, Cabot, Dupé, & Madiot, 2014) framework, Java source code may be represented as a model. Thus, QVT-R is used to formalize a bidirectional model-to-model transformation between UML class models and the MoDisco Java model. Specifying bidirectional transformations in QVT-R allows software engineers to provide a single relational specification, which may be executed in either direction, rather than writing two unidirectional transformations separately. Moreover, QVT-R was chosen because of its declarative nature, allowing the transformation developer to focus on relations and dependencies between metamodel elements rather than on single execution steps.
The chosen application scenario serves as a real-world use case which involves complex metamodels and allows to evaluate the benefits and drawbacks of the QVT-R standard in general and the provided tool in particular.
The article is structured as follows: In Section 2, background information for this case study is briefly presented. Section 3 provides insights in selected rules of the bidirectional transformation specification while results are shown with the help of an example in Section 4. Related work is discussed in Section 5. A discussion of the results and the conclusion is presented in Section 6.