Presentation is loading. Please wait.

Presentation is loading. Please wait.

Telecom and Informatics 1 26.02.2007 :: INF5120 :: Mansur Abbasi & Svein Melby Assignment 1 – First aid - Clarifications, issues and insight.

Similar presentations


Presentation on theme: "Telecom and Informatics 1 26.02.2007 :: INF5120 :: Mansur Abbasi & Svein Melby Assignment 1 – First aid - Clarifications, issues and insight."— Presentation transcript:

1 Telecom and Informatics 1 26.02.2007 :: INF5120 :: Mansur Abbasi & Svein Melby Assignment 1 – First aid - Clarifications, issues and insight

2 Telecom and Informatics 2 Agenda 1.Overview a. Overall purpose and ultimate goals b. General workbench c. Specific workbench d. Process (overview) e. Metamodel f. Resources 2.Details a. EMF insight b. GMF insight c. ATL insight d. MOFScript insight 3.Final notes

3 Telecom and Informatics 3 Part 1 – Overview

4 Telecom and Informatics 4 1a. Overall purpose and ultimate goal Role: Developer of a customized development environment for … Ultimate goals: Understand the essence of: Metamodelling Language Driven Engineering Domain-specific workbenches / tool chains Transformations By-products: Familiarization with Eclipse-based technologies for MDSD Background knowledge that will be useful in assignment 2

5 Telecom and Informatics 5 1b. The general workbench Eclipse SDK w/ plugins: EMF – Eclipse Modeling Framework GMF – Graphical Modeling Framework (GEF – Graphical Editing Framework [not displayed]) ADT – Atlas Development Tools MOFScript – MOFScript tool

6 Telecom and Informatics 6 1c. The domain-specific workbench Customized workbench: A – Model editor B – Graphical editor (realized on top of model editor) C – Transformation definitions to enable one-click generation of desired target artifact(s) from models

7 Telecom and Informatics 7 1d. Process overview  Define metamodel (abstract syntax)  Generate model editor  Define notational model (concrete syntax)  Generate graphical diagram editor  Can be viewed as a graphical overlay on the model editor  Define metamodel(s) for target artifact(s)  Define mapping from source metamodel to target metamodel and automate this by defining transformations

8 Telecom and Informatics 8 1e. Metamodel In assignment 1, the domain is SOA concepts. Your task is to construct the domain-specific workbench for the SOA concepts DSL. PIM4SOA describes the abstract syntax. You have the tutorials to aid you. Could have chosen a different domain Only difference would be the abstract syntax you would start with

9 Telecom and Informatics 9 1f. Resources Tutorials EMF tutorial GMF tutorial Transformation tutorial User guides ATL / ADT user guide MOFScript user guide More/better material on EMF and GMF can be found at www.eclipse.org www.eclipse.org www.modelbased.net/mdi/

10 Telecom and Informatics 10 Part 2 – Details

11 Telecom and Informatics 11 EMF insight Metamodel (ecore) Discribes the grammar of our PIM4SOA model EMF model (genmodel) Contains the information needed to generat code Model code Is created in the src folder of the project Contains a factory class (++) that makes it possible to create models programatically from Java Editor Code Works as an adapter between the model code and Eclipse Uses the model code to create instances of our model and preseting them to Eclipse

12 Telecom and Informatics 12 PIM4SOA metamodel - Ecore

13 Telecom and Informatics 13 GMF insight Makes it possible to define graphical syntax for our metamodel – the concrete syntax

14 Telecom and Informatics 14 Graphical definiton A model (gmfgraph) describing the figures that shall be used in our graphical editor Defines a set of figures (Figure Gallery) Either by choosing one of the predefined figures Or creating a custom figure Also defines a set of Nodes, Connectios, Comparments and Labels. These are then mapped together to define how each of the Nodes, Connections, Compartments and Labels will be shown graphicaly Is not connected to the metamodel by any means at this stage

15 Telecom and Informatics 15 Graphical definiton for our PIM4SOA metamodel

16 Telecom and Informatics 16 Tooling Definition(1) A model (gmftool) describing the tools that will be used to create elements in our editor Defines a Pallette consisteing of one or more tool groups The tool groups consists of one or more tools (In our case creation tools) Each tool needs a small and a large image to represent the tool in the editor The small images: The large images:

17 Telecom and Informatics 17 Tooling Definition(2) The tooling model has no information on which artefacts to create. It’s simply a set of tools with names

18 Telecom and Informatics 18 Tooling definition for our PIM4SOA metamodel

19 Telecom and Informatics 19 Mapping definition(1) A model (gmfmap) describing how to map the elements from the metamodel (ecore) with the figures from the graphical definition model and the tools from the tool definition model.

