Query View Transformation (QVT) is a formally based language standardized by the OMG that provides a generic approach to model transformation. Model transformation is fundamental in the context of Model Driven Architecture (MDA), since only a model-to-model transformation enables sufficient model transfer. As an example, we refer to UML models in the software development process if they are to be used beyond the scope of specification and documentation.
QVT is a specification that was released as a standard in April 2008 in version 1.0. QVT integrates the concepts of models and metamodels as specified by the Meta Object Facility (MOF) standard, which was also defined. The acronym QVT stands for"Queries, Views and Transformations", where queries are queries on a MOF model with the goal of finding those model elements that are to be transformed. According to the OMG specification, a view is a model that has been derived from an original model. Finally, transformations are the mappings of elements of the source model to the elements of the target model. In this context, transformations take one or more source elements and convert them to generate one or more target elements.
The languages for metamodel-oriented transformationsThe QVT specification defines three different languages for the process of metamodel-oriented transformation. Besides an imperative language for describing model transformations, QVT also provides a declarative part - the QVT Relations Language, which defines a graphical syntax in addition to a textual one. The imperative language is also called Operational Mappings Language, and it can be used to write both imperative and hybrid transformations.
The market of QVT tools is still in a state of active development - but there are already some products available - also as open source. These include QVT Relations mediniQVT, Together from Borland, SmartQVT or OpQVT, which is integrated into Eclipse as part of the Eclipse Modelling Initiative. It is also known from experience reports that the graphical QVT relations language is supported by the UML tool Enterprise Architect. Typical usage scenarios for QVT are uni- or bidirectional model transformations or model verification.
Query View Transformation (QVT) provides the ability to define transformation rules between different languages based on their metamodels, and then transform corresponding instances of them. The concepts of models and metamodels are also based on a standard given by OMG - Meta Object Facility (MOF). According to this, a model is the abstract representation of the structure and function as well as the behavior of a system. A metamodel describes a set of models so that they are thereby abstracted.
Definition via MetamodelsQVT itself is defined via metamodels, is a so-called hybrid transformation language and thereby integrates a declarative and an imperative part. Thus, on the one hand the set of relations between patterns is described declaratively and on the other hand operationally a set of sequential instructions for transformation is described imperatively. The patterns correspond to the metamodels used for transformation.
Metamodels exist for each of the three languages of QVT, which in turn are based on the Object Constraint Language (OCL) 2.0. The specification distinguishes between the relational, the operational and the core language.black box defines an interface for transformation languages implemented outside of QVT. Likewise, a trace model equivalent to the relational language is defined here.
QVT has its special position in the context of Model Driven Architecture (MDA) - here specifically in the context of model-to-model transformation. The great advantage of the QVT relational language is that a graphical syntax has been defined in addition to the textual notation. At the Platform Specific Model (PSM) level, therefore, not only is a model-to-code transformation possible, but a model can also be created.