Model Transformation By Example 1 - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Model Transformation By Example 1

Description:

Model Transformation By Example 1. Automating Model Transformation by Example ... The authors use Aleph. http://web.comlab.ox.ac.uk/oucl/research/areas/machlearn/Aleph ... – PowerPoint PPT presentation

Number of Views:65
Avg rating:3.0/5.0
Slides: 27
Provided by: shu11
Category:

less

Transcript and Presenter's Notes

Title: Model Transformation By Example 1


1
Model Transformation By Example 1Automating
Model Transformation by Example Using Inductive
Logic Programming 2
  • Daniel Varro and Zoltan Balogh
  • Budapest Univ. of Technology and Economics
  • 1 _at_ ACM/IEEE MoDELS 2006
  • 2 _at_ ACM Symposium on Applied Computing 2007

2
Contents
  • Research Issue and Objective
  • Related Work
  • Comparison with MTBE
  • The Proposed Approach
  • Extension Inductive Logic Programming
  • Conclusion

3
Research Issue
  • Various model transformation approaches have been
    proposed
  • Transformation rule languages such as ATL, QVT,
  • All approaches defines transformation rules at
    metamodel (M2) layer
  • E.g., An UML Class is mapped into an ER Entity,
  • ? It is not easy to define transformation rules
    at M2 layer
  • Developers need to learn metamodels
  • How M1 elements are represented as instances of
    M2 elements
  • Developers need to learn a language to define
    transformation rules
  • These languages assume users knows metamodels
    very well

4
  • Transformation between UML class diagram and ER
    diagram

5
Research Objective
  • Model Transformation By-Example
  • Allows defining inter-model mappings on M1 layer
  • Developers do not need to consider the M2 layer.
    They can work at the M1 layer
  • A large part of transformation design is
    generated semi-automatically
  • An initial set of transformation rules
    (automatically generated) can be refined
    iteratively by providing additional source-target
    model pairs

6
Related Work
  • Differences from Towards Model
    TransformationGeneration By-Example (MTBE) in
    HICSS 2007
  • All elements in source and target models has
    one-to-one relationship
  • No deletion, no addition
  • Elements with a certain notation on M1 layer in a
    source model is always mapped into a
    corresponding type in a target model
  • E.g., Class in UML is always mapped into Entity
    in ER, Classs attribute in UML is mapped into
    Attibute in ER, Associations role in UML is
    mapped into Role in ER,
  • The proposed approach in this paper allows
  • Elements addition / deletion
  • Conditions on M1 layer
  • E.g., A class with no parent is mapped into XXX,
    but a class with a parent is mapped into YYY

7
Model Transformation by Example
  • Steps in the proposed approach
  • Setting up an initial mapping model
  • Define source and target models, and mappings
    between elements by hand
  • Creation of target nodes
  • Derive model transformation rules for each
    mapping
  • Context Analysis examine contexts of all source
    and target nodes
  • Generating transformation rules
  • Interconnection of target nodes
  • Derive links between target nodes based on the
    connectivity of the source and target nodes
  • Iterative refinement
  • Refining the derived transformation rules

8
Initial Mapping Model
  • Define source and target models, and mappings
  • E.g., UML class diagram and ER diagram

9
(No Transcript)
10
Context Analysis of Source Nodes
  • Elements of a certain type in a source model with
    a certain condition (precondition) are mapped
    into elements in a target model
  • The Product class is mapped while the Book class
    is unmapped to the Table
  • In order identify a precondition, the proposed
    approach examines all mappings of a certain type
    one by one and determine the 1-context of the
    source element
  • 1-context a condition to identify elements to be
    mapped
  • The approach considers the existence and
    non-existence of incoming and outgoing edges
  • Check all incoming and outgoing edges defined in
    a metamodel

