QVT
The OMG standard family of model transformation languages — Query/View/Transformation — for declaratively and imperatively transforming models that conform to MOF metamodels in Model-Driven Architecture.
Created by Object Management Group (OMG); initial draft by Laurence Tratt and a multi-organization consortium
QVT — short for Query/View/Transformation — is not a single language but a family of model transformation languages standardized by the Object Management Group (OMG). It is the OMG’s official answer to a central question of Model-Driven Architecture (MDA): once software is described as models rather than hand-written code, how do you systematically transform one model into another? QVT defines a standard, vendor-neutral way to query models, derive views over them, and transform models that conform to MOF (Meta-Object Facility) 2.0 metamodels into other models.
History and Origins
QVT was born from the OMG’s broader Model-Driven Architecture program of the early 2000s, which aimed to make models — not source code — the primary artifacts of software development. Models are only useful at scale if they can be transformed automatically, so in 2002 the OMG issued a Request for Proposal (RFP) for a “MOF 2.0 Query/View/Transformation” standard.
The RFP drew competing submissions from a number of companies and research institutions. Rather than crown a single winner, the participants spent roughly three years merging their ideas into a common proposal. An influential early draft by the UK researcher Laurence Tratt helped shape the result. The merged proposal was adopted around 2005, and after a beta period the first formal specification, QVT 1.0, was published in April 2008. The standard has been revised steadily since: 1.1 in January 2011, 1.2 in February 2015, and 1.3 in June 2016, which remains the current version.
Design Philosophy
QVT’s defining design decision is that one size does not fit all for model transformation. Different problems — and different practitioners — favor different styles, so the standard deliberately defines three interoperating languages at different levels of abstraction:
- Relations (QVTr) — a declarative, high-level language. Transformations are expressed as relations between sets of model elements, with patterns matched across source and target models. Relations support powerful features such as bidirectional transformation, checkonly mode (verifying that two models are consistent) and enforce mode (modifying a model to restore consistency). It has both a textual and a graphical syntax.
- Core (QVTc) — a smaller, declarative language with simpler semantics, intended primarily as a translation target and a formal foundation. Relations can be defined by translation into Core. It is less expressive but easier to give precise semantics to.
- Operational Mappings (QVTo) — an imperative language for people who prefer to write transformations step-by-step, with the familiar constructs of imperative programming (loops, conditionals, sequencing). It is well suited to unidirectional transformations that are awkward to state purely declaratively.
These three are tied together by a shared foundation: all of them build on the Object Constraint Language (OCL). QVT integrates OCL 2.0 for querying and navigating models, and the imperative parts extend OCL with side-effecting features. A further escape hatch, the black-box mechanism, lets a transformation call out to implementations written in other languages (for example XSLT or XQuery) when QVT itself is not the best fit.
Key Features
- MOF-based. QVT operates on models that conform to MOF 2.0 metamodels, making it metamodel-agnostic — it can transform UML models, domain-specific language models, or any other MOF-defined structure.
- Mixed declarative and imperative styles. The Relations and Core languages are declarative; Operational Mappings is imperative. A single toolchain can mix them.
- Bidirectional and incremental transformation. The Relations language can run a transformation “in reverse” and can check consistency between models as well as enforce it.
- OCL throughout. Queries, constraints, and navigation expressions are written in OCL, the same constraint language used across the OMG modeling stack.
- Black-box extensibility. Transformations may delegate to external implementations, integrating QVT with non-MOF technologies.
A small taste of the Operational Mappings style, mapping a simplified UML class to a database table:
modeltype UML uses "http://www.eclipse.org/uml2/...";
modeltype RDB uses "http://example.org/rdb";
transformation Uml2Rdb(in src : UML, out dst : RDB);
main() {
src.objectsOfType(Class)->map class2table();
}
mapping Class::class2table() : Table {
name := self.name;
column += self.attribute->map attribute2column();
}
Evolution
QVT has evolved through standards revision rather than the rapid, community-driven release cycles typical of general-purpose programming languages. After the formal 1.0 specification in 2008, the 1.1 (2011), 1.2 (2015), and 1.3 (2016) revisions clarified semantics, fixed defects raised through the OMG issue-tracking process, and improved consistency with the surrounding MOF and OCL standards. The pace reflects QVT’s nature as a specification implemented by independent tools, where stability and precise semantics matter more than frequent new features.
On the tooling side, the most significant evolution happened in the Eclipse ecosystem. The Eclipse M2M (Model-to-Model) project produced a robust implementation of Operational Mappings (QVTo) that became, in practice, the de facto reference for that language, while the QVT Declarative (QVTd) project worked on Relations and Core atop the Eclipse Modeling Framework. Earlier independent tools — mediniQVT, ModelMorf, and SmartQVT — explored the declarative and operational languages and helped validate the standard.
Current Relevance
QVT occupies a specialized but enduring niche in model-driven engineering (MDE). It is not a language one writes everyday application code in; it is a tool for transforming models — turning platform-independent designs into platform-specific ones, migrating between metamodel versions, deriving analysis models, or generating one representation from another. In practice, the Operational Mappings (QVTo) language, via its Eclipse implementation, sees the most real-world use, because its imperative style is approachable and its tooling is mature.
QVT shares its problem space with other transformation languages — most notably ATL (the Atlas Transformation Language), which arose from the same OMG RFP context, and the Epsilon family of model-management languages. Many practitioners choose those alternatives, but QVT remains important precisely because it is the official OMG standard: a common, documented semantics that tools and researchers can target.
Why It Matters
QVT matters as the standardized, vendor-neutral foundation for model transformation in the MDA vision. By defining a single specification that spans declarative relations, a formal core, and an imperative mapping language — all unified through OCL and grounded in MOF — the OMG gave model-driven engineering a common vocabulary for one of its hardest problems. Even where competing tools win on convenience, QVT’s three-language design remains a touchstone: a careful, deliberate attempt to capture the full spectrum of model transformation, from “describe the relationship and let the engine figure it out” to “tell the engine exactly what to do, step by step.”
Timeline
Notable Uses & Legacy
Eclipse M2M (Model-to-Model) / QVTo
The Eclipse Modeling Project provides the most widely used QVT tooling, including a mature implementation of the Operational Mappings language (QVTo) and the QVT Declarative (QVTd) project covering Relations and Core, integrated with EMF (Eclipse Modeling Framework).
ModelMorf (Tata Consultancy Services)
An implementation of QVT Relations developed at TCS Research, used as a reference and experimental tool for the declarative, bidirectional relational language.
mediniQVT
A commercial/community implementation of QVT Relations from ikv++ technologies, one of the early tools to support the declarative relational syntax with execution against EMF models.
SmartQVT (France Télécom / Orange Labs)
An open-source implementation of the QVT Operational Mappings language developed at France Télécom R&D, targeting the imperative subset of the standard.
Model-Driven Architecture toolchains
QVT is used in MDA workflows to transform platform-independent models (PIMs) into platform-specific models (PSMs), and more broadly to translate between domain metamodels in model-driven engineering pipelines.