1 / 13

Transformation Patterns

Transformation Patterns. Al, Jean, Jeff, Kerry, Krzysztof, William, ??. Transformation Patterns. What is a transformation pattern? common patterns I have seen structures. Examples. MOF 1.3  EMF more constructs in MOF than in EMF want bi-directional (EMF  MOF 1.3)

melanion
Download Presentation

Transformation Patterns

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Transformation Patterns Al, Jean, Jeff, Kerry, Krzysztof, William, ??

  2. Transformation Patterns • What is a transformation pattern? • common patterns I have seen • structures

  3. Examples • MOF 1.3  EMF • more constructs in MOF than in EMF • want bi-directional (EMF  MOF 1.3) • e.g. MOF constraint into EMF annotation • annotation had information on how to go back to EMF • Details • a) Normal EMF  MOF is pretty easy • b) But if the annotations have been changed, completing the round-trip is a serious problem • Only allow round-trip if it is consistent; otherwise (a)

  4. More Examples • UML to MOF • UML XMI transform to MOF XMI • example of a tool writing in ATL • UML Activity to BPEL • MOF to JMI • CGI to EJB • JavaDoc • Genealogy data

  5. More Examples… • Cross-compilation • OQL to SQL • etc • Databases • Normalizations • Logical to physical

  6. Common pattern B A C Y X Z

  7. Concrete Example:Database Logical  Physical Class Table Attribute Column

  8. Characterizing Transformationsas a whole • 7) HOT (higher order transformation) • 6) Ma  Mb (nothing) • 5) Ma  Mb Exists MMa – MMp – MMb • 4) Ma  Mb MMa “contains” MMb • 3) Ma  Mb MMa “in” MMb • 2) Ma  Mb MMa = MMb • 1) Ma  Ma (within same model)

  9. optimizations codeexpansion Vertical vs. Horizontal Transformations

  10. Kinds of Transformation • Property-Preserving • property P we have P(Ma) implies P(Mb) when Ma  Mb • Evolution • platform Ma:MMa  Ma’:MMa’ semantics-preserving: Meaning(Ma) = Meaning (Mb) • functional (change in requirements) Ma:MMa  Mb:MMa • Compilation • generally semantics-preserving • Optimization • one that is P-preserving, Q-reducing • Refactoring • changing structure, semantics preserving • Its like also optimization (Q is “-ility” or “niceness” metric)

  11. Source  Target • Cardinality • all cases • 1:1 1:M M:1 M:M • Effect at type level • Does it increase or decrease number of types • For case ?:M • Homogeneous • Heterogeneous

  12. Explosion/Contraction • State Explosion • Two states • adding intermediate states into a transition • Permutation • Elaborating all combinations of information • Version explosion • multiple models coming in that are variants of each other • Like Query languages • projection • selection • order • transitive closure

  13. Philosophical Interlude • What is different from Functional programming? • In functional programming • main structure is a tree • In Model-driven approach • main structure is a graph • moving from trees to graphs gives more power • (but text can be better than pictures for some uses) • All the meta-models are OO • Working with OO structures – graphs

More Related