QVT - Overview

Overview

Model transformation is a key technique used in model-driven architecture. As the name QVT indicates, the OMG standard covers transformations, views and queries together. Model queries and model views can be seen as special kinds of model transformation, provided that we use a suitably broad definition of model transformation: a model transformation is a program which operates on models.

The QVT standard defines three model transformation languages. All of them operate on models which conform to MOF 2.0 metamodels; the transformation states which metamodels are used. A transformation in any of the three QVT languages can itself be regarded as a model, conforming to one of the metamodels specified in the standard. The QVT standard integrates the OCL 2.0 standard and also extends it with imperative features.

  • QVT-Operational is an imperative language designed for writing unidirectional transformations.
  • QVT-Relations is a declarative language designed to permit both unidirectional and bidirectional model transformations to be written. A transformation embodies a consistency relation on sets of models. Consistency can be checked by executing the transformation in checkonly mode; the transformation then returns True if the set of models is consistent according to the transformation and False otherwise. The same transformation can be used in enforce mode to attempt to modify one of the models so that the set of models will be consistent. The QVT-Relations language has both a textual and a graphical concrete syntax.
  • QVT-Core is a declarative language designed to be simple and to act as the target of translation from QVT-Relations. However, QVT-Core has never had a full implementation and in fact it is not as expressive as QVT-Relations. Hence the QVT Architecture pictured above is misleading: the transformation from QVT-Relations to QVT-Core given in the QVT Standard is not semantics-preserving.

Finally there is a mechanism called QVT-BlackBox for invoking transformation facilities expressed in other languages (for example XSLT or XQuery).

Although QVT has a broad scope, it does not cover everything that has been considered as a model transformation, view or query. For example, the QVT languages do not permit transformations to or from textual models, since each model must conform to some MOF 2.0 metamodel. Model-to-text transformations are being standardised separately by OMG (see MOFM2T).


Read more about this topic:  QVT