© 2005-2006 The ATHENA Consortium. AP6 – Model-Driven Development of Interoperable Web Services, Agents and P2P Solutions Learn about model transformations.

Slides:



Advertisements
Similar presentations
Diagram Definition: an Overview Third OMG/Eclipse Symposium 25 March 2012 Maged Elaasar, Senior Software Engineer.
Advertisements

Major Influences on the Design of ODM Dan Chang (IBM) Elisa Kendall (Sandpiper) MDSW 2004.
Language Specification using Metamodelling Joachim Fischer Humboldt University Berlin LAB Workshop Geneva
Profiles Construction Eclipse ECESIS Project Construction of Complex UML Profiles UPM ETSI Telecomunicación Ciudad Universitaria s/n Madrid 28040,
Modeling Services Model Interoperability Xavier Blanc – University Paris VI.
IAAnalyzer: Towards a Model-Driven Modeling and Analysis Framework for C ONNECT(ors) Massimo Tivoli, University of L’Aquila (UNIVAQ)
1Model Driven Architecture – 3. März 2008 – Siegfried Nolte 1.UML – What is it and what is it good for ? 2.MDA – What is it and what is it good for ? 3.MDA.
© The ATHENA Consortium From PIM4SOA to Web Services,
June 9, 2006 Transforming models with ATL © 2006 ATLAS Nantes Transforming models with ATL The A TLAS Transformation Language Frédéric Jouault ATLAS.
Query/Views/Transformations © 2006 ATLAS Nantes Query/Views/Transformations An introduction to the MOF 2.0 QVT standard with focus on the Operational.
© The ATHENA Consortium. CI2: The ATHENA Interoperability Framework Module 2: e-Procurement Scenario Furniture Sector 2.
1 Model-driven development of SOA with Web services – using QVT technology Master thesis by Berge Stillingen Department of Informatics, University of Oslo.
MDA and QVT in Together Architect 2006  Pavel Kobiakov, Borland Software Corporation  06 December 2005.
Telecom and Informatics :: INF5120 :: Mansur Abbasi & Svein Melby Assignment 1 – First aid - Clarifications, issues and insight.
UML CASE Tool. ABSTRACT Domain analysis enables identifying families of applications and capturing their terminology in order to assist and guide system.
Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.
Sheet 1© 2005 Lentedagen, 30 March-1 April 2005 IPA Lentedagen on Software Architecture Model Transformations in MDA Ivan Kurtev.
Whole Platform Tesi di Dottorato di: RICCARDO SOLMI Università degli Studi di Bologna Facoltà di scienze matematiche, fisiche e naturali Corso di Dottorato.
IBM Software Group © 2005 IBM Corporation University of Nantes Eclipse dayMarch 2005 The Eclipse Modeling Framework and the IBM Model Transformation Framework.
Comparing M2T & M2M Complementary Approaches © 2008 INRIA, University of York & SINTEF Comparing M2T & M2M Complementary Approaches Hugo Bruneliere,
© The ATHENA Consortium. CI2: The ATHENA Interoperability Framework Module 3: Collaborative Product Development Scenario Aeronautics and Aerospace.
© The ATHENA Consortium. EM1 - Enterprise Modelling as a way to achieve Interoperability Module 4 - How does Enterprise Modelling address these.
MDA Guide Version CYT. 2 Outline OMG Vision and Process Introduction to MDA How is MDA Used? MDA Transformations Other MDA Capabilities Using the.
AP4 – Introduction to Model-Driven Interoperability (MDI)
An Approach and Tool for Synchronous Refactoring of UML Diagrams and Models Using Model-to-Model Transformations Hafsteinn Þór Einarsson Helmut Neukirchen.
Model Transformations
© The ATHENA Consortium From PIM4SOA to Peer-2-Peer (P2P),
© The ATHENA Consortium. AP5 – Principles of Model-Driven Interoperability Learn about model-driven interoperability, metamodelling, UML profiles.
Faculty of Informatics and Information Technologies Slovak University of Technology Peter Kajsa and Ľubomír Majtás Design.
© The ATHENA Consortium. EM1 - Enterprise Modelling as a way to achieve Interoperability Module 2 - What are the current methods and tools for.
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer Mappings, Use of MOF for Language Families Joachim Fischer Workshop on.
© The ATHENA Consortium Metamodelling,
Metadata Tools and Methods Chris Nelson Metanet Conference 2 April 2001.
© The ATHENA Consortium. CI2: The ATHENA Interoperability Framework Module 1: The ATHENA Interoperability Framework.
MDA and QVT  Tom Gullion, Director of Product Management, Together Products.
MDE Model Driven Engineering Xavier Blanc Université Pierre et Marie Curie
Model transformation with a dedicated imperative language IRISA Rennes (France) - Triskell team Jean-Marc Jézéquel Didier Vojtisek Jean-Philippe Thibault.
Introduction to MDA (Model Driven Architecture) CYT.
Secure Systems Research Group - FAU Securing Service-Oriented Architectures using a Model-driven Approach Nelly A Delessy.
Alignment of ATL and QVT © 2006 ATLAS Nantes Alignment of ATL and QVT Ivan Kurtev ATLAS group, INRIA & University of Nantes, France
© The ATHENA Consortium UML Profiles and Domain-Specific Languages (DSLs),
2nd TTCN-3 User Conference, June The TTCN-3 Metamodel – A Basis for Tool Integration Ina Schieferdecker TU Berlin/Fraunhofer Fokus Hajo Eichler,
What is MOF? The Meta Object Facility (MOF) specification provides a set of CORBA interfaces that can be used to define and manipulate a set of interoperable.
© The ATHENA Consortium. CI3 - Practices of Interoperability in SMEs Carrier-Shipper Scenario.
Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 (Presenter) and Yvan Labiche.
Copyright © 2009 AtlanMod. All Rights Reserved Frédéric Jouault & Hugo Bruneliere AtlanMod team (INRIA & Mines de Nantes) Possible Benefits of Bridging.
© The ATHENA Consortium. EM1 - Enterprise Modelling as a way to achieve Interoperability Module 1 - What is Enterprise Modelling?
© The ATHENA Consortium. 6-3b. Atlas Transformation Language (ATL) Tutorial / Exercise,
ISO/IEC CD and WD : Core Model and Model Mapping ISO/IEC JTC1/SC32/WG September 2005, Toronto SC32/WG2 Japan (Kanrikogaku Ltd) Masaharu.
University of Southern California Center for Systems and Software Engineering Model-Based Software Engineering Supannika Koolmanojwong Spring 2013.
Model Driven Development An introduction. Overview Using Models Using Models in Software Feasibility of MDA MDA Technologies The Unified Modeling Language.
© The ATHENA Consortium. CI2: The ATHENA Interoperability Framework Module 5: Supply Chain Management (SCM) Automotive sector.
Modeling Component-based Software Systems with UML 2.0 George T. Edwards Jaiganesh Balasubramanian Arvind S. Krishna Vanderbilt University Nashville, TN.
ModelPedia Model Driven Engineering Graphical User Interfaces for Web 2.0 Sites Centro de Informática – CIn/UFPe ORCAS Group Eclipse GMF Fábio M. Pereira.
Copyright © IBM Corp., | March | Creating Robust Scalable DSLs with UML Tutorial (172) James Bruck, Christian Damus IBM Rational Software.
Model transformation with a dedicated imperative language IRISA Rennes (France) - Triskell team Jean-Marc Jézéquel Didier Vojtisek Jean-Philippe Thibault.
© The ATHENA Consortium. EM1 - Enterprise Modelling as a way to achieve Interoperability Module 3 - What interoperability problems does Enterprise.
ModTransf A Simple Model to Model Transformation Engine Cédric Dumoulin.
Based on material developed in ATHENA (IST ), INTEROP (IST ) and MODELWARE (IST ) 6-1b. Atlas Transformation Language (ATL) with RSM.
© The ATHENA Consortium. CI3 - Practices of Interoperability in SMEs Proposed Solutions.
Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.
Model Driven Architecture MDA SE-548 Lale Doğan
Sheet 1MDAFA2004 Linköping, June 2004 A Language for Model Transformations in the MOF Architecture Ivan Kurtev, Klaas van den Berg University of Twente,
© The ATHENA Consortium. 5-2b. Eclipse Modeling Framework (EMF) Tutorial / Exercise,
Page 1 Hitachi Ltd. – FhI FOKUS TTCN-3 User Conference, June 2005 MDA based approach for generation of TTCN-3 test specifications Hideto Ogawa, Hitachi.
Web Application Modeling
Model-Driven Ontology Engineering
Metadata Framework as the basis for Metadata-driven Architecture
QVT Operational 1.0 Ganymede Simultaneous Release Graduation Review
Software Architecture & Design
Presentation transcript:

