Combining Generative and Graph Transformation Techniques for Model Transformation: An Effective Alliance? Shane Sendall Software Modeling & Verification.

Slides:



Advertisements
Similar presentations
Language Specification using Metamodelling Joachim Fischer Humboldt University Berlin LAB Workshop Geneva
Advertisements

Production Rule Representation Team Response Presentation to BEIDTF OMG Montreal Aug 2004 Ruleml.org.
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
1 Model-driven development of SOA with Web services – using QVT technology Master thesis by Berge Stillingen Department of Informatics, University of Oslo.
Amit, Keyur, Sabhay and Saleh Model Driven Architecture in the Enterprise.
UML CASE Tool. ABSTRACT Domain analysis enables identifying families of applications and capturing their terminology in order to assist and guide system.
Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.
HAS. Patterns The use of patterns is essentially the reuse of well established good ideas. A pattern is a named well understood good solution to a common.
1/31 CS 426 Senior Projects Chapter 1: What is UML? Chapter 2: What is UP? [Arlow and Neustadt, 2005] January 22, 2009.
Sheet 1© 2005 Lentedagen, 30 March-1 April 2005 IPA Lentedagen on Software Architecture Model Transformations in MDA Ivan Kurtev.
Whole Platform Tesi di Dottorato di: RICCARDO SOLMI Università degli Studi di Bologna Facoltà di scienze matematiche, fisiche e naturali Corso di Dottorato.
Generative Programming. Generic vs Generative Generic Programming focuses on representing families of domain concepts Generic Programming focuses on representing.
Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer & Information Sciences, University of Alabama at Birmingham.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Spectra Software Defined Radio Products Applying Model Driven Design, Generative Programming, and Agile Software Techniques to the SDR Domain OOPSLA '05.
Chapter 10 Architectural Design
MDA Guide Version CYT. 2 Outline OMG Vision and Process Introduction to MDA How is MDA Used? MDA Transformations Other MDA Capabilities Using the.
A Survey of Software Refactoring Tom Mens, Tom Tourwé
What is UML? What is UP? [Arlow and Neustadt, 2005] January 23, 2014
OOPSLA 2003 DSM Workshop Diagram Definition Facilities Based on Metamodel Mappings Edgars Celms, Audris Kalnins, Lelde Lace University of Latvia, IMCS,
An Approach and Tool for Synchronous Refactoring of UML Diagrams and Models Using Model-to-Model Transformations Hafsteinn Þór Einarsson Helmut Neukirchen.
Xactium xDSLs Run Models Not Code Tony Clark
Model Transformations
Faculty of Informatics and Information Technologies Slovak University of Technology Peter Kajsa and Ľubomír Majtás Design.
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer Mappings, Use of MOF for Language Families Joachim Fischer Workshop on.
Yu SunUniversity of Alabama at Birmingham PAR Works Jeff Gray University of Alabama Montpellier, France July 3rd, 2013 This research is supported.
MDA and QVT  Tom Gullion, Director of Product Management, Together Products.
MDE Model Driven Engineering Xavier Blanc Université Pierre et Marie Curie
Model transformation with a dedicated imperative language IRISA Rennes (France) - Triskell team Jean-Marc Jézéquel Didier Vojtisek Jean-Philippe Thibault.
Introduction to MDA (Model Driven Architecture) CYT.
Alignment of ATL and QVT © 2006 ATLAS Nantes Alignment of ATL and QVT Ivan Kurtev ATLAS group, INRIA & University of Nantes, France
What is “model transformation”? Distinction between source and target Source may be same as target May be multiple sources, or targets Reaching a fixed.
Models for Language Engineering Bruno F. Barroca.
Validated Model Transformation Tihamér Levendovszky Budapest University of Technology and Economics Department of Automation and Applied Informatics Applied.
Model-Driven Architecture And The Secure Systems Methodology Masters Thesis Defense 11/16/2007 Patrick Morrison.
Generative Programming. Automated Assembly Lines.
Model Driven Development An introduction. Overview Using Models Using Models in Software Feasibility of MDA MDA Technologies The Unified Modeling Language.
A language to describe software texture in abstract design models and implementation.
Sheet 1 DocEng’03, Grenoble, November 2003 Model Driven Architecture based XML Processing Ivan Kurtev, Klaas van den Berg University of Twente, the Netherlands.
Model transformation with a dedicated imperative language IRISA Rennes (France) - Triskell team Jean-Marc Jézéquel Didier Vojtisek Jean-Philippe Thibault.
Cooperative Computing & Communication Laboratory A Survey on Transformation Tools for Model-Based User Interface Development Robbie Schäfer – Paderborn.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
Chapter 5 System Modeling. What is System modeling? System modeling is the process of developing abstract models of a system, with each model presenting.
Class Diagrams. Terms and Concepts A class diagram is a diagram that shows a set of classes, interfaces, and collaborations and their relationships.
Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.
Model Driven Performance Analysis University College London James Skene –
Sheet 1MDAFA2004 Linköping, June 2004 A Language for Model Transformations in the MOF Architecture Ivan Kurtev, Klaas van den Berg University of Twente,
Page 1 Hitachi Ltd. – FhI FOKUS TTCN-3 User Conference, June 2005 MDA based approach for generation of TTCN-3 test specifications Hideto Ogawa, Hitachi.
Defects of UML Yang Yichuan. For the Presentation Something you know Instead of lots of new stuff. Cases Instead of Concepts. Methodology instead of the.
Design Concepts ch-8
UML Diagrams By Daniel Damaris Novarianto S..
What is UML? What is UP? [Arlow and Neustadt, 2005] October 5, 2017
SysML v2 Formalism: Requirements & Benefits
Introduction to Design Patterns
Web Application Modeling
UML Diagrams Jung Woo.
Daniel Amyot and Jun Biao Yan
Chapter 10: Process Implementation with Executable Models
Model-Driven Ontology Engineering
Towards Automatic Model Synchronization from Model Transformation
Evaluating Compuware OptimalJ as an MDA tool
Presented by Ramy Shahin
ARCH-5: From Design to Implementation in OpenEdge® using UML and MDA
Analysis models and design models
Constructing MDA-based Application Using Rational XDE for .NET
Tools for ODP – an MDA approach
PASSI (Process for Agent Societies Specification and Implementation)
Model-Driven Development
From Use Cases to Implementation
Software Architecture & Design
Presentation transcript:

