Difference between revisions of "MMT/QVT Declarative Languages"

From Eclipsepedia

< MMT
Jump to: navigation, search
(QVTc)
(QVTc)
Line 91: Line 91:
  
 
QVTc is a simple multidirectional declarative transformation language defined by the OMG as the QVT Core Language.
 
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  ==
 
== QVTr  ==

Revision as of 14:38, 11 August 2011

QVTdLanguageRelationships.png

Contents

TxVM

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

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.

Imperative Semantics

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.

Validation

context Mapping
inv: self.oclAsType(Area)->union(domain).guardPattern.variable->size() = 1

QVTm

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.

Minimal Semantics

In addition to the Unidirectional Semantics:

Refined mappings are flattened.

Validation

context Mapping
inv: refinement->isEmpty() and specification->isEmpty()

QVTu

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.

Plan: The QVTd project will develop a QVTu to QVTm transformation using QVTm

Unidirectional Semantics

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.

Validation

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

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

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 QVTu transformation using QVTu

QVTo

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

UMLX is a higher level graphical syntax for QVTr.

UMLX is supported by the GMT/UMLX Project.