© The ATHENA Consortium. AP6 – Model-Driven Development of Interoperable Web Services, Agents and P2P Solutions Learn about model transformations from PIM4SOA to Web services, agents and P2P software solutions.

2 © The ATHENA Consortium. Course description A PIM4SOA model is a basis for model transformation and code generation. The course teaches how to refine a PIM4SOA into specific system realisations such as Web services (XSD, WSDL and BPEL), agents and P2P solutions using for example the transformation tools developed in ATHENA. However, an important part of the training is to understand the use of model transformation and be able to develop your own model transformations according to your integration needs.

3 © The ATHENA Consortium. Course objective This course aims to be a method engineering course that will teach the students how to develop their model transformations to support their own model-driven development methodologies. This is shown using examples from PIM4SOA, Web services, agents and P2P. Participants will gain an understanding of the use of model transformations in a software engineering development and integration process.

4 © The ATHENA Consortium. MDI training track NoTopicPresenter AP4AP4 4-1Interoperability & Model-Driven Architecture (MDA),, AP5AP5 5-1ATHENA Model-Driven Interoperability (MDI) Framework,, 5-2Metamodelling Eclipse Modeling Framework (EMF) Tutorial / Exercise,, 5-3UML Profiles and Domain-Specific Languages (DSLs) Eclipse Graphical Modeling Framework (GMF) Tutorial / Exercise,, 5-4Method Engineering Eclipse Process Framework (EPF) Tutorial / Exercise,, AP6AP6 5-1Model Mappings and Transformations ATL Tutorial (optional) MOFScript Tutorial (optional),, 5-2Model-Driven Development with PIM4SOA,, 5-3From PIM4SOA to Web Services PIM4SOA to XSD ATL Tutorial / Exercise,, 5-4From PIM4SOA to Agents,, 5-5From PIM4SOA to Peer-2-Peer (P2P),,