Combining Generative and Graph Transformation Techniques for Model Transformation: An Effective Alliance? Shane Sendall Software Modeling & Verification Lab. Computer Science Department University of Geneva Switzerland Shane.Sendall@cui.unige.ch

Shane Sendall, CUI, University of Geneva Overview Model Transformation Overview of Gmorph Graph Transformation/Generative Programming Closing Remarks Don’t treat language features in a systematic nor thorough way Defer any discussion of GP and GT until example: I assume some familiarity 2 December 2018 Shane Sendall, CUI, University of Geneva

Model Transformation—What A model transformation applies one or more rules according to the presence of certain patterns of elements in the set of source models, resulting in a set of target models. The application of a rule results in any number of the following: the creation of a new model fragment the deletion of an existing model fragment the modification of an existing model fragment (where model fragment is any thing from a model to a model element) In the context of MDA, model transformation can be categorized as: language translation and model evolution 2 December 2018 Shane Sendall, CUI, University of Geneva

Genermorphous (Gmorph) Gmorph is a language (still under development) for specifying and executing model transformations Goal: push imperative approach toward some advantages of declarative approaches, such as, pattern matching, rule application, etc. Context: an experimental language that is not “fully featured”; it does not address all aspects that are useful for mainstream model transformation, e.g., reuse mechanisms, well-formedness checks, concurrent application of rules, etc. 2 December 2018 Shane Sendall, CUI, University of Geneva

Genermorphous (Gmorph) A hybrid approach that offers a (partially) visual transformation language, which address both model evolution and translation categories: Rule Specification language (mixture of Graph Transformation Rules and Generative Programming Principles) Rule Composition language (small imperative language: choice, sequence, iteration) Relation to QVT: results from Gmorph could be fed back into a QVT language 2 December 2018 Shane Sendall, CUI, University of Geneva

Shane Sendall, CUI, University of Geneva Graph Transformation  Graph Rewriting LHS (graph) = left-hand side of rule = pattern RHS (graph) = right-hand side of rule = pattern (Interface = intersection of LHS & RHS) Steps taken in applying a rule match, remove, glue, embed C E D A C B D RHS LHS 2 December 2018 Shane Sendall, CUI, University of Geneva

