Compuware Corporation 1 Begin. Compuware Corporation Modeling Transformations with XMOF Wim Bast...

78
C ompuwareCorporation 1 Begin
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    221
  • download

    0

Transcript of Compuware Corporation 1 Begin. Compuware Corporation Modeling Transformations with XMOF Wim Bast...

CompuwareCorporation 1

Begin

CompuwareCorporation

Modeling Transformations with XMOFWim BastChief ArchitectSeptember 04, 2003

CompuwareCorporation 3

Agenda

What are Transformations ?

An XMOF example

–The Breakfast Order System

–Transforming Classes To Tables

–Transforming Associations to Foreign Keys

–Transforming Attributes To Columns

Conclusion

CompuwareCorporation 4

What are Transformations ?

CompuwareCorporation 5

Breakfast Classes

UML

expressed in

CWM

Breakfast Tables

expressed in

MOF

UML

expressed in

CWM

MOF

expressed in

Formal Languages and Specifications

Lang. X

Specification

A

expressed in

CompuwareCorporation 6

A Specification is a well-formed Structure with Meaning

Lang. X

well-formed according

structure

CompuwareCorporation 7

Transformations

Lang. Y

Specification

B

Lang. X

Specification

A

expressed in expressed in

Transformation C

Transformation Definition Z

defined by

CompuwareCorporation 8

Example

CWM

Breakfast Tables

UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

O/R Transform. Definition

CompuwareCorporation 9

Example

XML Schema

UML XML Schema

MOF

UML

expressed in expressed in

U.Transformation

defined by

XMI

CompuwareCorporation 10

well-formed according

Matching and Deriving Patterns

Lang. YLang. X

well-formedaccording

Transformation Definition Z

derivedpatterns

matchedpatterns

defined by

transformation

CompuwareCorporation 11

well-formedaccording

What is a Transformation ?

Lang. YLang. X

well-formedaccording

Transformation Definition Z

derivedpatterns

matchedpatterns

?defined by

CompuwareCorporation 12

well-formedaccording

well-formedaccording

A Transformation is a well-form Inter-Specification Structure

Lang. YLang. X

well-formedaccording

Transformation Definition Z

transformation

derivedpatterns

matchedpatterns

CompuwareCorporation 13

well-formedaccording

well-formedaccording

Matching and Deriving Patterns

Lang. YLang. X

well-formedaccording

Transformation Definition Z

derivedpatterns

transformation

matchedpatterns

CompuwareCorporation 14

well-formedaccording

well-formedaccording

Derivation of Patterns implies both Creation and Deletion

Lang. YLang. X

well-formedaccording

Transformation Definition Z

transformation C

CompuwareCorporation 15

well-formedaccording

well-formedaccording

Derivation of Patterns implies both Creation and Deletion

Lang. YLang. X

well-formedaccording

Transformation Definition Z

transformation C

CompuwareCorporation 16

well-formedaccording

well-formedaccording

Derivation of Patterns implies both Creation and Deletion

Lang. YLang. X

well-formedaccording

Transformation Definition Z

transformation C

CompuwareCorporation 17

well-formedaccording

well-formedaccording

Some Transformations areBi-Directional

Lang. YLang. X

well-formedaccording

Transformation Definition Z

transformation C

matchedpatterns

derivedpatterns

CompuwareCorporation 18

Lang. Y

Spec. B

expressed in

Transformations and MOF

Lang. X

Spec. A

expressed in

Transformation C

Transformation Definition Z

defined by

MOF

expressed inexpressed in

XMOF

expressed in

CompuwareCorporation 19

• A transformation is a inter-specification structure with automated matching and deriving of patterns

• Creations, deletions and changes of elements are implied by the pattern constraints in the transformation definition

• Some transformations are bi-directional• Transformations transform instances of

models defined with MOF

Transformations Conclusions

CompuwareCorporation 20

Important Requirements for a Transformation Language

• Leverages current Model languages like MOF and OCL

• Defines transformations in a structural (non imperative) fashion

• Defines Transformations in an executable way

• Does NOT defines anything about the ‘how’ and the ‘when’ of the execution process

• Is user (writer & reader) friendly

CompuwareCorporation 21

XMOF• Compuware’s and SUN’s solution to the MOF 2.0

Q/V/T RFP

• Fulfills all the requirements as mentioned in this presentation and much more

• Is based on and reuses MOF / UML-infrastructure and OCL

• Models executable transformations

• Is a lean and mean extension to class modeling

• Is implemented and working

• Is very beautiful

CompuwareCorporation 22

An XMOF Example

CompuwareCorporation 23

The Breakfast Example

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 24

UML Model of the Breakfast System

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 25