5 © The ATHENA Consortium. MDI website

© The ATHENA Consortium Model Mappings and Transformations,

7 © The ATHENA Consortium. ATHENA Model-Driven Interoperability (MDI) Framework MDA & Interoperability Metamodelling UML Profiles & DSLs Model Transformations Method Engineering Reusable MDI Assets Method chunks Tools and services Models and metamodels Model transformations DSLs and UML profiles Reference examples

8 © The ATHENA Consortium. Outline Foundations of model mappings and transformations Model transformation technologies and examples References

9 © The ATHENA Consortium. Foundations of model mappings and transformations

10 © The ATHENA Consortium. About MOF MOF is short for Meta-Object Facility OMG standard MOF is constructed to store and manage metamodels and model instances of these. One can view MOF as a generic storage which lets you define a (meta)model of what to store, and MOF will manage storage of data according to this (meta)model. Is now used in various UML tools. MOF support for Java in the form of JMI (Java Metadata Interface)

11 © The ATHENA Consortium. MOF usage Core technology for flexible model repositories –A commonly used term for denoting a structured storage for information of various kinds. Define new metamodels in a standardized way. Base technology for different modelling tools (UML).

12 © The ATHENA Consortium. Model mapping (1/2) Mapping is performed by defining relations between two models The relations can be –1-to-1, n-to-1, 1-to-n or n-to-n Mapping is performed in “design time”

13 © The ATHENA Consortium. Model mapping (2/2) The mapping is defined with models one meta- level higher than the input and output of the transformation. The mapping is used to perform transformation of instances of the mapped models. “The mapping describes the rules used for the transformation”.

14 © The ATHENA Consortium. Mapping and transformation Source Metamodel Input Model Output Model Target Metamodel Mapping Transformation > based on

15 © The ATHENA Consortium. Different mappings PSM1 metamodel PSM2 metamodel PIM2 metamodel PIM1 metamodel Horizontal Mapping Horizontal Mapping Vertical Mapping High Abstraction Low Abstraction

16 © The ATHENA Consortium. Transformations Takes input and produces output –One-way process Transforms according to a predefined mapping Transformation is used in “run time” Two main categories of transformation –Vertical transformation –Horizontal transformation

17 © The ATHENA Consortium. Horizontal transformation Source model has the same level of abstraction as target model –Not to be confused with “meta-levels” Examples of horizontal transformation –Refactoring –Merging

18 © The ATHENA Consortium. Vertical transformation Source model is at a different level of abstraction than the target model Examples of vertical transformation –Refinement (specialization) PIM  PSM transformations –Abstraction (generalization)