GT: relevance to Gmorph LHS and RHS Give a ‘before’ and ‘after’ view of rule application For model evolution transformations: rule is a graph rewrite 2 December 2018 Shane Sendall, CUI, University of Geneva

Generative Programming A generative programming consists of three parts: a problem space, a solution space, and the configuration knowledge. Problem space defines the appropriate domain-specific concepts and features. Solution space defines the target model elements that can be generated and all possible variations. Configuration knowledge specifies illegal feature combinations, default settings, default dependencies, construction rules, and optimization rules. 2 December 2018 Shane Sendall, CUI, University of Geneva

GP: relevance to Gmorph Ability to handle variations in source model element matching and target model generation (language translation) Parameterization and “open-world” model of matching Default and configuration information are part of specification 2 December 2018 Shane Sendall, CUI, University of Geneva

Closing Remarks and Future Directions Issues Pattern matching at instance level Optional and multiple matches Transitive closure and sequence of matches Ability to easily define mappings between instances: Current approach: 1-to-1, 1-to-many, many-to-1 by traversal of LHS Interesting alternative: an attribute grammar-like approach, which implicitly traverses LHS 2 December 2018 Shane Sendall, CUI, University of Geneva

Closing Remarks and Future Directions Issues Reversing transformations and model updating (round-tripping) => (persistent) relations Separation between rule language and rule composition language => to be fine-tuned with usage A concrete syntax that doesn’t distort the concrete syntax of source model too much (work back from metamodel instance view) 2 December 2018 Shane Sendall, CUI, University of Geneva

Shane Sendall, CUI, University of Geneva 2 December 2018 Shane Sendall, CUI, University of Geneva

Shane Sendall, CUI, University of Geneva Example using Gmorph Problem: Transform a Java package and its contained abstract classes to a UML package and UML classes that correspond to these Java classes. 2 December 2018 Shane Sendall, CUI, University of Geneva

Shane Sendall, CUI, University of Geneva LHS of Gmorph Rule Spec Metamodel: JavaNB javaP: JavaPackage /javaPackage X, 0..* /classes 0..* /JC: JavaClass /declaredBy /JF: Field /features Additional Selection Conditions: context JC ensure: self.isInterface = false and -- JC classes must not be interfaces self.modifier = ModifierKind::abstract -- JC classes must be abstract Model element instance level 2 December 2018 Shane Sendall, CUI, University of Geneva

Shane Sendall, CUI, University of Geneva RHS of Gmorph Rule Spec Metamodel: UML umlP: Package /ownedMember A, 0..* /owningPackage 0..* /UC: Class /ownedAttribute /AT: Attribute /class Model element instance level 2 December 2018 Shane Sendall, CUI, University of Geneva

Shane Sendall, CUI, University of Geneva RHS of Gmorph Rule Spec Metamodel: UML <umlP> <UC> {A, 0..*} <AT> {0..*} Model element instance level 2 December 2018 Shane Sendall, CUI, University of Geneva

LHS/RHS of Gmorph Rule Spec Metamodel: JavaNB Metamodel: UML umlP: Package javaP: JavaPackage /javaPackage /ownedMember X, 0..* A, 0..* /classes 0..* /owningPackage 0..* /JC: JavaClass /declaredBy /JF: Field /UC: Class /ownedAttribute /AT: Attribute /features /class Additional Selection Conditions: context JC ensure: self.isInterface = false and -- JC classes must not be interfaces self.modifier = ModifierKind::abstract -- JC classes must be abstract Model element instance level 2 December 2018 Shane Sendall, CUI, University of Geneva

