1 from uml (fondue) to coopn an iterative approach applying mda techniques

20
1 From UML (Fondue) to COOPN An iterative approach applying MDA techniques

Post on 20-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

1

From UML (Fondue) to COOPN

An iterative approach applying MDA techniques

Luis Pedro 2

Outline

• Motivation and general approach• Some background

Fondue Specification The MDA approach

• Some steps towards the transformation Relationship between Fondue “components” and

COOPN “components”

• Tools, tools and another process diagram• Status report

Luis Pedro 3

Some Background

• Fondue What it provides

• Concept Model: Defines the static structure of the information in the system• Behavior Model: Defines the Input and Output communication of the system

Uses UML for notation (parts of different UML diagrams• Concept Model Class Diagram• Environment Model Collaboration Diagram• Protocol Model State Diagram• Operation Model (OCL)

Describes operations by operation schemas which specify operations by pre- and post conditions using OCL

The Fondue process can be outlined by a UML class diagram showing usage dependencies between the models

Luis Pedro 4

Some Backgroud (2)

• Fondue - ebanking example Environment Model (messages from the user)

<<system>>eBanking

User

loginUserNameloginPasswd

loginChallengecreatePayment

giveDetailsBeneficiarymodifyPaimentdeletePayment

Luis Pedro 5

Some Background (3)

• Fondue - ebanking example Environment Model (messages from the system)

<<system>>eBanking

User

sendChallengeNumbererrorUserName

errorPasswderrorChallenge

errorUserBlockederrorPaymentCreation

errorPaymentModification

Luis Pedro 6

Some Background (4)

• Fondue - ebanking example Concept Model

<<system>>

eBanking

User

userName : StringPasswd : PasswdName : StringloginTentativeNumber : IntuserState: bool

eUser

id : CardIdexpirationDate: Date

ChallengeCard

position : ChallengeId anserPosition: String

ChallengeCardElement

position1

table

0.. 1

1

0.. *0.. 1

<<Id>>

HasSessionId

Luis Pedro 7

Some Background (5)

• MDA - Model Driven Architecture How models defined in one language can be

transformed into models in other languages

Language L1

Transformationtool

Transformationdefinition

Language L2

•Is•written

•in

•Is•used

•by

•Is•written

•in

Luis Pedro 8

Some steps towards transformation

• Describe CO-OPN as a MOF Model Use UML notation to define CO-OPN Meta

Model Get XMI[UML] Convert XMI[UML] to XMI[MOF] Generate JMI from XMI[MOF] Use generated JMI to add and browse CO-

OPN repositories

Luis Pedro 9

Some steps towards transformation

• Fondue is already described as a MOF Model

QuickTime™ and aTIFF (LZW) decompressor

are needed to see this picture.

QuickTime™ and aTIFF (LZW) decompressor

are needed to see this picture.

Luis Pedro 10

Some steps towards transformation

• Iteration describing COOPN in early stages

Luis Pedro 11

Some steps towards transformation

• Environment model 1 CO-OPN Context Operations methods of the context Output messages Gates

input

output

•Directly from •the

•Metamodels

Luis Pedro 12

Some steps towards transformation

• Concept Model 1 Class 1 CO-OPN Class

• Name Name• Attributes Places • Access methods: put, get, read

Method put_a(x):: a y -> a x;• Gate get_a(x):: a x -> a x;• Gate read_a(x)::a x:: -> a x;

• Associations as classesWith source and target values• Instantiation of AADT Bag• For each class

put put

get

•Directly from •the

•Metamodels

Luis Pedro 13

Some steps towards transformation

• Concept Model 1 Class 1 CO-OPN Class

• Name Name• Attributes Places • Access methods: put, get, read

Method put_a(x):: a y -> a x; Gate get_a(x):: a x -> a x; Gate read_a(x)::a x:: -> a x;

put put

get

•Directly from •the

•Metamodels

Luis Pedro 14

Some steps towards transformation

• Operation Model Transform Fondue pre and post-conditions

using OCL• Operation Schemas (synchronization rules, algebraic

equations)

•No standard •approach available!

•Parse OCL and define clear •transformation rules

Luis Pedro 15

Tools, tools and another process diagram

• Create(Draw) COOPN Meta Model MagicDraw

• Export as XMI[UML] MagicDraw

• Convert XMI[UML] to XMI[MOF] Uml2mof

• MDR-StandAlone package: jmi.jar; jmiutils.jar; mdrapi.jar; mof.jar; nbmdr.jar; openide-util.jar

• UML Standard definition: UML_Standard_Profile.xml• <XMI xmi.version='1.2' timestamp='Thu Jan 20 12:03:39 CET 2005' xmlns:UML='omg.org/UML/1.4'> <XMI.header> <XMI.documentation> <XMI.exporter>MagicDraw UML</XMI.exporter> <XMI.exporterVersion>9.0</XMI.exporterVersion> </XMI.documentation> <XMI.metamodel xmi.name='UML' xmi.version='1.4'/> </XMI.header>

<?xml version = '1.0' encoding = 'ISO-8859-1' ?><XMI xmi.version = '1.2' xmlns:Model = 'org.omg.xmi.namespace.Model' timestamp = 'Fri Jan 21 01:10:11 CET 2005'> <XMI.header> <XMI.documentation> <XMI.exporter>Netbeans XMI Writer</XMI.exporter> <XMI.exporterVersion>1.0</XMI.exporterVersion> </XMI.documentation> </XMI.header>

Luis Pedro 16

Tools, tools and another process diagram

• Create Fondue Model Together + Fondue pluggin

• Use JMI to load both Fondue and COOPN meta repositories Any Java IDE (e.g. IDEA)

• Add rules to perform transformation

Luis Pedro 17

Tools, tools and another process diagram

XMI

[FondueMM]

FondueMMXML[MOF]

FondueModel

COOPNModel

XMI

[COOPNMM]

COOPNXML[MOF]

Load byMDR

Parse Using JMI

Transformationtool

Language L1Transformation

definitionLanguage L2

Luis Pedro 18

Status report

• All set of SW in place• COOPN Meta Model

UML sketches XML generation

• Fondue in Mac OS X• Sample SW to browse Fondue modules

Luis Pedro 19

Task list

• Prepare some documentation

• Continue the COOPN Meta Model

• Proof of concept: small application to browse a COOPN model using MetaModel COOPN builder module

• Formalization of transformation rules

Luis Pedro 20

The end

Questions... Comments