Ref: MDA Explained, Fig. 4-2]

CompuwareCorporation 26

CompuwareCorporation 27

Meta Model of Simple UML

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 28

CompuwareCorporation 29

RDBMS Model of the Breakfast System

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 30

ComestibleType_tid : NUMBER

Name : VARCHAR

BreakfastType_tid : NUMBER

Name : VARCHAR

Price : NUMBER

Part_tid : NUMBER

hasComestibleType_ComestibleType_tid : NUMBER

isPartOf_BreakfastType_tid : NUMBER

isPartOf_BreakfastOrder_tid : NUMBER

amount : NUMBER

BreakfastOrder_tid : NUMBER

hasBreakfastType_BreakfastOrder_tid : NUMBER

hasBreakfastType_BreakfastType_tid : NUMBER

address_name : VARCHAR

address_street : VARCHAR

address_number : NUMBER

amount : NUMBER

orderDate_day : NUMBER

orderDate_month : NUMBER

orderDate_year : NUMBER

deliverDate_day : NUMBER

deliverDate_month : NUMBER

deliverDate_year : NUMBER

price : NUMBER

CompuwareCorporation 31

Meta Model of Simple RDBMS

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 32

CompuwareCorporation 33

Meta Models Overview

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 34

CompuwareCorporation 35

UML To RDBMS

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 37

Transforming Classes To Tables

CompuwareCorporation 38

Classes

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 39

CompuwareCorporation 40

Tables

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 41

ComestibleType_tid : NUMBER

BreakfastType_tid : NUMBER

Part_tid : NUMBER

BreakfastOrder_tid : NUMBER

Part

BreakfastOrder BreakfastType

ComestibleType

CompuwareCorporation 42

Classes in Simple UML

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 43

CompuwareCorporation 44

Tables in Simple RDBMS

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 45

CompuwareCorporation 46

Classes To Tables

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 48

Transforming Associations To Foreign Keys

CompuwareCorporation 49

Associations

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 50

CompuwareCorporation 51

Foreign Keys

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 52

ComestibleType_tid : NUMBER

BreakfastType_tid : NUMBER

Part_tid : NUMBER

hasComestibleType_ComestibleType_tid : NUMBER

isPartOf_BreakfastType_tid : NUMBER

isPartOf_BreakfastOrder_tid : NUMBER

BreakfastOrder_tid : NUMBER

hasBreakfastType_BreakfastOrder_tid : NUMBER

hasBreakfastType_BreakfastType_tid : NUMBER

Part

BreakfastOrder

BreakfastType

ComestibleType

CompuwareCorporation 53

Associations in Simple UML

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 54

CompuwareCorporation 55

Foreign Keys in Simple RDBMS

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 56

CompuwareCorporation 57

Associations To Foreign Keys

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 59

Transforming Attributes To Columns

CompuwareCorporation 60

Attributes

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 61

CompuwareCorporation 62

Columns

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 63

ComestibleType_tid : NUMBER

Name : VARCHAR

BreakfastType_tid : NUMBER

Name : VARCHAR

Price : NUMBER

Part_tid : NUMBER

hasComestibleType_ComestibleType_tid : NUMBER

isPartOf_BreakfastType_tid : NUMBER

isPartOf_BreakfastOrder_tid : NUMBER

amount : NUMBER

BreakfastOrder_tid : NUMBER

hasBreakfastType_BreakfastOrder_tid : NUMBER

hasBreakfastType_BreakfastType_tid : NUMBER

address_name : VARCHAR

address_street : VARCHAR

address_number : NUMBER

amount : NUMBER

orderDate_day : NUMBER

orderDate_month : NUMBER

orderDate_year : NUMBER

deliverDate_day : NUMBER

deliverDate_month : NUMBER

deliverDate_year : NUMBER

price : NUMBER

CompuwareCorporation 64

Attributes in Simple UML

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 65

CompuwareCorporation 66

Columns In Simple RDBMS

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 67

CompuwareCorporation 68

Attributes To Columns

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 70

Putting it All Together

CompuwareCorporation 71

UML To RDBMS Complete

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 73

The Actual Transformation

Simple RDBMS

Breakfast Tables

Simple UML

Breakfast Classes

expressed in expressed in

B.Transformation

defined by

UML TO RDBMS

CompuwareCorporation 74

Conclusion

CompuwareCorporation 75

Modeling with XMOF

at Workis like

Drinking Champagneat Breakfast

CompuwareCorporation 76

Intelligent Incremental Transformations in Practice

OptimalJ

demo at the

Compuware

booth

CompuwareCorporation 77

Addison-Wesley

ISBN:

0-321-19442-X

CompuwareCorporation 78

End