MMT/QVT Declarative Languages
A manually transformed example demonstrating these ideas may be found at
- host: umlx.cvs.sourceforge.net
- repository: /cvsroot/umlx
- project: examples/org.eclipse.qvt.declarative.examples.qvtcore.uml2rdbms
The Transformation Virtual Machine executes the compiled form of a transformation to perform a model to model transformation.
Plan: The QVTd project will initially exploit the direct AST interpretation of the Eclipse OCL pivot evaluator. Debugging will be provided using the QVTo project's enhancement of the Eclipse OCL ecore evaluator.
Future: the direct OCL to Java capabilities evolving for use with the Eclipse OCL pivot evaluator will be used to give substantially enhanced performance. Transformation composition and optimisation should provide further performance enhancements.
QVTi is a very small unidirectional imperative transformation language that is syntactically a subset of QVTm, QVTu and QVTc.
QVTi is intended to be simple to transform to the representation required by a particular Transformation Viritual Machine.
Plan: The QVTd project will enhance the Eclipse OCL evaluator to support direct interpretation of QVTi.
In addition to the Minimal Semantics.
A QVTi transformation is a tree of composed unidirectional mappings without refinement. Each mapping introduces exactly one unbound variable.
A QVTi transformation is executed by a single pass depth first traversal of the mapping composition tree.
At each node, a new unbound variable is introduced by one of the input or middle guard patterns. The set of bindings for this variable are determined by evaluating all the guard patterns in the context of the binding of each of the parent nodes. For each possible binding, the input, middle and output bottom patterns are evaluated and a sequential traversal of the composed mappings is performed.
Imperative semantics are imposed by the depth first search with a defined ordering of siblings.
Note that evaluation of middle pattern may create trace model instances, and that evaluation of the output bottom pattern may create or delete instances. An update transformation may therefore use early mappings to identify the required changes and late mappings to impose them without needing to re-access the 'input' model while in a transitional state.
context Mapping inv: self.oclAsType(Area)->union(domain).guardPattern.variable->size() = 1
QVTm is a minimal unidirectional declarative transformation language that is syntactically and semantically a subset of QVTu and QVTc.
QVTm is intended to provide an interchange point at which transformations originating from a variety of transformation languages can be brought together to produce efficient composed transformation chains.
Plan: The QVTd project will develop a QVTm to QVTi transformation using QVTi.
Future: A QVTi to QVTm transformation could support legacy rescue of QVTo transformations allowing them to be contribute to efficient composed transformation chains.
In addition to the Unidirectional Semantics:
Refined mappings are flattened.
context Mapping inv: refinement->isEmpty() and specification->isEmpty()
QVTu is a simple unidirectional declarative transformation language that is syntactically and semantically a subset of QVTc.
QVTu is intended to be a practical programming language for those applications that do not require the full multi-directionality capabilities of QVTc.
QVTu may be an appropriate entry point at which other declarative transformation languages such as ATL, Epsilon or Viatra2 reuse a shared transformation framework.
Plan: The QVTd project will develop a QVTu to QVTm transformation using QVTm
The selected direction is identified by the domain attributes.
An input only domain is neither isCheckable nor isEnforceable.
- a checked domain isCheckable.
- a created output domain isEnforceable.
- an updated output domain is isCheckable and isEnforceable.
An input domain has no realized variables or assignments.
Middle domain input assignments are replaced by predicates.
context Mapping inv: domain->select(isCheckable)->union(domain->select(isEnforceable))->size() = 1 context CoreDomain inv: not isCheckable and not isEnforceable implies bottomPattern.realizedVariable->isEmpty() inv: not isCheckable and not isEnforceable implies bottomPattern.assignments->isEmpty()
QVTc is a simple multidirectional declarative transformation language defined by the OMG as the QVT Core Language.
Plan: The QVTd project will develop a QVTc to QVTu transformation using QVTu.
QVTr is a higher level multidirectional declarative transformation language defined by the OMG as the QVT Relations Language.
QVTr is intended to be the declarative programming language of choice.
Plan: The QVTd project will develop a QVTr to QVTc transformation using QVTc
QVTo is a higher level multidirectional imperative transformation language defined by the OMG as the QVT Operational Mappings Language.
QVTo is supported by the M2M/QVT Operational Project.
UMLX is a higher level graphical syntax for QVTr.
UMLX is supported by the GMT/UMLX Project.