naam
DESCRIPTION
Achieving QVTO & ATL Interoperability. naam. Alfons Laarman. Overview. Motivation Goals ATL Architecture QVT Standard Approach QVTO to ATLVM “ Compiler ” Results Conclusions References. Motivation. Different model transformation languages: QVT, ATL, etc - PowerPoint PPT PresentationTRANSCRIPT
naam
Achieving QVTO & ATL Interoperability
1
Alfons Laarman
08:03:18
Overview• Motivation
• Goals
• ATL Architecture
• QVT Standard
• Approach
• QVTO to ATLVM “Compiler”
• Results
• Conclusions
• References
208:03:18
Motivation
• Different model transformation languages: QVT, ATL, etc
• Each has its own strengths and downsides (these include the properties of the provided tools)
• Tool interoperability would allow a developer to use his/her language of preference
308:03:18
4
Source:Jouault &Kurtev 200608:03:18
Goals
• Develop, compile and run QVTO transformations in the ATL toolset
• Aim at complete QVTO support
• Proof hypothesis of Jouault & Kurtev
• Proof ATL tools to be QVT(O) conformant
508:03:18
ATL Architecture
• ATL has a virtual machine architecture
6
The ATL Wiki, William Piers
08:03:18
ATL Architecture (2)
• The ATL virtual machine is:– Object-oriented– Stack-based– Model manipulation language
context QVT!Object def : container() {
load self;
call ‘J.refImmediateComposite() : J‘;
}
708:03:18
QVT Standard
• QVT is an OMG standard for model transformations defining 3 languages and 3 conformance levels
808:03:18
QVT Operational
• Completely imperative mappings
• Trace sensitive mapping execution
• Mapping combination: inheritance, merging and disjunction
• Transformation handling
908:03:18
transformation Uml2Rdb(in srcModel:UML,out destModel:RDBMS);
main() { srcModel.objects()[Class]->map class2table(); }
mapping Class::class2table () : Table
when {self.kind='persistent';} {
init {
self.leafAttributes := self.attribute->map attr2LeafAttrs();
}
name := 't_' + self.name;
column := self.leafAttributes->map leafAttr2OrdinaryColumn("");
key := object Key {
name := 'k_'+ self.name;
column := result.column[kind='primary'];
};
}
10
Trace sensitiveTrace sensitiveOOOO Multiple parameters: context, result and in/out/inoutMultiple parameters: context, result and in/out/inout
EntryOperationEntryOperation Imperative rule callImperative rule call
inheritdisjunctmerge
inheritdisjunctmergeInitiation sectionInitiation section
Population sectionPopulation section
Implicit target element creationImplicit target element creation
(end section)(end section)
GuardGuard
08:03:18
Approach
• Reuse SmartQVT Front-end
• Express QVTO semantics on the ATLVM using ACG
1108:03:18
1208:03:18
QVTO 2 ATLVM
1308:03:18
1408:03:18
QVTO 2 ATLVM
1508:03:19
Other language constructs
• ImperativeCallExp
• HelperOperation, ConstructorOperation and EntryOperation
• ResolveExp
• TransformationCallExp, etc
16
Exception support
1708:03:19
For/Break/Continue
push collection
iterate element
push element
<process>
<break/continue>
<process>
enditerate
1808:03:19
Results
QVTO completely implemented except for transformation handling constructs
Demonstrated by running examples:
- UML22RDBMS (extended)
- UML2Ecore
- Ecore2EMOF
- Industrial case from Obeo (concerning automated porting to Java)
1908:03:19
Conclusions• ATL tools are flexible and interoperability is easy to create (at
least for an imperative lang.). Efforts have been made for QVTR
• The rule level semantics of QVT can be handled directly by ATL. Transformation level semantics not, but can be handled outside by (generated) scripts
• Interoperability at lower granularity is possible: super imposition and blackbox operations (future work)
• Exceptions and imperative operations like break are hard to express on ATLVM
• ATL tools can now be considered QVT(O) conformant2008:03:19
References• ATL Industrialization, www.atlpro.org• QVT ATL
On the architectural alignment of ATL and QVT
Fréderíc Jouault & Ivan Kurtev. 2006• QVTR to ATLVM.
http://eclipse.org/m2m, Quentin Glineur
• QVTR to QVTO:Translation of QVT Relations into QVT Operational Mappings
Raphael Romeikat, Stephan Roser, Pascal Müllender, Bernhard Bauer. 2009
2108:03:19