Shane Sendall, CUI, University of Geneva Gmorph Rule Script Transform Rule: JavaNB-to-UML_PackageMapping (in javaP: JavaNB::Package, out umlP: UML::Package) Instance Mapping: javaP --> umlP; mapeach x in X onto a in A { x.JC --> a.UC; mapeach srcField in x.JC.features onto tgtAttr in a.ownedAttribute { srcField --> tgtAttr; } Type Mapping: UML::Package <-> JavaNB::Package { } UML::Class <-> JavaNB::JavaClass { LHS.name <-> RHS.simpleName | LHS.isRoot <- RHS.superClassName.size() = 0 | … 2 December 2018 Shane Sendall, CUI, University of Geneva

Gmorph Rule Script (cont’d) -- Type Mapping (cont’d) UML::Attribute <-> JavaNB::Field { LHS.name <-> RHS.name | LHS.scope <-> RHS.scope | LHS.visibility <-> RHS.visibility | false -> RHS.isVolatile | LHS.isDerived <- false | … } UML::VisibilityKind <-> JavaNB::VisibilityKind { LHS.vk_public <-> RHS.public | LHS.vk_protected <-> RHS.protected | LHS.vk_private <-> RHS.private | LHS.vk_package <-> RHS.package 2 December 2018 Shane Sendall, CUI, University of Geneva

Closing Remarks and Future Directions Advantages of Gmorph cognitive and practical advantages for concrete syntax approach (WYSIWYG) and explicit LHS and RHS (the before and after transformation view) Patterns described as object structures works well with “imperative” style traversal 2 December 2018 Shane Sendall, CUI, University of Geneva

Shane Sendall, CUI, University of Geneva Other Approaches IBM/DSTC QVT (logic language) Reversibility (due to unification) Usability, Performance? QVTP (relation-based approach) Nice expression of 1-to-1 language translation Awkward for complex model evolution trans.? Sun/Compuware QVT (logic language?) Reversibility, modularity Feasibility of using OCL to fully describe LHS/RHS? UMLX Graphical notation based on Graph Transformation Feasibility of encoding complex trans. graphically? Language translation transformations? 2 December 2018 Shane Sendall, CUI, University of Geneva

Shane Sendall, CUI, University of Geneva Matching Features Additional Features Optional matches for one or more p-elements p-element/group of p-elements are optionally matched (matching is mandatory by default) Maximum possible number of p-element matches are made Multiple matches for one or more p-elements Collection of tuples (tuple of p-elements scoped by matching container) Transitive closure matches for one or more p-elements Collection of tuples Fixpoint iteration Sequence of matches for one or more p-elements Sequence of tuples Ordered according to specified criteria 2 December 2018 Shane Sendall, CUI, University of Geneva

OMG’s Model Driven Architecture Initiative Three levels: Platform Independent Model(s) Platform Specific Model(s) Code & Deployment/Configuration Information The big issues in automation support for MDA: Consistency and synchronization between levels (vertical and horizontal) Support in construction tasks MOF 2.0 Query/View/Transformation Standardization The important point is parameterized transformations and synchronization between and within levels 2 December 2018 Shane Sendall, CUI, University of Geneva

Model Transformation—Why Categories: Model Translation inter-model mapping, synthesis, splitting, and updating Model Evolution source model is target model (same/copy) Examples in MDA: Model Synchronization, Refinement, and Forward and Reverse Engineering PIM We can determine two main categories of transformation in MDA PSM PSM 2 December 2018 Shane Sendall, CUI, University of Geneva

Model Transformation—Why Examples (cont’d) Synthesis of views E.g., bringing together the protocol view with the operation view to form the behavior model Generation of Views E.g., generating a scenario from a statemachine Application of Software Patterns and Refactoring E.g., applying the Singleton design pattern to a design model Protocol View UML State Diagram UML Sequence Diagram Behavior Model Operation View 2 December 2018 Shane Sendall, CUI, University of Geneva

Model Transformation—How Declarative approaches Logic languages Graph Rewriting languages Relation/Mapping languages Imperative, direct model manipulation approaches <your favorite mainstream language> + API to model repository of tool XML-based approaches XSLT (and co.)/XMI.difference (XMI -> XMI) Generative approaches Template/Frame languages Transformation generator languages Hybrid approaches Mix declarative and imperative styles 2 December 2018 Shane Sendall, CUI, University of Geneva

Shane Sendall, CUI, University of Geneva Graph Transformation  Graph Rewriting LHS (graph) = left-hand side of rule = pattern RHS (graph) = right-hand side of rule = pattern (Interface = intersection of LHS & RHS) Steps taken in applying a rule match, remove, glue, embed C E D A C B D RHS LHS 2 December 2018 Shane Sendall, CUI, University of Geneva

Shane Sendall, CUI, University of Geneva Graph Transformation Issues Dangling Edges Commutativity of rules Triggering Conditions Embedding rules Efficient algorithms for LHS matching Reversibility of rules (RHS  LHS) 2 December 2018 Shane Sendall, CUI, University of Geneva

Shane Sendall, CUI, University of Geneva JavaNB Metamodel 2 December 2018 Shane Sendall, CUI, University of Geneva