19 © The ATHENA Consortium. MOF QVT (Query/View/Transformation) High-level –Definition of query/view/transformation language for MOF –Important part of realizing the OMG MDA vision Part of the MOF 2.0 specification work in OMG –MOF 2.0 Facility / Object Lifecycle RFP –MOF 2.0 IDL RFP MOF 2.0 Versioning RFP –MOF 2.0 Query / View / Transformation RFP –MOF 2.0 Core We focus on the transformation part –But we will need both the Q and the V for it to work

20 © The ATHENA Consortium. Involved partners Codagen Compuware DSTC France Telecom IBM INRIA Interactive Objects Kings College London Softteam Sun Microsystems Tata Consultancy Services Thales TNI-Valiosys University of Paris VI University of York

21 © The ATHENA Consortium. QVT - Query/View/Transformation Queries are performed on input models for finding specific elements or information –Example: Return all classes Views are models derived from other models –The result of a query is a kind of view Transformations takes a model as input and creates a new model –Example: PIM  PSM –Defined in Relations language or Core language –Uses Queries and Views

22 © The ATHENA Consortium. How to define a transformation? The abstract syntax must be defined as a metamodel in MOF Concrete syntax expressed as text (program code) or models Variations –Declarative –Imperative

23 © The ATHENA Consortium. QVT overview Core Relations Black Box Operational Mappings RelationsToCore Transformation

24 © The ATHENA Consortium. QVT overview – Declarative part Relations –Declarative specification of the mapping between MOF models –Equivalent with Java code (high-level) Relations to Core transformation –Equivalent with compiling Java code into byte code Core –Equivalent with Java byte code (low-level)

25 © The ATHENA Consortium. QVT overview – Imperative part Operational mappings –Standard language for defining Relations (or Core) in an imperative way Black box –Offers the possibility to plug-in code from any programming language with a MOF binding

26 © The ATHENA Consortium. QVT in practice – most transformation Given a defined metamodel for source and target –Metamodels must be well-defined according to MOF (models on level M2) One can define transformations between these two worlds in a general, standardized manner –The transformation can be used on all instances of the source metamodel –The result will be an instance of the target metamodel

27 © The ATHENA Consortium. Model transformation technologies and examples

28 © The ATHENA Consortium. Technology overview Multiple technologies for mapping and transformation –Java –IBM Model Transformation Framework (MTF) –Atlas Transformation Language (ATL) Not many QVT-based ones –QVT support in Borland Together Architect 2006

29 © The ATHENA Consortium. Java Technologies such as MDR and EMF allow for generation of Java API toward arbitrary metamodels Using these APIs mappings can be defined in a Java program The transformation is performed by running the Java program on a model instance given as input Drawback –API generation for metamodels needed Pros –Well known language for mapping definition

30 © The ATHENA Consortium. IBM MTF MTF was developed in order to experiment with QVT related concepts MTF is not QVT compliant MTF rules describe the relationships between the input and the output metamodel Provides functionality to define mappings between metamodels And execute the model transformations

31 © The ATHENA Consortium. ATL The Atlas Transformation Language (ATL) is a hybrid language (a mix of declarative and imperative constructions) designed to express model transformations as described by the MDA approach. It is not QVT, but similar and with the corresponding functionality A transformation model in ATL is expressed as a set of transformation rules. The recommended style of programming is declarative. OCL is used to expression constraints on rules –Guards (constraints) on the entry point for a rule Different kinds of M3/M2 (meta)metamodel technology supported: Netbeans MDR and EMF Ecore –Can use either EMF or MDR metamodels as input and output. Can also be used to produce textual output.

32 © The ATHENA Consortium. Example: UML  RDBMS Parts of UML metamodel

33 © The ATHENA Consortium. Example: UML  RDBMS Simple RDBMS metamodel

34 © The ATHENA Consortium. Example: Informal rules A persistent class maps to a table, a primary key and an identifying column. Attributes of the persistent class map to columns of the table: an attribute of a primitive datatype maps to a single column; an attribute of a complex data type maps to a set of columns corresponding to its exploded set of primitive datatype attributes; attributes inherited from the class hierarchy are also mapped to the columns of the table. An association between two persistent classes maps to a foreign key relationship between the corresponding tables.

