Muhammad Ali Memon IRISA Lab / INRIA Rennes, France Triskell Team - - PowerPoint PPT Presentation

muhammad ali memon
SMART_READER_LITE
LIVE PREVIEW

Muhammad Ali Memon IRISA Lab / INRIA Rennes, France Triskell Team - - PowerPoint PPT Presentation

Ecore Muhammad Ali Memon IRISA Lab / INRIA Rennes, France Triskell Team mmemon@irisa.fr 1 2 3 The Unified Modeling Language (UML) Model-Driven Engineering (MDE) Eclipse-Modeling Framework (EMF) Ecore Kermeta


slide-1
SLIDE 1

1

Muhammad Ali Memon

IRISA Lab / INRIA Rennes, France Triskell Team mmemon@irisa.fr

Ecore

slide-2
SLIDE 2

2

slide-3
SLIDE 3

3

slide-4
SLIDE 4

4

 The Unified Modeling Language (UML)  Model-Driven Engineering (MDE)  Eclipse-Modeling Framework (EMF)

  • Ecore

 Kermeta

  • Specification of abstract syntax, static

semantics(OCL) and dynamic semantics

  • Model and meta-model prototyping and simulation
  • Model transformation
  • Aspect weaving
slide-5
SLIDE 5

5

 Bridging the gap between UML and MDE

  • Simulation
  • Model Prototyping
  • Model Transformation from PIMs to PSMs
  • Aspect weaving
  • Generating concrete implementations

 Migrating Legacy systems UML models.

  • Automated translation of legacy UML models
  • Save time to transform Complex and large UML models

 New compiler to Kermeta

  • OCL for applying constraints
  • Java for generating Java code
slide-6
SLIDE 6

6 Translation

UML model EMF Ecore model

slide-7
SLIDE 7

7

slide-8
SLIDE 8

8

UML

EPackage EClass EOperation EParameter EReference or EAttribute EEnum EEnumLiteral Package Class Operation Parameter Property Enumeration EnumerationLiteral

Ecore

slide-9
SLIDE 9

9

Data types

Problem

 UML Primitive data types are different Ecore data types

Solution

 We create own data types with the reference to the java data type

Type

Problem

 UML Primitive types does not match with the Ecore data types

Solution

 We identify the UML Primitive data types for the UML element  We search the Ecore data types correspond to UML Primitive data types that was alreadycreated  Assign Ecore data types to the Ecore elements

Generalization

Problem

 Not direct mapping between both UML and Ecore metametamodels and may be multiple

relationship

Solution

 Find all the generalization classes in relationship Collection  Match supertypes in Ecore and general relationship within the UML.

slide-10
SLIDE 10

10

Association

Solution

 Create EReference element with the name of association End

Composition

Solution

 Create EReference element with the name of association End  Set Contaiement property of the EReference to true

Multiplicities

Problem

 Difference between data types of lower and upper bounds

− UML lower and upper bounds have different data types and then Ecore lower and upper bound

Solution

 We create the local variable of types UML primitive types and type casted them to Ecore data

types

Opposite Navigability

Solution

 To find opposite property in other class with the same type as current class.

slide-11
SLIDE 11

11

This Algorithm works by traversing UML model in four passes.

  • First Pass: The main Package and Sub Packages are created.
  • Second Pass : Data types, classes, enumerations and its

enumeration literals are created.

  • Third pass : Operations in the classes, parameters in the
  • perations, attributes of the classes, generalization and

association relationships are created.

  • Fourth pass: Opposition relationships are created between

properties for both side navigability.

slide-12
SLIDE 12

12

aspect class Class { method thirdPass() :Void is do All OwnedElements.secondPass() end } aspect class Operation { method thirdPass() :Void is do Create Eoperation in Ecore end }

We combined two approaches for implmentation of the translation.(Kiczales)

Aspect Oriented Approach

Visitor Pattern

Aspect Classes Visitor Methods

slide-13
SLIDE 13

13

slide-14
SLIDE 14

14

slide-15
SLIDE 15

15

The main Package and Sub Packages are created

UML Model Ecore Model

slide-16
SLIDE 16

16 Data types, classes, enumerations and its enumeration literals are created

UML Model Ecore Model

slide-17
SLIDE 17

17 Operations in the classes, parameters in the operations, attributes of the classes, generalization and association relationships are created.

UML Model Ecore Model

slide-18
SLIDE 18

18 Opposition relationships are assigned between properties for both side navigability.

UML Model Property window of Ecore Model

slide-19
SLIDE 19

19

slide-20
SLIDE 20

20

 Limitations − Translation does not support automated synchronization. − There is no reverse translation from Ecore to UML. − Translation targets only one part (Class Diagram) of UML

 Interfaces, Constraints, Aggregation

 Future Work − Work on limitations − Check Stability with more test cases − Case study that utilize all features of Kermeta − Adding this translation to Kermeta work bench for Kermeta

community

slide-21
SLIDE 21

21