Language Features for Re-Use and Maintainability of MDA Transformations

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Language Features for Re-Use and Maintainability of MDA Transformations - Presentation Transcript

    1. Language Features for Re-Use and Maintainability of MDA Transformations Michael Lawley, Keith Duddy, Anna Gerber, Kerry Raymond
    2. Styles of transformation
      • Source-driven
        • Organized by source model concept
      • Target-driven
        • Organized by target model concept
      • Aspect-driven
        • Organized by conceptual relationship between source and target models, eg inheritance, containment
      • Rules may be reused in two ways:
        • Rule Extension Allows
          • Additional clauses to be added to source match
          • Additional model elements to be created in target
        • Rule Overriding Allows
          • Additional clauses to be added to match
          • Overriding the superseded rule to apply a different target expression to the original rule
    3. Indirect rule coupling
      • Tracking Classes are MOF Classes
      • their instances relate source extent elements to target extent elements and are created because of a rule match
      • may be used in the source term of a rule to “query” target model elements “created” by other rules
    4. Mappings between UML, DL, OWL and ER
    5. Example: UML and DL
      • TRANSFORMATION UML2DL(uml,dl)
      • RULE Assoc2Role (a,r)
      • FORALL UMLAssoc a
      • MAKE DLRole r
      • SET r.uniqueID = a.name;
      • RULE Attr2Role (a,r)
      • FORALL UMLAttr a
      • MAKE DLRole r
      • SET r.uniqueID = a.name
      • LINKING RoleForAttr
      • WITH attr = a, role = r;
      • RULE Class2Concept(c1,c2)
      • FORALL UMLClass c1
      • MAKE DLConcept c2
      • SET c2.uniqueID = c1.name;
      • TRANSFORMATION DL2UML(dl,uml)
      • RULE Role2Assoc(r,a)
      • FORALL DLRole r
      • MAKE UMLAssoc a
      • SET a.name = r.uniqueID;
      • RULE Concept2Class(c1,c2)
      • FORALL DLConcept c1
      • MAKE UMLCLass c2
      • SET c2.name = c1.uniqueID;
    6. Example: ER and DL
      • TRANSFORMATION ER2DL(er,dl)
      • RULE Relationship2Role(r1,r2)
      • FORALL ERRelationship r1
      • MAKE DLRole r2
      • SET r2.uniqueID = r1.name;
      • RULE Attribute2Role(a,r)
      • FORALL ERAttribute a
      • MAKE DLRole r
      • SET r.uniqueID = a.name;
      • RULE Entity2Concept(e,c)
      • FORALL EREntity e
      • MAKE DLConcept c
      • SET c.uniqueID = e.name;
      • TRANSFORMATION DL2ER(dl,er)
      • RULE Role2Relationship(r1,r2)
      • FORALL DLRole r1
      • MAKE ERRelationship r2
      • SET r2.name = r1.uniqueID;
      • RULE Concept2Entity (c,e)
      • FORALL DLConcept c
      • MAKE EREntity e
      • SET e.name = c.uniqueID;
    7. Example: UML and DL extended
      • TRANSFORMATION DLfromOWL2UML(dl,owl2dl,uml)
      • EXTENDS DL2UML(dl,uml)
      • RULE Role2Attr(r,a)
      • OVERRIDES Role2Assoc(r,a)
      • FORALL PropForRole@owl2dl pr
      • WHERE pr.role = r AND pr.prop = p
      • AND OWLDataTypeProperty p
      • MAKE UMLAttribute a FROM r
      • SET a.name = r.uniqueID;
      • LINKING RoleForAttr
      • WITH attr = a, role = r;
    8. Example: ER and DL extended
      • TRANSFORMATION DLfromUML2ER(dl,uml2dl,er)
      • EXTENDS DL2ER(dl,er)
      • RULE Role2Attribute_fromUML(r,a)
      • OVERRIDES Role2Relationship(r,rel)
      • FORALL RoleForAttr@uml2dl ra
      • WHERE ra.role = r
      • MAKE ERAttribute a FROM r
      • SET a.name = r.uniqueID;
    9. The Simple UML Model
    10. The Simple Relational Model
    11. The Mapping (Tracking) Model
    12. UML RDBMS TableForClass N: String ObjRelTX C 1 C 1 A 1 Col 1 T 1 Class Attribute ColumnFor ContainedAttr Column Table
    13. 1. A class maps on to a single table
      • Issues not considered in the description:
      • Only "persistent" UML Classes should be mapped
      • How should key columns be named? We choose the name of the Class
      • RULE Class2Table(c, t, k)
      • FORALL UMLClass c
      • WHERE c.kind = "persistent"
      • MAKE Table t, Key k
      • SET t.name = c.name, t.key = k,
      • k.name = c.name
      • LINKING TableForClass
      • WITH cls = c, tbl = t
      • LINKING KeyForClass
      • WITH cls = c, key = k;
    14. Non-extension style for Attr2Col Rule
      • RULE Attr2Column(c, a, t, col, t4c)
      • FORALL Attribute a
      • WHERE TableForClass t4c
      • LINKS cls = c, tbl = t
      • AND hasAttr(c, a, n)
      • MAKE Column col FROM colName(n)
      • SET col.name = n,
      • col.owner = t,
      • t4c.cols = col
      • LINKING ColumnForContainedAttr
      • WITH cls = c, attr = a,
      • name = n, col = col;
      • % Immediate Attributes of a Class that are
      • % primary have their corresponding Column
      • % as part of the Table's Key.
      • RULE KeyColumns(c, a, k, col)
      • WHERE ColumnForContainedAttr
      • LINKS cls = c, attr = a, col = col
      • AND a.kind = "primary" AND inhAttr(c, a)
      • SET col.belongsTo = k;
      • % Produce a Column and a ForeignKey for every
      • % Association.
      • RULE ColumnAndForeignKeyForAssoc(assoc, tbl, key)
      • FORALL Association assoc
      • WHERE TableForClass
      • LINKS class = assoc.source, table = tbl
      • AND KeyForClass
      • LINKS class = assoc.destination, key = key
      • MAKE Column col, ForeignKey fk
      • SET col.name = assoc.name, col.owner = tbl,
      • fk.owner = tbl, fk.column = col,
      • fk.refersTo = key
      • LINKING ColumnForAssociation
      • WITH assoc = assoc, col = col, fkey = fk;

    + lawleylawley, 4 years ago

    custom

    546 views, 0 favs, 0 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 546
      • 546 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 0
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories