Download free for 30 days
Sign in
Upload
Language (EN)
Support
Business
Mobile
Social Media
Marketing
Technology
Art & Photos
Career
Design
Education
Presentations & Public Speaking
Government & Nonprofit
Healthcare
Internet
Law
Leadership & Management
Automotive
Engineering
Software
Recruiting & HR
Retail
Sales
Services
Science
Small Business & Entrepreneurship
Food
Environment
Economy & Finance
Data & Analytics
Investor Relations
Sports
Spiritual
News & Politics
Travel
Self Improvement
Real Estate
Entertainment & Humor
Health & Medicine
Devices & Hardware
Lifestyle
Change Language
Language
English
Español
Português
Français
Deutsche
Cancel
Save
Submit search
EN
Uploaded by
ISEMENSIAS
264 views
Modeltomodel_Transformation_with_ATL (1).pdf
ATL
Engineering
◦
Read more
0
Save
Share
Embed
Embed presentation
Download
Download to read offline
1
/ 59
2
/ 59
3
/ 59
4
/ 59
5
/ 59
6
/ 59
7
/ 59
8
/ 59
9
/ 59
10
/ 59
11
/ 59
12
/ 59
13
/ 59
14
/ 59
15
/ 59
16
/ 59
17
/ 59
18
/ 59
19
/ 59
20
/ 59
21
/ 59
22
/ 59
23
/ 59
24
/ 59
25
/ 59
26
/ 59
27
/ 59
28
/ 59
29
/ 59
30
/ 59
31
/ 59
32
/ 59
33
/ 59
34
/ 59
35
/ 59
36
/ 59
37
/ 59
38
/ 59
39
/ 59
40
/ 59
41
/ 59
42
/ 59
43
/ 59
44
/ 59
45
/ 59
46
/ 59
47
/ 59
48
/ 59
49
/ 59
50
/ 59
51
/ 59
52
/ 59
53
/ 59
54
/ 59
55
/ 59
56
/ 59
57
/ 59
58
/ 59
59
/ 59
More Related Content
PDF
ATL tutorial - EclipseCon 2008
by
William Piers
PDF
ATL tutorial - EclipseCon 2009
by
William Piers
PPTX
Generic and Meta-Transformations for Model Transformation Engineering
by
Daniel Varro
PDF
Model-Driven Software Engineering in Practice - Chapter 8 - Model-to-model tr...
by
Jordi Cabot
PPT
UMLX and QVT and ATL
by
Edward Willink
PPT
MDE=Model Driven Everything (Spanish Eclipse Day 2009)
by
Jordi Cabot
PPTX
Offline Delta-Driven Model Transformation with Dependency Injection
by
Artur Boronat
PDF
Approaches to Model Transformation Reuse: from Concepts to A-posteriori typing
by
miso_uam
ATL tutorial - EclipseCon 2008
by
William Piers
ATL tutorial - EclipseCon 2009
by
William Piers
Generic and Meta-Transformations for Model Transformation Engineering
by
Daniel Varro
Model-Driven Software Engineering in Practice - Chapter 8 - Model-to-model tr...
by
Jordi Cabot
UMLX and QVT and ATL
by
Edward Willink
MDE=Model Driven Everything (Spanish Eclipse Day 2009)
by
Jordi Cabot
Offline Delta-Driven Model Transformation with Dependency Injection
by
Artur Boronat
Approaches to Model Transformation Reuse: from Concepts to A-posteriori typing
by
miso_uam
Recently uploaded
PPTX
Energy system modelling to support national energy and climate policy making ...
by
IEA-ETSAP
PDF
RVV Basic Terms and Analogy - (en/zhTW) - DannyJiang
by
Danny Jiang
PDF
DevArc 2026 Finale GDG on Campus MM(DU).pdf
by
hemish04082005
PDF
PASSIVE AND ACTIVE REINFORCEMENT LEARNING
by
AnushaSanjay
PDF
BCS402 MICROCONTROLLERS MODULE 1
by
Abhijith L Kotian
PPTX
battery energy storage system (BESS).pptx
by
manish99skp
PDF
22PEOIT4C Artificial Intelligence unit 3 QB Final.pdf
by
Guru Nanak Technical Institutions
PPTX
22PEOIT4C Unit 3 Session 18 First Order Logic.pptx
by
Guru Nanak Technical Institutions
PPTX
Next-Gen Satellite Imaging: Optimizing High-Resolution Remote Sensing with Ad...
by
raghabBsingh
PPTX
Reinforcement Learning for Robotic Singulation: Policy Space Impact on Intera...
by
raghabBsingh
PDF
Reality Check Deploying Computer Vision and LLMs at the Edge
by
ICS
PPTX
Exploring Exhaustivity in Wh-Questions Through Analysis of Natural Language U...
by
raghabBsingh
PDF
22PEOIT4C_Artificial_Intelligence_UNIT_III_Notes_Final
by
Guru Nanak Technical Institutions
PPTX
1.-Static-sensor-characteristics,sensors and actuators ;SDU,denmark.pptx
by
MohammadTabish20
PDF
Earths-Structure-and-Composition_20260127_110958_0000.pdf
by
abdurasabarfaki
PPTX
ccs336 unit I.pptx cloud service management
by
vjsnetcafe
PPTX
Tips for Designing Flex Circuits for Medical Applications
by
Epec Engineered Technologies
PDF
LS029B3SX06A 2.9 Inch TFT LCD 2K Resolution 2160X2160 For AR VR
by
Syluxdisplay
PDF
Software Engineering : Nature of Software
by
GunjalSanjay
PPTX
Coagulation, flocculation and settling.pptx
by
Chemical Engineering Dept. NIT Rourkela-769008, Odisha, India
Energy system modelling to support national energy and climate policy making ...
by
IEA-ETSAP
RVV Basic Terms and Analogy - (en/zhTW) - DannyJiang
by
Danny Jiang
DevArc 2026 Finale GDG on Campus MM(DU).pdf
by
hemish04082005
PASSIVE AND ACTIVE REINFORCEMENT LEARNING
by
AnushaSanjay
BCS402 MICROCONTROLLERS MODULE 1
by
Abhijith L Kotian
battery energy storage system (BESS).pptx
by
manish99skp
22PEOIT4C Artificial Intelligence unit 3 QB Final.pdf
by
Guru Nanak Technical Institutions
22PEOIT4C Unit 3 Session 18 First Order Logic.pptx
by
Guru Nanak Technical Institutions
Next-Gen Satellite Imaging: Optimizing High-Resolution Remote Sensing with Ad...
by
raghabBsingh
Reinforcement Learning for Robotic Singulation: Policy Space Impact on Intera...
by
raghabBsingh
Reality Check Deploying Computer Vision and LLMs at the Edge
by
ICS
Exploring Exhaustivity in Wh-Questions Through Analysis of Natural Language U...
by
raghabBsingh
22PEOIT4C_Artificial_Intelligence_UNIT_III_Notes_Final
by
Guru Nanak Technical Institutions
1.-Static-sensor-characteristics,sensors and actuators ;SDU,denmark.pptx
by
MohammadTabish20
Earths-Structure-and-Composition_20260127_110958_0000.pdf
by
abdurasabarfaki
ccs336 unit I.pptx cloud service management
by
vjsnetcafe
Tips for Designing Flex Circuits for Medical Applications
by
Epec Engineered Technologies
LS029B3SX06A 2.9 Inch TFT LCD 2K Resolution 2160X2160 For AR VR
by
Syluxdisplay
Software Engineering : Nature of Software
by
GunjalSanjay
Coagulation, flocculation and settling.pptx
by
Chemical Engineering Dept. NIT Rourkela-769008, Odisha, India
Featured
PDF
2024 Trend Updates: What Really Works In SEO & Content Marketing
by
Search Engine Journal
PDF
Storytelling For The Web: Integrate Storytelling in your Design Process
by
Chiara Aliotta
PDF
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
by
OECD Directorate for Financial and Enterprise Affairs
PDF
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
by
SocialHRCamp
PDF
2024 State of Marketing Report – by Hubspot
by
Marius Sescu
PDF
Everything You Need To Know About ChatGPT
by
Expeed Software
PDF
Product Design Trends in 2024 | Teenage Engineerings
by
Pixeldarts
PDF
How Race, Age and Gender Shape Attitudes Towards Mental Health
by
ThinkNow
PDF
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
by
marketingartwork
PDF
Skeleton Culture Code
by
Skeleton Technologies
PDF
PEPSICO Presentation to CAGNY Conference Feb 2024
by
Neil Kimberley
PDF
Content Methodology: A Best Practices Report (Webinar)
by
contently
PPTX
How to Prepare For a Successful Job Search for 2024
by
Albert Qian
PDF
Social Media Marketing Trends 2024 // The Global Indie Insights
by
Kurio // The Social Media Age(ncy)
PDF
Trends In Paid Search: Navigating The Digital Landscape In 2024
by
Search Engine Journal
PDF
5 Public speaking tips from TED - Visualized summary
by
SpeakerHub
PDF
ChatGPT and the Future of Work - Clark Boyd
by
Clark Boyd
PDF
Getting into the tech field. what next
by
Tessa Mero
PDF
Google's Just Not That Into You: Understanding Core Updates & Search Intent
by
Lily Ray
PDF
How to have difficult conversations
by
Rajiv Jayarajah, MAppComm, ACC
2024 Trend Updates: What Really Works In SEO & Content Marketing
by
Search Engine Journal
Storytelling For The Web: Integrate Storytelling in your Design Process
by
Chiara Aliotta
Artificial Intelligence, Data and Competition – SCHREPEL – June 2024 OECD dis...
by
OECD Directorate for Financial and Enterprise Affairs
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
by
SocialHRCamp
2024 State of Marketing Report – by Hubspot
by
Marius Sescu
Everything You Need To Know About ChatGPT
by
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
by
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
by
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
by
marketingartwork
Skeleton Culture Code
by
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
by
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
by
contently
How to Prepare For a Successful Job Search for 2024
by
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
by
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
by
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
by
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
by
Clark Boyd
Getting into the tech field. what next
by
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
by
Lily Ray
How to have difficult conversations
by
Rajiv Jayarajah, MAppComm, ACC
Modeltomodel_Transformation_with_ATL (1).pdf
1.
© 2008 by
INRIA, Obeo; made available under the EPL v1.0 | 17 March 2008 Model-to-model Transformation with ATL Frédéric Jouault (INRIA) Brahim-Khalil LOUKIL (INRIA) William Piers (Obeo)
2.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Agenda • Introduction Š Model-To-Model transformation in the MDE field Š M2M vs. M2T • ATL Overview Š Available resources: wiki, zoo, newsgroup, use cases, etc. Š ATL language description • First exercise: Ecore-To-UML2.1 • Architecture Š Overview Š The new virtual machine: EMF-VM • Second exercise: GMF Diagram Refactoring • Third exercise: Public-To-Private
3.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Agenda • Introduction Š Model-To-Model transformation in the MDE field Š M2M vs. M2T • ATL Overview Š Available resources: wiki, zoo, newsgroup, use cases, etc. Š ATL language description • First exercise: Ecore-To-UML2.1 • Architecture Š Overview Š The new virtual machine: EMF-VM • Second exercise: GMF Diagram Refactoring • Third exercise: Public-To-Private
4.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 ATL - Description • ATL : ATLAS Transformation Language ATLAS Transformation Language • ATL is a language and a virtual machine dedicated to model transformation • ATL is an Eclipse Model-to-Model (M2M) component, inside of the Eclipse Modeling Project (EMP)
5.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Definitions • A model transformation is the automatic creation of target models from source models. • Model transformation is not only about M1 to M1 transformations: Š M1 to M2: promotion, Š M2 to M1: demotion, Š M3 to M1, M3 to M2, etc. Metametamodel Metamodel Terminal Model M3 M2 M1
6.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Operational context: small theory G 2 P Rule R 2 B Rule Ma Mb MMa Green Class Red Class MMb Blue Class Pink Class Metametamodel Class Class ATL Rule Class MMa2MMb.atl conformsTo conformsTo conformsTo conformsTo conformsTo
7.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Operational context of ATL MOF MMa MMb Ma Mb MMa2MMb.atl ATL MMa is the source metamodel Ma is the source model Mb is the target model MMB is the target metamodel
8.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 M2M vs. M2T • M2M: Model To Model transformation Š Abstract syntax to abstract syntax Š Languages: ATL, QVT Operational, QVT Relations • M2T: Model To Text transformation Š Abstract syntax to concrete syntax Š Languages: JET, xPand • TMF: Textual Modeling Framework Š Abstract syntax to and from concrete syntax Š Languages: TCS, xText • This tutorial is focused on M2M
9.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Agenda • Introduction Š Model-To-Model transformation in the MDE field Š M2M vs. M2T • ATL Overview Š Available resources: wiki, zoo, newsgroup, use cases, etc. Š ATL language description • First exercise: Ecore-To-UML2.1 • Architecture Š Overview Š The new virtual machine: EMF-VM • Second exercise: GMF Diagram Refactoring • Third exercise: Public-To-Private
10.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 ATL history • 1990 : first works on model transformation • 1998 : initial publication for a Ph.D. thesis at the University of Nantes • 1998 - 2004 : Implementation Š CARROLL/MOTOR project (CEA, Thales, INRIA) Š Collaborative projects : ModelWare, ModelPlex, OpenEmbeDD • 2004 : Eclipse GMT integration • 2006 : Industrial solution inside of the Eclipse M2M project
11.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 ATL community • Active community Š Newsgroup: news://news.eclipse.org/eclipse.modeling.m2m Š Wiki: http://wiki.eclipse.org/ATL Š Bugzilla Š Use cases: http://www.eclipse.org/m2m/atl/usecases/ Š Transformations zoo (i.e., a library): http://www.eclipse.org/m2m/atl/atlTransformations/ • Other links : Š Project page: http://www.eclipse.org/m2m/atl/
12.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 ATL transformation zoo -- Rule 'ComplexReference'. -- This rule generates two opposites references which will be the link -- between the new Relationship and his adjoining Classes rule ComplexReference { from r : DSL!Role ( r.relation.needTurnOnClass() ) using { oppositeRole : DSL!Role = r.relation.roles->select(e | e <> r)->first(); } to rfInOwner : KM3!Reference ( name <- r.name, owner <- r.source, type <- r.relation, opposite <- rfInRelationship, lower <- r.min, upper <- if r.max=0 then 0-1 else 1 endif, isOrdered <- r.isOrdered, isContainer <- r.isEmbedding(), isUnique <- false ), rfInRelationship : KM3!Reference ( name <- oppositeRole.name, owner <- r.relation, type <- r.source, opposite <- rfInOwner, lower <- oppositeRole.min, upper <- if oppositeRole.max=0 then 0-1 else 1 endif, isOrdered <- oppositeRole.isOrdered, isContainer <- oppositeRole.isEmbedding(), isUnique <- false ) }
13.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0
14.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 ATL overview • Source models and target models are distinct: Š Source models are read-only (they can only be navigated, not modified), Š Target models are write-only (they cannot be navigated). • The language is a declarative-imperative hybrid: Š Declarative part: ƒ Matched rules with automatic traceability support, ƒ Side-effect free navigation (and query) language: OCL 2.0 Š Imperative part: ƒ Called rules, ƒ Action blocks. • Recommended programming style: declarative
15.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 ATL overview (continued) • A declarative rule specifies: Š a source pattern to be matched in the source models, Š a target pattern to be created in the target models for each match during rule application. • An imperative rule is basically a procedure: Š It is called by its name, Š It may take arguments, Š It can contain: ƒ A declarative target pattern, ƒ An action block (i.e. a sequence of statements), ƒ Both.
16.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 ATL overview (continued) • Applying a declarative rule means: Š Creating the specified target elements, Š Initializing the properties of the newly created elements. • There are three types of declarative rules: Š Standard rules that are applied once for each match, ƒ A given set of elements may only be matched by one standard rule, Š Lazy rules that are applied as many times for each match as it is referred to from other rules (possibly never for some matches), Š Unique lazy rules that are applied at most once for each match and only if it is referred to from other rules.
17.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Declarative rules: source pattern • The source pattern is composed of: Š A labeled set of types coming from the source metamodels, Š A guard (Boolean expression) used to filter matches. • A match corresponds to a set of elements coming from the source models that: Š Are of the types specified in the source pattern (one element for each type), Š Satisfy the guard.
18.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Declarative rules: target pattern • The target pattern is composed of: Š A labeled set of types coming from the target metamodels, Š For each element of this set, a set of bindings. Š A binding specifies the initialization of a property of a target element using an expression. • For each match, the target pattern is applied: Š Elements are created in the target models (one for each type of the target pattern), Š Target elements are initialized by executing the bindings: ƒ First evaluating their value, ƒ Then assigning this value to the corresponding property.
19.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Execution order of declarative rules • Declarative ATL frees the developer from specifying execution order: Š The order in which rules are matched and applied is not specified. ƒ Remark: the match of a lazy or unique lazy rules must be referred to before the rule is applied. Š The order in which bindings are applied is not specified. • The execution of declarative rules can however be kept deterministic: Š The execution of a rule cannot change source models Î It cannot change a match, Š Target elements are not navigable Î The execution of a binding cannot change the value of another.
20.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Example: Class to Relational - Overview • The source metamodel Class is a simplification of class diagrams. • The target metamodel Relational is a simplification of the relational model. Î ATL declaration of the transformation: module Class2Relational; create Mout : Relational from Min : Class; • The transformation excerpts used in this presentation come from: http://www.eclipse.org/m2m/atl/atlTransformations/#Class2Relational
21.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Example: Class to Relational - Source Metamodel NamedElt +name:String Classifier Attribute +multivalued:Boolean type + DataType Class attr + * {ordered} owner
22.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Example: Class to Relational – Target Metamodel Named +name:String Table Column owner + col + * {ordered} keyOf + 0..1 key + * Type * type +
23.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Example: Class to Relational, overview • Informal description of rules Š Class2Table: ƒ A table is created from each class, ƒ The columns of the table correspond to the single-valued attributes of the class, ƒ A column corresponding to the key of the table is created. Š SingleValuedAttribute2Column: ƒ A column is created from each single-valued attribute. Š MultiValuedAttribute2Column: ƒ A table with two columns is created from each multi-valued attribute, ƒ One column refers to the key of the table created from the owner class of the attribute, ƒ The second column contains the value of the attribute.
24.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Example: Class to Relational - Rule Class2Table (1 Of 4) • For each Class, create a Table : rule Class2Table { from -- source pattern c : Class!Class to -- target pattern t : Relational!Table }
25.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Example: Class to Relational - Rule Class2Table (2 Of 4) • The name of the Table is the name of the Class: rule Class2Table { from c : Class!Class to t : Relational!Table ( name <- c.name -- a simple binding ) }
26.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Example: Class to Relational - Rule Class2Table (3 Of 4) • The columns of the table correspond to the single-valued attributes of the class: rule Class2Table { from c : Class!Class to t : Relational!Table ( name <- c.name, col <- c.attr->select(e | -- a binding not e.multiValued -- using complex ) -- navigation ) } • Remark: attributes are automatically resolved into columns by automatic traceability support.
27.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Example: Class to Relational - Rule Class2Table (4 Of 4) • Each Table owns a key containing a unique identifier: rule Class2Table { from c : Class!Class to t : Relational!Table ( name <- c.name, col <- c.attr->select(e | not e.multiValued )->union(Sequence {key}), key <- Set {key} ), key : Relational!Column ( -- another target name <- ‘Id’ -- pattern element ) -- for the key }
28.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Example: Class to Relational - Rule SingleValuedAttribute2Column • For each single-valued Attribute create a Column: rule SingleValuedAttribute2Column { from -- the guard is used for selection a : Class!Attribute (not a.multiValued) to c : Relational!Column ( name <- a.name ) }
29.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Example: Class to Relational - Rule MultiValuedAttribute2Column • For each multi-valued Attribute create a Table, which contains two columns: Š The identifier of the table created from the class owner of the Attribute Š The value. rule MultiValuedAttribute2Column { from a : Class!Attribute (a.multiValued) to t : Relational!Table ( name <- a.owner.name + ‘_’ + a.name, col <- Sequence {id, value} ), id : Relational!Column ( name <- ‘Id’ ), value : Relational!Column ( name <- a.name ) }
30.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Object Constraint Language (OCL) • Originally intended to express constraints over UML models, for instance: context Person inv: self.age > 0 • Extended to query any model • Used in several transformation languages (e.g., ATL, QVT) to compute values from the source models • Specification: Š The version on which ATL is based is available from: http://www.omg.org/docs/ptc/03-10-14.pdf Š Section 7: language overview Š Section 11: standard library ƒ Section 11.8: iterator expressions
31.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 ATL types hierarchy
32.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Other ATL features: rule inheritance • Rule inheritance, to help structure transformations and reuse rules and patterns: Š A child rule matches a subset of what its parent rule matches, Î All the bindings of the parent still make sense for the child, Š A child rule specializes target elements of its parent rule: ƒ Initialization of existing elements may be improved or changed, ƒ New elements may be created, Š Syntax: abstract rule R1 { -- ... } rule R2 extends R1 { -- ... }
33.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Copy class inheritance without rule inheritance rule A2toB2 { from s : MMA!A2 to t : MMB!B2 ( v1 <- s.v1, v2 <- s.v2 ) } module MMAtoMMB; create OUT : MMB from IN : MMA; rule A1toB1 { from s : MMA!A1 to t : MMB!B1 ( v1 <- s.v1 ) } -- Target metamodel: MMB class B1 { attribute v1 : String; } class B2 extends B1 { attribute v2 : String; } -- Source metamodel: MMA class A1 { attribute v1 : String; } class A2 extends A1 { attribute v2 : String; }
34.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Copy class inheritance with rule inheritance rule A2toB2 extends A1toB1 { from s : MMA!A2 to t : MMB!B2 ( v2 <- s.v2 ) } module MMAtoMMB; create OUT : MMB from IN : MMA; rule A1toB1 { from s : MMA!A1 to t : MMB!B1 ( v1 <- s.v1 ) } -- Target metamodel: MMB class B1 { attribute v1 : String; } class B2 extends B1 { attribute v2 : String; } -- Source metamodel: MMA class A1 { attribute v1 : String; } class A2 extends A1 { attribute v2 : String; }
35.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Other ATL features: refining mode • Refining mode for transformations that need to modify only a small part of a model: Š Since source models are read-only target models must be created from scratch, Š This can be done by writing copy rules for each elements that are not transformed, Î This is not very elegant, Š In refining mode, the ATL engine automatically copies unmatched elements. • The developer only specifies what changes. • ATL semantics is respected: source models are still read-only. Î An (optimized) engine may modify source models in-place but only commit the changes in the end. • Syntax: replace from by refining module A2A; create OUT : MMA refining IN : MMA;
36.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 ATL editor
37.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 ATL content assist • ADT (ATL Development Tools) has recently been improved with basic content assist Š Type completion Š Left-side bindings completion Š Basic code templates
38.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Launching ATL using ANT <project name="Families2Persons" default="main"> <property name="input" value="sample-Families.ecore"/> <property name="output" value="sample-Persons.ecore"/> <target name="main" depends="loadModels"> <am3.loadModel modelHandler="EMF" name="myFamilies" metamodel="Families" path="${input}"/> <am3.atl path="Families2Persons.atl"> <inmodel name="Families" model="Families"/> <inmodel name="IN" model="myFamilies"/> <inmodel name="Persons" model="Persons"/> <outmodel name="OUT" model="myPersons" metamodel="Persons"/> </am3.atl> <am3.saveModel model="myPersons" path="${output}"/> </target> <target name="loadModels"> <am3.loadModel modelHandler="EMF" name="Families" metamodel="%EMF" path="Families.ecore"/> <am3.loadModel modelHandler="EMF" name="Persons" metamodel="%EMF" path="Persons.ecore" /> </target> </project>
39.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Agenda • Introduction Š Model-To-Model transformation in the MDE field Š M2M vs. M2T • ATL Overview Š Available resources: wiki, zoo, newsgroup, use cases, etc. Š ATL language description • First exercise: Ecore-To-UML2.1 • Architecture Š Overview Š The new virtual machine: EMF-VM • Second exercise: GMF Diagram Refactoring • Third exercise: Public-To-Private
40.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 First exercise: Ecore-To-UML2.1 • In Java Š Already implemented by eclipse UML2 API. Š Ecore2UMLConverter.java ƒ ~2330 code lines • In ATL Š Ecore2UML.atl ƒ ~230 code lines
41.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 First exercise: Quick overview • Java public Object caseETypedElement(ETypedElement eTypedElement) { Object element = eModelElementToElementMap.get(eTypedElement); if (element != null) { if (element instanceof TypedElement) { ((TypedElement) element).setType(getType(eTypedElement)); } … return element; } public Object caseEAttribute(EAttribute eAttribute) { EClass eContainingClass = eAttribute.getEContainingClass(); if (eContainingClass != null) { Property property = UMLFactory.eINSTANCE.createProperty(); eModelElementToElementMap.put(eAttribute, property); Classifier classifier = (Classifier) doSwitch(eContainingClass); getOwnedAttributes(classifier).add(property); property.setName(eAttribute.getName()); property.setIsReadOnly(!eAttribute.isChangeable()); property.setIsDerived(eAttribute.isDerived()); property.setVisibility(VisibilityKind.PUBLIC_LITERAL); caseETypedElement(eAttribute); defaultCase(eAttribute); return property; } return super.caseEAttribute(eAttribute); } • ATL abstract rule ETypedElement2TypedElement{ from et: Ecore!ETypedElement to f: UML!TypedElement( name<-et.name, type<-thisModule.getMappingType(et), lower<-et.lowerBound, upper<-et.upperBound ) } rule EAttribute2Property extends ETypedElement2TypedElement { from et: Ecore!EAttribute to f: UML!Property( isReadOnly<- not et.changeable, isDerived<- et.derived ) }
42.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Agenda • Introduction Š Model-To-Model transformation in the MDE field Š M2M vs. M2T • ATL Overview Š Available resources: wiki, zoo, newsgroup, use cases, etc. Š ATL language description • First exercise : Ecore-To-UML2.1 • Architecture Š Overview Š The new virtual machine: EMF-VM • Second exercise: GMF Notation-To-Notation • Third exercise: Public-To-Private
43.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 ATL main plugins organization Eclipse ui integration ATL core ATL Regular VM (with drivers) New ATL VM EMF-dedicated
44.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 ATL architecture • Intermediate file format : ASM • Modular VM dedicated to M2M support Š A complete specification describes the VM (http://www.eclipse.org/m2m/atl/doc/) Š Can be implemented on different platforms (Java, .Net)
45.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 ATL execution process • 2 steps Š Compilation Š Execution
46.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 EMF-VM • A new ATL Virtual Machine is now available Š Increased performance Š EMF-only (no wrapping of EObjects) • At this time... Š Some missing features (decreasing in number quickly) Š No UML profile support • Non-regression evaluated with a new test plugin
47.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Non regression wiki page
48.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 EMF-VM Benchmarks
49.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Agenda • Introduction Š Model-To-Model transformation in the MDE field Š M2M vs. M2T • ATL Overview Š Available resources: wiki, zoo, newsgroup, use cases, etc. Š ATL language description • First exercise: Ecore-To-UML2.1 • Architecture Š Overview Š The new virtual machine: EMF-VM • Second exercise: GMF Diagram Refactoring • Third exercise: Public-To-Private
50.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Second Exercise: GMF Diagram Refactoring • Context: Š GMF (Graphical Modeling Framework) enables graphical concrete syntaxes for models Š Graphical properties (e.g., position, size, color) are stored in a separate Notation model, for instance: ƒ default.uml conforming to the UML metamodel ƒ default.umlclass_diagram conforming the Notation metamodel • Objective: Š Mirroring a Notation model horizontally and vertically • Approach: Š Using an ATL transformation from Notation to Notation
51.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 GMF Diagram Refactoring: Sample Source
52.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 GMF Diagram Refactoring: Sample Target
53.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 GMF Diagram Refactoring • Possible extensions: Š Bendpoints for edges Š Styles (e.g., so that lines appear in the same shade of gray) Š Other kinds of refactorings
54.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Agenda • Introduction Š Model-To-Model transformation in the MDE field Š M2M vs. M2T • ATL Overview Š Available resources: wiki, zoo, newsgroup, use cases, etc. Š ATL language description • First exercise: Ecore-To-UML2.1 • Architecture Š Overview Š The new virtual machine: EMF-VM • Second exercise: GMF Diagram Refactoring • Third exercise: Public-To-Private
55.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Third exercise : Public To Private • Context Š Simplified Java metamodel: classes, fields, methods Š Sample Java model: PetriNet • Objective Š Convert public fields into: ƒ Private fields ƒ A getter method ƒ A setter method (if the attribute is changeable, i.e. non-final) • Sample Š A classic PetriNet model encoded using the simplified Java metamodel
56.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Input model (with public fields)
57.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Output model (privatized)
58.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 Legal Notices • Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both • Other company, product, or service names may be trademarks or service marks of others
59.
Model-To-Model Transformation with
ATL | © 2008 by INRIA, Obeo; made available under the EPL v1.0 END • Questions or Comments?
Download