Presentation is loading. Please wait.

Presentation is loading. Please wait.

30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces1 Graph Transformation for Model Transformation Arend Rensink University of Twente.

Similar presentations


Presentation on theme: "30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces1 Graph Transformation for Model Transformation Arend Rensink University of Twente."— Presentation transcript:

1 30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces1 Graph Transformation for Model Transformation Arend Rensink University of Twente

2 30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces2 Overview Scenario Outline of the presentation – Requirements – Principles – Example – Practice – Next step – Final words A-ModelA-B TrafoB-Model Language AA-B Trafo DefTrafo Def LanguageLanguage B

3 30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces3 Requirements: What do we need? Reasoning about models – Instances of different meta-models – Need common representation Idea: graphs as common representation – Powerful yet simple – Natural for many models – Theory of graph transformation available Some aspects not covered well – Cardinality and inheritance in meta-models – Ordered associations – Attributes

4 30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces4 Example: ASG to FG Abstract Syntax Graph model Statement next 1 0..1 AssignIfWhile bodyelsethen 0..11

5 30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces5 Example: ASG instance Program ready = false; while (! ready) { if (x < max) { x = x*x; ready = true; } else { ready = false; } } Graph Assign While If Assign next body then next else

6 30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces6 Target model: Flow Graphs Element flow 12 ProcedureStop flow Predicate nondeterministic choice

7 30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces7 Example: FG instance ASG Assign While If Assign next body then next else FG Proc Pred Proc flow Stop flow

8 30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces8 Trafo Def: set of rules start assign if-else stop if-no-elsewhile

9 30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces9 Graph formalism Graphs in this presentation: – flat (i.e., not hierarchical), untyped – directed, edge-labelled, no parallel edges – self-edges depicted as node labels Formally: G = (L,N,E) with – L set of labels – N finite set of nodes – E  N  L  N finite set of labelled edges Partial morphisms – structure-preserving node mappings

10 30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces10 forbidden Graph Productions Production rule source graph matching Concrete transformation src(t)tgt(t) morph(t) target graph pushout NAC NACs (SPO = Single Pushout Approach) LHSRHS rule morphism (partial)

11 30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces11 Example production rule Alternative single-graph representation blue = eraser: LHS, not RHS; to be matched and deleted green = creator: RHS, not LHS; to be added black = reader: LHS and RHS; to be matched and preserved red = embargo: NAC, not LHS; forbidden

12 30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces12 B-Model Lang B Application scenario Overhead: Transformation to and from graphs – Price for common representation Graph transformations inefficient – Graph matching inherently complex (NP-complete) – Domain-specific transformations superior – Graph Trafo can serve as specification A-B Trafo A-B Prod Syst Graph Production Systems A-Graph A-Type A-Model Lang A B-Graph B-Type should be reversible

13 30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces13 Graphs everywhere Other modelling domains (meta-models) – XSD/XML – ERD schemas/databases – Class/object diagrams Certain patterns emerge – Commonalities among modelling domains – Should be formulated on MOF level

14 30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces14 Practice: What is available? BOTL (München) – Bidirectional O-o Transformation Language – Transforms object models to object models FuJaBA (Paderborn, Kassel) – From UML to Java and Back Again – Generates Java code from enriched activity diagrams ATOM3 (Madrid) – A Tool for Multi-Formalism Meta-Modelling – Transforms any model at any meta-level

15 30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces15 Next step: Dynamic Semantics Current research mostly on static semantics – Models: Class diagrams, ERD schemes, XML schemas – Instances: Objects, ER databases, XML documents Dynamic semantics: how do systems behave? – Can be expressed as changes on instance level – These can also be seen as transformations – Graph transformations for operational semantics – Aim: Semantics-preserving model transformations NWO project: GRASLAND – Graphs for Software Language Definition – Aim: Generic semantic definition language

16 30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces16 TAAL Experiment [Kleppe, Rensink, Kastenberg] Example O-O language Transformations dynamic semantics ASG to FG meta- level shift GROOVE

17 30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces17 Final words MDA: Cool idea – Good intuitions – Poor mathematical backing Graph transformation: Promising approach – Good mathematical backing – Useful for formalizing principles – Questionable for practical transformations State of the art – A lot of work at the stage of (small) case studies – We need engineering discipline (Who’s going to write the XSD meta-model in MOF?)


Download ppt "30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces1 Graph Transformation for Model Transformation Arend Rensink University of Twente."

Similar presentations


Ads by Google