35 © The ATHENA Consortium. Example: Java transformation (1/2) public Model model2model(org.eclipse.uml2.Model inModel){ Model retval = RdbmsFactory.eINSTANCE.createModel(); Iterator it = inModel.getOwnedElements().iterator(); while (it.hasNext()){ Object element = it.next(); if(element instanceof Class){ Class toProcess = (Class)element; retval.getElements().add(class2table(toProcess)); } return retval; } public Table class2table(Class inClass){ Table retval = RdbmsFactory.eINSTANCE.createTable(); retval.setName(inClass.getName()); Iterator it = inClass.getOwnedAttributes().iterator(); while (it.hasNext()){ Object attrib = it.next(); if(attrib instanceof Property){ Property toProcess = (Property)attrib; retval.getColumns().add(attrib2column(toProcess)); } return retval; }

36 © The ATHENA Consortium. Example: Java transformation (2/2) public Column attrib2column(Property inAttr){ Column retval = RdbmsFactory.eINSTANCE.createColumn(); retval.setName(inAttr.getName()); retval.setType(inAttr.getType().getName()); return retval; } It is all about traversing the model tree –And building an output model

37 © The ATHENA Consortium. Example: MTF transformation /* UML Packages map to EPackages */ relate umlpkg2ecore( uml:Package pkg, ecore:EPackage epkg) when equals(pkg.name, epkg.name) { // map sub-packages umlpkg2ecore( over pkg.ownedMember, over epkg.eSubpackages), // map classifiers umlclassifier2ecore( over pkg.ownedMember, over epkg.eClassifiers ) } /* UML Classifiers map to EClassifiers */ abstract relate umlclassifier2ecore( uml:Classifier class, ecore:EClassifier eclass) when equals(class.name, eclass.name) /* Map UML Class to EClass */ relate umlclass2ecore extends umlclassifier2ecore( uml:Class class, ecore:EClass eclass) { // check that super classes map to each other check umlclass2ecore(over class.superClass, over eclass.eSuperTypes) }

38 © The ATHENA Consortium. Example: ATL transformation (1/2) module uml2rdbms; -- Module Template create OUT : rdbms from IN : uml2; rule model{ from inMod:uml2!Model to modi:rdbms!Model( elements <-inMod.ownedMember ) } rule class2table{ from cl:uml2!Class (cl.oclIsTypeOf(uml2!Class)) to tbl:rdbms!Table( name <- cl.name, columns <- cl.ownedAttribute ) }

39 © The ATHENA Consortium. Example: ATL transformation (2/2) rule attr2col{ from attr:uml2!Property to col:rdbms!Column( name <- attr.name, type <-attr.type.name ) } Compared to Java ATL provides simpler mechanisms for model traversal

40 © The ATHENA Consortium. Example: QVT graphical notation A persistent class maps to a table, a primary key and an identifying column c:Class t:Table name=cn kind=‘Persistent’ name=cn CE uml rdbms p:PackageS:Schema cl:Column name=cn+’_tid’ type=‘NUMBER’ k:Key name=cn+’_pk’ where when PackageToSchema(p,s) AttributeToColumn(c,t,’’)

41 © The ATHENA Consortium. Example: QVT textual notation top relation ClassToTable { cn, prefix: String; checkonly domain uml c:Class {namespace=p:Package {}, kind='Persistent', name=cn}; enforce domain rdbms t:Table {schema=s:Schema {},name=cn, column=cl:Column {name=cn+'_tid', type='NUMBER'}, key=k:Key {name=cn+'_pk', column=cl}}; when { PackageToSchema(p, s); } where { prefix = ''; AttributeToColumn(c, t, prefix); } A persistent class maps to a table, a primary key and an identifying column

42 © The ATHENA Consortium. References

43 © The ATHENA Consortium. References OMG, "Meta Object Facility (MOF) 2.0 Query/View/Transformation Specification", Object Management Group (OMG), Document ptc/ , November INRIA, "ATL - The Atlas Transformation Language Home Page". Eclipse.org, "ATL Home page". IBM, "Model Transformation Framework". IBM, "Model Transformation with the IBM Model Transformation Framework".

44 © The ATHENA Consortium. This course has been developed under the funding of the EC with the support of the EC ATHENA-IP Project. Disclaimer and Copyright Notice: Permission is granted without fee for personal or educational (non-profit) use, previous notification is needed. For notification purposes, please, address to the ATHENA Training Programme Chair at In other cases please, contact at the same address for use conditions. Some of the figures presented in this course are freely inspired by others reported in referenced works/sources. For such figures copyright and all rights therein are maintained by the original authors or by other copyright holders. It is understood that all persons copying these figures will adhere to the terms and constraints invoked by each copyright