Families to Persons © 2007 ATLAS Nantes - 1 - "Families to Persons" A simple illustration of model-to-model transformation Freddy Allilaire Frédéric Jouault.

Slides:



Advertisements
Similar presentations
Chungnam National University DataBase System Lab
Advertisements

Title © 2006 by INRIA; made available under the EPL v M2M Creation Review Frédéric Jouault Proposed Project Lead.
Title © 2006 by INRIA; made available under the EPL v M2M Creation Review Frédéric Jouault Proposed Project Lead.
Profiles Construction Eclipse ECESIS Project Construction of Complex UML Profiles UPM ETSI Telecomunicación Ciudad Universitaria s/n Madrid 28040,
Schema Matching and Query Rewriting in Ontology-based Data Integration Zdeňka Linková ICS AS CR Advisor: Július Štuller.
Computer Programming Mr. José A. Ortiz Morris. Computer Language  Languages that the computer understands.  They are low level languages. (BINARY 1.
Domain Restriction on Relation domain restriction operator,, restricts a relation to only those members whose domain is in a specified set. domain restriction.
June 9, 2006 Transforming models with ATL © 2006 ATLAS Nantes Transforming models with ATL The A TLAS Transformation Language Frédéric Jouault ATLAS.
© 2007 ATLAS Nantes 1 Atlas Model Weaver Use Case: Aspect Oriented Modeling Marcos Didonet Del Fabro Atlas Group (INRIA & LINA), Université de Nantes,
Query/Views/Transformations © 2006 ATLAS Nantes Query/Views/Transformations An introduction to the MOF 2.0 QVT standard with focus on the Operational.
CSI5112 Software Engineering Team: Andrei Anisenia Margi Fumtiwala.
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
1 Session-5 CSIT 121 Spring 2006 Part D due now String Rules Chapter 2 Topics Lab Demo Exercise Assignment.
Chapter Day 5. © 2007 Pearson Addison-Wesley. All rights reserved2-2 Agenda Day 5 Questions from last Class?? Problem set 1 Posted  Introduction on developing.
Visual Web Information Extraction With Lixto Robert Baumgartner Sergio Flesca Georg Gottlob.
St Testing, Simulation and Monitoring (actually mostly simulation) Stephen Hillier Joint Meeting, Mainz, June 2001.
©2004 Brooks/Cole Chapter 1: Getting Started Sections Covered: 1.1Introduction to Programming 1.2Constructing a Java Program 1.3The print() and println()
Guide To UNIX Using Linux Third Edition
MDE In A Sales Management System: A Case Study © 2008 INRIA, TUD & SAP MDE In A Sales Management System: A Case Study Mathias Fritzsche, Hugo Bruneliere,
What Is A Web Page? An Introduction to the Internet.
Comparing M2T & M2M Complementary Approaches © 2008 INRIA, University of York & SINTEF Comparing M2T & M2M Complementary Approaches Hugo Bruneliere,
® IBM Software Group © 2006 IBM Corporation The Eclipse Data Perspective and Database Explorer This section describes how to use the Eclipse Data Perspective,
1 Ivano Malavolta, University of L’aquila, Computer Science Department Ivano Malavolta DUALLy: an Eclipse platform for architectural languages interoperability.
CH1 – A 1 st Program Using C#. Program Set of instructions which tell a computer what to do. Machine Language Basic language computers use to control.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
Grammars and Parsing. Sentence  Noun Verb Noun Noun  boys Noun  girls Noun  dogs Verb  like Verb  see Grammars Grammar: set of rules for generating.
CASE Tools And Their Effect On Software Quality Peter Geddis – pxg07u.
Advanced Applications Of Model-to-Model Transformation © 2008 INRIA Advanced Applications Of Model-to-Model Transformation Hugo Bruneliere & Frédéric.
DB2 (Express C Edition) Installation and Using a Database
A First Program Using C#
Unit B065 – Coding a solution PREP WORK 1)Make sure you keep a work log / diary. Use the table on page 16 of the hand book as a template 2)Keep a bibliography.
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer Mappings, Use of MOF for Language Families Joachim Fischer Workshop on.
® IBM Software Group © 2009 IBM Corporation Rational Publishing Engine RQM Multi Level Report Tutorial David Rennie, IBM Rational Services A/NZ
ATL The ATLAS Transformation Language. 2 ATL (ATLAS Transformation Language) ATL transformation pattern ATL metamodel Helpers – Operation helpers – Attribute.
Introduction to MDA (Model Driven Architecture) CYT.
Model Handling with EMF Eclipse ECESIS Project Model handling with EMF An introduction to the Eclipse Modeling Framework ATLAS group (INRIA & LINA),
Alignment of ATL and QVT © 2006 ATLAS Nantes Alignment of ATL and QVT Ivan Kurtev ATLAS group, INRIA & University of Nantes, France
Building Tools by Model Transformations in Eclipse Oskars Vilitis, Audris Kalnins, Edgars Celms, Elina Kalnina, Agris Sostaks, Janis Barzdins Institute.
Copyright © 2009 AtlanMod. All Rights Reserved Frédéric Jouault & Hugo Bruneliere AtlanMod team (INRIA & Mines de Nantes) Possible Benefits of Bridging.
Documentation and Comments. What’s a comment? A comment is a simple form of documentation. Documentation is text that you the programmer write to explain.
UML Profiles Eclipse ECESIS Project The UML Profile technology SOFTEAM 144 Ave des Champs Elysées Paris, France
© The ATHENA Consortium. 6-3b. Atlas Transformation Language (ATL) Tutorial / Exercise,
Usage of OCL April Usage of OCL for design guidelines of models Christian Hein, Fraunhofer FOKUS April 2006.
Introduction to Programming with RAPTOR
An ATL Example © 2005 ATLAS Nantes An ATL Example The BibTeXML to DocBook Transformation ATLAS group (INRIA & LINA), University of Nantes, France.
NA-MIC National Alliance for Medical Image Computing BRAINSCut General Tutorial Eun Young(Regina) Kim University of Iowa
Java server pages. A JSP file basically contains HTML, but with embedded JSP tags with snippets of Java code inside them. A JSP file basically contains.
Hop Operational Semantics
Algorithms  Problem: Write pseudocode for a program that keeps asking the user to input integers until the user enters zero, and then determines and outputs.
Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised.
Sheet 1 DocEng’03, Grenoble, November 2003 Model Driven Architecture based XML Processing Ivan Kurtev, Klaas van den Berg University of Twente, the Netherlands.
CSC 110 Using Python [Reading: chapter 1] CSC 110 B 1.
I Power Higher Computing Software Development Development Languages and Environments.
LOGO 1 Corroborate and Learn Facts from the Web Advisor : Dr. Koh Jia-Ling Speaker : Tu Yi-Lang Date : Shubin Zhao, Jonathan Betz (KDD '07 )
1 Model-based Aspect Weaver Construction Suman Roychoudhury Frédéric Jouault Jeff Gray {roychous, jouault, cis.uab.edu This project is supported.
IT ELECTIVE 2.  Web server Can refer to either the hardware (the computer) or the software (the computer application) that helps to deliver content that.
1 Xdefinition ® Václav Trojan Prague June
ModTransf A Simple Model to Model Transformation Engine Cédric Dumoulin.
Introduction To Model-to-Model Transformation © 2008 INRIA Introduction To Model-to-Model Transformation Hugo Bruneliere & Frédéric Jouault INRIA.
Based on material developed in ATHENA (IST ), INTEROP (IST ) and MODELWARE (IST ) 6-1b. Atlas Transformation Language (ATL) with RSM.
Institute for Software Integrated Systems Vanderbilt University On Metamodel Composition Akos Ledeczi, Greg Nordstrom, Gabor Karsai, Peter Volgyesi and.
Introduction to Arrays. Objectives Distinguish between a simple variable and a subscripted variable. Input, output, and manipulate values stored in a.
Overview of Previous Lesson(s) Over View 3 Program.
PHP Form Processing * referenced from
NA-MIC National Alliance for Medical Image Computing BRAINSCut General Tutorial Eun Young(Regina) Kim University of Iowa
On Combining Multi-formalism Knowledge to Select Models for Model Transformation Testing Sagar Sen (1 st year PhD student), Benoit Baudry, Jean-Marie Mottu.
Overview of c# Programming
METHODS AND BEHAVIORS AKEEL AHMED.
Towards Automatic Model Synchronization from Model Transformation
Software Architecture & Design
Presentation transcript:

Families to Persons © 2007 ATLAS Nantes "Families to Persons" A simple illustration of model-to-model transformation Freddy Allilaire Frédéric Jouault ATLAS group, INRIA & University of Nantes, France

Families to Persons © 2007 ATLAS Nantes Context of this work The present courseware has been elaborated in the context of the “Usine Logicielle” project ( logicielle.org) of the cluster Paris- Région with the support of the Direction Générale des Entreprises, Conseil Régional d‘Ile de France, Conseil Général des Yvelines, Conseil Général de l'Essonne, and Conseil Général des Hauts de Seine. logicielle.org The MDD courseware provided here with the status of open source software is produced under the EPL 1.0 license.

Families to Persons © 2007 ATLAS Nantes Overview This presentation describes a very simple model transformation example, some kind of ATL "hello world". It is intended to be extended later. The presentation is composed of the following parts: Prerequisites. Introduction. Metamodeling. Transformation. Conclusion.

Families to Persons © 2007 ATLAS Nantes Prerequisites In the presentation we will not discuss the prerequisites. The interested reader may look in another presentation to these prerequisites on: MDE (MOF, XMI, OCL). Eclipse/EMF (ECORE). AMMA/ATL.

Families to Persons © 2007 ATLAS Nantes Introduction The goal is to present a use case of a model to model transformation written in ATL. This use case is named: “Families to Persons”. Initially we have a text describing a list of families. We want to transform this into another text describing a list of persons.

Families to Persons © 2007 ATLAS Nantes Goal of the ATL transformation we are going to write … Family March Father: Jim Mother: Cindy Son: Brandon Daughter: Brenda … other Families … Mr. Jim March Mrs. Cindy March Mr. Brandon March Mrs. Brenda March … other Persons Transforming this …… into this. Let's suppose these are not texts, but models (we'll discuss the correspondence between models and texts later).

Families to Persons © 2007 ATLAS Nantes Input of the transformation is a model Family March Father: Jim Mother: Cindy Son: Brandon Daughter: Brenda Family Sailor Father: Peter Mother: Jackie Son: David Son: Dylan Daughter: Kelly This is the text.This is the corresponding model. It is expressed in XMI, a standard way to represent models.

Families to Persons © 2007 ATLAS Nantes Output of the transformation should be a model Mr. Dylan Sailor Mr. Peter Sailor Mr. Brandon March Mr. Jim March Mr. David Sailor Mrs. Jackie Sailor Mrs. Brenda March Mrs. Cindy March Mrs. Kelly Sailor This is the text.This is the corresponding model (The corresponding XMI file is named "sample-Persons.ecore" ).

Families to Persons © 2007 ATLAS Nantes Each model conforms to a metamodel Source model "sample-Families.ecore" Target model "sample-Persons.ecore" Source metamodel conformsTo Target metamodel conformsTo

Families to Persons © 2007 ATLAS Nantes The general picture Source metamodel conformsTo Target metamodel conformsTo Source modelTarget model Metametamodel (ECORE) conformsTo

Families to Persons © 2007 ATLAS Nantes What we need to provide In order to achieve the transformation, we need to provide: 1.A source metamodel in KM3 ("Families"). 2.A source model (in XMI) conforming to "Families". 3.A target metamodel in KM3 ("Persons"). 4.A transformation model in ATL ("Families2Persons"). When the ATL transformation is executed, we obtain: A target model (in XMI) conforming to "Persons".

Families to Persons © 2007 ATLAS Nantes Definition of the source metamodel "Families" What is “Families”: A collection of families. Each family has a name and is composed of members: A father A mother Several sons Several daughters Each family member has a first name. Family March Father: Jim Mother: Cindy Son: Brandon Daughter: Brenda Family Sailor Father: Peter Mother: Jackie Sons: David, Dylan Daughter: Kelly Family lastName : String Member firstName : String father familyFather familyMothermother familySonsons daughtersfamilyDaughter * *

Families to Persons © 2007 ATLAS Nantes "Families" metamodel (visual presentation and KM3) Family lastName : String Member firstName : String father familyFather familyMothermother familySonsons daughtersfamilyDaughter * *

Families to Persons © 2007 ATLAS Nantes "Persons" metamodel (visual presentation and KM3) Person fullName MaleFemale

Families to Persons © 2007 ATLAS Nantes The big picture 1.Our goal in this mini-tutorial is to write the ATL transformation, stored in the "Families2Persons" file. 2.Prior to the execution of this transformation the resulting file "sample-Persons.ecore" does not exist. It is created by the transformation. 3.Before defining the transformation itself, we need to define the source and target metamodels ("Families.km3" and "Person.KM3"). 4.We take for granted that the definition of the ATL language is available (supposedly in the "ATL.km3" file). 5.Similarly we take for granted that the environment provides the recursive definition of the metametamodel (supposedly in the "Ecore.ecore" file).

Families to Persons © 2007 ATLAS Nantes Families to Persons Architecture 1.Families and Persons metamodels have been created previously. 2.They have been written in the KM3 metamodel specification DSL (Domain Specific Language).

Families to Persons © 2007 ATLAS Nantes Families to Persons Architecture 1.The following file is the sample that we will use as source model in this use case:

Families to Persons © 2007 ATLAS Nantes Families to Persons Architecture 1.Now, let us start the creation of the ATL transformation Families2Persons.atl. 2.We suppose the ATL environment is already installed. 3.The creation of the ATL transformation will follow several steps as described in the next slides.

Families to Persons © 2007 ATLAS Nantes Families to Persons: project creation First we create an ATL project by using the ATL Project Wizard.

Families to Persons © 2007 ATLAS Nantes Families to Persons: ATL transformation creation Next we create the ATL transformation. To do this, we use the ATL File Wizard. This will generate automatically the header section. IN: Name of the source model in the transformation Families: Name of the source metamodel in the transformation Persons: Name of the target metamodel in the transformation OUT: Name of the target model in the transformation

Families to Persons © 2007 ATLAS Nantes Families to Persons: header section The header section names the transformation module and names the variables corresponding to the source and target models ("IN" and "OUT") together with their metamodels ("Persons" and "Families") acting as types. The header section of "Families2Persons" is:

Families to Persons © 2007 ATLAS Nantes Families to Persons: helper "isFemale()" A helper is an auxiliary function that computes a result needed in a rule. The following helper "isFemale()" computes the gender of the current member: Family lastName : String Member firstName : String father familyFather familyMothermother familySonsons daughtersfamilyDaughter * *

Families to Persons © 2007 ATLAS Nantes Families to Persons: helper "familyName" The family name is not directly contained in class “Member”. The following helper returns the family name by navigating the relation between “Family” and “Member”: Family lastName : String Member firstName : String father familyFather familyMothermother familySonsons daughtersfamilyDaughter * *

Families to Persons © 2007 ATLAS Nantes Families to Persons: writing the rules After the helpers we now write the rules: Member to Male Member to Female

Families to Persons © 2007 ATLAS Nantes Summary of the Transformation 1.For each instance of the class "Member" in the IN model, create an instance in the OUT model. 2.If the original "Member" instance is a "mother" or one of the "daughters" of a given "Family", then we create an instance of the "Female" class in the OUT model. 3.If the original "Member" instance is a "father" or one of the "sons" of a given "Family", then we create an instance of the "Male" class in the OUT model. 4.In both cases, the "fullname" of the created instance is the concatenation of the Member "firstName" and of the Family "lastName", separated by a blank. + If isFemale() Female Else Male Person fullName : String MaleFemale Family lastName : String Member firstName : String father familyFather familyMothermother familySonsons daughtersfamilyDaughter * *

Families to Persons © 2007 ATLAS Nantes Families to Persons Architecture 1.Once the ATL transformation “Families2Persons” is created, we can execute it to build the OUT model.

Families to Persons © 2007 ATLAS Nantes ATL Launch Configuration - 1

Families to Persons © 2007 ATLAS Nantes ATL Launch Configuration - 2

Families to Persons © 2007 ATLAS Nantes Summary We have presented here a "hello world" level basic ATL transformation. This is not a recommendation on how to program in ATL, just an initial example. Several questions have not been answered Like how to transform a text into an XMI-encoded model. Or how to transform the XMI-encoded result into text. For any further questions, see the documentation mentioned in the resource page (FAQ, Manual, Examples, etc.).

Families to Persons © 2007 ATLAS Nantes ATL Resource page ATL Home page ATL Documentation page ATL Newsgroup news://news.eclipse.org/eclipse.modeling.m2m ATL Wiki

Families to Persons © 2007 ATLAS Nantes Working on the example There are a lot of exercise questions that could be based on this simple example. For example, modify the target metamodel as shown and compute the "grandParent" for any Person. Person fullName: String MaleFemale grandParent