11
  • Customer has an incoming src edge, an incoming
    parent edge, but no incoming dst edge, no
    incoming type edge, no outgoing attrs edge, and
    no outgoing parent edge
  • Joint 1-context The next step is to merge all
    individual 1-contexts
  • If an edge of a certain type is present in all
    individual 1-contexts, then it becomes a must
    edge in the joint 1-context
  • Forbidden edges and may edges are generated in
    the same way

12
  • Checking the 1-context for unmapped elements
  • Check all unmapped source nodes to identify a
    negative condition
  • A mapping is not applied when a corresponding
    negative condition met
  • E.g., VIPCustomer, NormalCustomer, CD and Book
    are not mapped into Entity

13
Context Analysis of Target Nodes
  • The context of target nodes aims at identifying
    the postconditions of the transformation rules
  • Unmapped nodes which contained by a target node
    are considered as a context
  • Contained relationships are defined in a
    metamodel
  • E.g., Table contains Column and FKey
  • Since CustFavourite and ProdAppendix have their
    own mapping, they are not included in a context

14
Generating Transformation Rules
  • Transformation rules are derived in the form of
    graph transformation rules
  • Consists of a left-hand side graph (LHS), a
    right-hand side graph (RHS), and a negative
    application condition graph (NAC)
  • LHS and NAC are collectively called the
    precondition (PRE)
  • Deriving a graph transformation rule from joint
    contexts
  • Joint source context ? LHS
  • Negative condition ? NAC
  • Joint target context ? RHS
  • This paper does not mention (does not
    consider?) how to map the name of nodes

15
Joint Source Context
Joint Target Context
Transformation Rule
16
Extending the mapping
  • In the previous rule, a Class that has subclasses
    but no attributes is mapped into an Entity
  • By providing a new example, a transformation rule
    can be refined

17
Interconnection of Target Nodes
  • In the previous step, each type is investigated
    separately. The next step is to investigate the
    relationship between mappings (target nodes).
  • Check all combinations of mappings
  • Two source nodes identified by different mappings
    are connected with a path of edges via unmapped
    source nodes
  • Target nodes generated by r6 and r2 should have a
    connection(s)

18
  • Find a connection between target nodes

19
  • Generate a rule for creating a cref
  • A LHS is a joint context

20
Extension Inductive Logic Programming
  • The quality of source and target contexts depends
    on the quality of source and target models
  • If mappings between source and target models
    cover many transformation patterns, generated
    transformation rule will be good (conditions
    reflect users intention well)
  • New way to analyze context is required to find
    more conditions from a relatively small model
  • Not only checking incoming/outgoing edges, but
    also considering other elements
  • E.g., consider not only relations with one-hop
    neighbors, but also multi-hop neighbors
  • ? Inductive Logic Programming (ILP)

21
Whats the ILP?
  • ILP is a subfield of machine learning
  • Given the known background knowledge and a set of
    positive/negative facts, an ILP system will
    derive hypotheses which entails all the positive
    and none of the negative facts
  • Background knowledge positive facts negative
    facts ? hypotheses

22
Background knowledge
Hypothesis
Positive Facts
Negative Facts
  • The authors use Aleph
  • http//web.comlab.ox.ac.uk/oucl/research/areas/mac
    hlearn/Aleph/
  • Accepts inputs in Prolog

23
Context Analysis
  • Background knowledge
  • from Class diagram
  • Facts
  • from mappings

24
  • ILP can identify negative conditions by means of
    constraint learning
  • Constraint learning recording new constraints
    whenever an inconsistency is found
  • E.g., Only top-level classes are transformed into
    a table

25
Connectivity Analysis
  • To analyze connectivity among target nodes,
    positive and negative facts are derived from an
    edge in the target model

26
Conclusion
  • The authors propose Model Transformation by
    Example to allow the definition of inter-model
    mappings between concrete models on the M1 layer
  • ILP helps find pre/post conditions of rules
  • No evaluation, but the authors say it works well
    and exceeds our expectations
Write a Comment
User Comments (0)
About PowerShow.com