Compuware Corporation 1 Begin
Compuware Corporation Modeling Transformations with XMOF Wim Bast Chief Architect September 04, 2003
Compuware Corporation 3 Agenda l What are Transformations ? l An XMOF example –The Breakfast Order System –Transforming Classes To Tables –Transforming Associations to Foreign Keys –Transforming Attributes To Columns l Conclusion
Compuware Corporation 4 What are Transformations ?
Compuware Corporation 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
Compuware Corporation 6 A Specification is a well-formed Structure with Meaning Lang. X well-formed according structure
Compuware Corporation 7 Transformations Lang. Y Specification B Lang. X Specification A expressed in Transformation C Transformation Definition Z defined by
Compuware Corporation 8 Example CWM Breakfast Tables UML Breakfast Classes expressed in B.Transformation defined by O/R Transform. Definition
Compuware Corporation 9 Example XML Schema UML XML Schema MOF UML expressed in U.Transformation defined by XMI
Compuware Corporation 10 well-formed according Matching and Deriving Patterns Lang. Y Lang. X well-formed according Transformation Definition Z derived patterns matched patterns defined by transformation
Compuware Corporation 11 well-formed according What is a Transformation ? Lang. Y Lang. X well-formed according Transformation Definition Z derived patterns matched patterns ? defined by
Compuware Corporation 12 well-formed according well-formed according A Transformation is a well- form Inter-Specification Structure Lang. Y Lang. X well-formed according Transformation Definition Z transformation derived patterns matched patterns
Compuware Corporation 13 well-formed according well-formed according Matching and Deriving Patterns Lang. Y Lang. X well-formed according Transformation Definition Z derived patterns transformation matched patterns
Compuware Corporation 14 well-formed according well-formed according Derivation of Patterns implies both Creation and Deletion Lang. Y Lang. X well-formed according Transformation Definition Z transformation C
Compuware Corporation 15 well-formed according well-formed according Derivation of Patterns implies both Creation and Deletion Lang. Y Lang. X well-formed according Transformation Definition Z transformation C
Compuware Corporation 16 well-formed according well-formed according Derivation of Patterns implies both Creation and Deletion Lang. Y Lang. X well-formed according Transformation Definition Z transformation C
Compuware Corporation 17 well-formed according well-formed according Some Transformations are Bi-Directional Lang. Y Lang. X well-formed according Transformation Definition Z transformation C matched patterns derived patterns
Compuware Corporation 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 in XMOF expressed in
Compuware Corporation 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
Compuware Corporation 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
Compuware Corporation 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
Compuware Corporation 22 An XMOF Example
Compuware Corporation 23 The Breakfast Example Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 24 UML Model of the Breakfast System Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 25 Ref: MDA Explained, Fig. 4-2]
Compuware Corporation 26
Compuware Corporation 27 Meta Model of Simple UML Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 28
Compuware Corporation 29 RDBMS Model of the Breakfast System Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 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
Compuware Corporation 31 Meta Model of Simple RDBMS Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 32
Compuware Corporation 33 Meta Models Overview Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 34
Compuware Corporation 35 UML To RDBMS Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 37 Transforming Classes To Tables
Compuware Corporation 38 Classes Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 39
Compuware Corporation 40 Tables Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 41 ComestibleType_tid : NUMBER BreakfastType_tid : NUMBER Part_tid : NUMBER BreakfastOrder_tid : NUMBER Part BreakfastOrder BreakfastType ComestibleType
Compuware Corporation 42 Classes in Simple UML Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 43
Compuware Corporation 44 Tables in Simple RDBMS Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 45
Compuware Corporation 46 Classes To Tables Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 48 Transforming Associations To Foreign Keys
Compuware Corporation 49 Associations Simple RDBMS Breakfast Tables Simple UML Breakfas t Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 50
Compuware Corporation 51 Foreign Keys Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 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
Compuware Corporation 53 Associations in Simple UML Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 54
Compuware Corporation 55 Foreign Keys in Simple RDBMS Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 56
Compuware Corporation 57 Associations To Foreign Keys Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 59 Transforming Attributes To Columns
Compuware Corporation 60 Attributes Simple RDBMS Breakfast Tables Simple UML Breakfas t Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 61
Compuware Corporation 62 Columns Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 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
Compuware Corporation 64 Attributes in Simple UML Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 65
Compuware Corporation 66 Columns In Simple RDBMS Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 67
Compuware Corporation 68 Attributes To Columns Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 70 Putting it All Together
Compuware Corporation 71 UML To RDBMS Complete Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 73 The Actual Transformation Simple RDBMS Breakfast Tables Simple UML Breakfast Classes expressed in B.Transformation defined by UML TO RDBMS
Compuware Corporation 74 Conclusion
Compuware Corporation 75 Modeling with XMOF at Work is like Drinking Champagne at Breakfast
Compuware Corporation 76 Intelligent Incremental Transformations in Practice OptimalJ demo at the Compuware booth
Compuware Corporation 77 Addison-Wesley ISBN: X
Compuware Corporation 78 End