20 Telecom and Informatics 20 Mapping definition(2) Defines a set of Top Node References Top Node = Diagram Element = The element in the metamodel represented by the diagram (the element we wil ”be inside”) Top Node Reference = an aggregation contained in the Top Node = set of elements contained in the Top Node May contain a Node Mapping for an element it contains = a reference to the aggregation subpackages (fom Package) and the Node Mapping for the element Document that is contained in subpackages

21 Telecom and Informatics 21 Mapping definition(3) Each Top Node Reference may contain a Node Mapping Specifies the mapping between an element in the metamodel, a Node from the graphichal model and a Tool from the tooling model e.g. That a the EClass Document from the metamodel will be represented by the Node Document from the graphical model (which is mapped to the Rectangle Document Figure (specified in gmfgraph), and that this Node will be created by the Creation Tool Document from the tool model:

22 Telecom and Informatics 22 Mapping definition(4) Each Node Mapping may contain a Label Mapping Specifies the mapping between a Diagram Label from the graphical model and an attribute contained in the ECore element of the Node Mapping E.g. a Label Mapping contained in the Node Mapping for the ECore element Documet (containing an attibute - name) may specify that the EAttribute name will store the value of Diagram Label DocumentName from the graphical model:

23 Telecom and Informatics 23 Mapping definition(5) The mapping may also specify a set of Link Mappings Specifies the mapping between an element in the metamodel, a Connection from the graphichal model and a Tool from the tooling model. e.g. That a the EClass Association from the metamodel will be represented by the Connection Association from the graphical model (which is mapped to the Polyline Connection AssociiationFigure (specified in gmfgraph), and that this Association will be created by the Creation Tool Associaion from the tool model. We also need to specify that the EClass Association is contained by the elements aggregation of Document. And also what will be the Target feature of the link (we dont need to set the source feature because the association is contained in Document. For EntityAssociation this is not the case):

24 Telecom and Informatics 24 Mapping definition(6)

25 Telecom and Informatics 25 Mapping definition of our PIM4SOA metamodel

26 Telecom and Informatics 26 The GMF Wizards The models are only created with wizard to make the creation easier for us – we could do it manually The generated model should be viewed as a kind of suggestion to how they should look. They do however contain errors. The names of the model are automatically generated, and may therefore sometimes seem strange The names can be changed in any way one would like How the models look does not matter. One may edit them in all ways possible to make them fit ones needs The important thing is that there is elements in the model describing the graphics/tools/mappings The properties – and not the names – is what needs to be set right The graphical definition, tooling definition and the metamodel is independent of each other. It is the mapping model that links them together.

27 Telecom and Informatics 27 ATL Insight Atlas Transformation Language (ATL) is a model 2 model transformation language. Requies an ATL plugin Requires a source metamodel, a target metamodel and an input model (instance of the source metamodel) Generates a model instance of the target metamodel from the inputmodel, based on the mapping defined between the metamodels

28 Telecom and Informatics 28 Model transformatios Document - Name : String Doc2Schema{ from d : pim4soa!Document to s : xsd ! xsdSchema( s.name <- d.name)} Mapping XSDSchema - Name : String Order

29 Telecom and Informatics 29 ATL The input model is created by using the generated editor Either by using the diagam editor – need to add creation tools, Figures for ItemType and a mapping definition in this case (to be able to create ’String’ and ’Intger’) Or by using the model editor to edit the model directly. The ItemTypes will not be shown in the diagram in this case Also need to create the target metamodel in the same way that wecreated the PIM4SOA model, but we dont need to generate any code. The input model, and the metamodels can be copied into the ATL project

30 Telecom and Informatics 30 MOFScript insight Is a Model 2 Text transformations language Plugin 2 eclipse Mofscript files may be created in any project. Can be created by creating a regular file with the extension.m2t Ned to add the metamodel the C:\EclipseExtensions\eclipse\plugins\org.sintef.mofscript.e ditor_1.1.11\repository\metamodels The input model is specified when the transformation is run.

31 Telecom and Informatics 31 The result of the MOFScript transformantion http:///XSDMetamodel/model

32 Telecom and Informatics 32 Part 3 – Final notes

33 Telecom and Informatics 33 3. Final notes FAQ published on course website Check the FAQ before submitting further questions and/or clarification requests DEADline: MONDAY 05.03.2007 at 23:59! Plan your delivery! If you haven’t managed to complete, submit what you have! The report is important Please write it yourself… ZIP-files only Oblig1_ _inf5120.zip Other formats will not be accepted, so avoid tar, gzip, etc.


Download ppt "Telecom and Informatics 1 26.02.2007 :: INF5120 :: Mansur Abbasi & Svein Melby Assignment 1 – First aid - Clarifications, issues and insight."

Similar presentations


Ads by Google