An Approach and Tool for Synchronous Refactoring of UML Diagrams and Models Using Model-to-Model Transformations Hafsteinn Þór Einarsson Helmut Neukirchen.

Slides:



Advertisements
Similar presentations
Diagram Definition: an Overview Third OMG/Eclipse Symposium 25 March 2012 Maged Elaasar, Senior Software Engineer.
Advertisements

Language Specification using Metamodelling Joachim Fischer Humboldt University Berlin LAB Workshop Geneva
Profiles Construction Eclipse ECESIS Project Construction of Complex UML Profiles UPM ETSI Telecomunicación Ciudad Universitaria s/n Madrid 28040,
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML, Part 4 UML 2 Metamodel.
Automated Test Design ™ © 2011 Conformiq, Inc. CONFORMIQ DESIGNER On ES v1.2.1 Stephan Schulz MBT Working Meeting/MTS#56, Göttingen.
CSI5112 Software Engineering Team: Andrei Anisenia Margi Fumtiwala.
1 Model-driven development of SOA with Web services – using QVT technology Master thesis by Berge Stillingen Department of Informatics, University of Oslo.
1 Meta Modeling Tool Transformation from COOPN to COOPN using MDA.
Barak Agiv Itamar Ben-Zaken Barak Nahum Vladislav Smolensky Academic Advisor: Yuval Elovici Professional Advisor: Mira Balaban.
Detailed Design Kenneth M. Anderson Lecture 21
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.
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
Kari R. Schougaard, PhD Stud. Værktøjer og Teknikker, 2006 UNIVERSITY OF AARHUS Department of Computer Science Unified Modeling Language Visual language.
Whole Platform Tesi di Dottorato di: RICCARDO SOLMI Università degli Studi di Bologna Facoltà di scienze matematiche, fisiche e naturali Corso di Dottorato.
OMG Meeting, Helsinki Model Driven Architecture An Alternative Implementation Approach Werner Froidevaux
IBM Software Group © 2005 IBM Corporation University of Nantes Eclipse dayMarch 2005 The Eclipse Modeling Framework and the IBM Model Transformation Framework.
Formalizing Material Flow Diagrams How can an MDE approach be used to improve the design process of material handling systems? Robert-Jan Bijl.
1 Ivano Malavolta, University of L’aquila, Computer Science Department Ivano Malavolta DUALLy: an Eclipse platform for architectural languages interoperability.
Spectra Software Defined Radio Products Applying Model Driven Design, Generative Programming, and Agile Software Techniques to the SDR Domain OOPSLA '05.
Aurora: A Conceptual Model for Web-content Adaptation to Support the Universal Accessibility of Web-based Services Anita W. Huang, Neel Sundaresan Presented.
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.
MDA and QVT  Tom Gullion, Director of Product Management, Together Products.
MDE Model Driven Engineering Xavier Blanc Université Pierre et Marie Curie
Introduction to MDA (Model Driven Architecture) CYT.
A REFACTORING TOOL FOR DESIGN PATTERNS WITH MODEL TRANSFORMATIONS Zekai Demirezen Yasemin Topaloğlu Ege University Department of Computer Engineering
Tools for Diagrammatic Specifications Stian Skjerveggen Supervisors: Yngve Lamo, Adrian Rutle, Uwe Egbert Wolter.
Agenda 1. Introduction 2. Overview of SU-MoVal 3. OCL-based Model Validation 4. QVT-based Transformations 5. Demo of SU-MoVal 6. Conclusion and Future.
Alignment of ATL and QVT © 2006 ATLAS Nantes Alignment of ATL and QVT Ivan Kurtev ATLAS group, INRIA & University of Nantes, France
Diagram Definition A Case Study with the UML Class Diagram MoDELS 2011, Wellington, NZ By Maged Elaasar 1,2 (Presenter) and Yvan Labiche.
Validated Model Transformation Tihamér Levendovszky Budapest University of Technology and Economics Department of Automation and Applied Informatics Applied.
ISO/IEC CD and WD : Core Model and Model Mapping ISO/IEC JTC1/SC32/WG September 2005, Toronto SC32/WG2 Japan (Kanrikogaku Ltd) Masaharu.
University of Southern California Center for Systems and Software Engineering Model-Based Software Engineering Supannika Koolmanojwong Spring 2013.
Selected Topics in Software Engineering - Distributed Software Development.
1 5 Nov 2002 Risto Pohjonen, Juha-Pekka Tolvanen MetaCase Consulting AUTOMATED PRODUCTION OF FAMILY MEMBERS: LESSONS LEARNED.
Dr. Darius Silingas | No Magic, Inc. Domain-Specific Profiles for Your UML Tool Building DSL Environments with MagicDraw UML.
® IBM Software Group © 2006 IBM Corporation Diagram Definition: Initial Submission Maged Elaasar, IBM ADTF, OMG June 2009, San Jose,
Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised.
ModelPedia Model Driven Engineering Graphical User Interfaces for Web 2.0 Sites Centro de Informática – CIn/UFPe ORCAS Group Eclipse GMF Fábio M. Pereira.
Sheet 1 DocEng’03, Grenoble, November 2003 Model Driven Architecture based XML Processing Ivan Kurtev, Klaas van den Berg University of Twente, the Netherlands.
Graphical Modeling Framework (GMF) Richard C. Gronback Project Lead.
© Siemens AG, CT SE 2 C O R P O R A T E T E C H N O L O G Y 1 Model-Driven Development for Pluggable Collaborations Iris Groher, Stephan Bleicher, Christa.
Formalizing Material Flow Diagrams Robert-Jan Bijl.
11 CORE Architecture Mauro Bruno, Monica Scannapieco, Carlo Vaccari, Giulia Vaste Antonino Virgillito, Diego Zardetto (Istat)
Slide 5.1 © The McGraw-Hill Companies, 2002 CASE (Computer-Aided Software Engineering) l Scope of CASE –Can support the entire life-cycle l Graphical display.
October 1st 2015 Alexis Fouché 1, Florian Noyrit 1, Sébastien Gérard 1, Maged Elaasar 2 SYSTEMATIC GENERATION OF STANDARD COMPLIANT TOOL SUPPORT OF DIAGRAMMATIC.
UML Profile BY RAEF MOUSHEIMISH. Background Model is a description of system or part of a system using well- defined language. Model is a description.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML: UML 2 Metamodel Note to Instructor: The material in this.
Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.
XASTRO vs RASDS CCSDS SAWG Meeting. CCSDS SAWG2 Presentation Outline XASTRO study analysis phase conclusions Relationship between XASTRO and UML 2 / SysML.
Model Driven Architecture MDA SE-548 Lale Doğan
Sheet 1MDAFA2004 Linköping, June 2004 A Language for Model Transformations in the MOF Architecture Ivan Kurtev, Klaas van den Berg University of Twente,
Mechanisms for Requirements Driven Component Selection and Design Automation 최경석.
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.
XASTRO vs RASDS CCSDS SAWG Meeting
Operational QVT Incremental Update
SysML 2.0 Requirements for Visualization
SysML 2.0 Formalism: Requirement Benefits, Use Cases, and Potential Language Architectures Formalism WG December 6, 2016.
SysML v2 Formalism: Requirements & Benefits
Web Application Modeling
Towards Automatic Model Synchronization from Model Transformation
Evaluating Compuware OptimalJ as an MDA tool
Constructing MDA-based Application Using Rational XDE for .NET
Defining Classes and Methods
Metadata The metadata contains
Defining Classes and Methods
QVT Operational 1.0 Mini-deck
Software Architecture & Design
Presentation transcript:

An Approach and Tool for Synchronous Refactoring of UML Diagrams and Models Using Model-to-Model Transformations Hafsteinn Þór Einarsson Helmut Neukirchen University of Iceland, Reykjavík, Iceland

Einarsson, Neukirchen: Refactoring of UML Diagrams and Models Using Model-to-Model Transformations 2 Outline 1.Motivation 2.Foundations 3.Related Work 4.Approach 5.Prototype tool 6.Discussion

Einarsson, Neukirchen: Refactoring of UML Diagrams and Models Using Model-to-Model Transformations 3 1. Motivation Model-Driven Engineering (MDE): Develop software based on high-level models instead of low-level source code.  Refactoring of models needed! Most popular modeling language: Unified Modeling Language (UML) by OMG.  Refactoring of UML needed!

Einarsson, Neukirchen: Refactoring of UML Diagrams and Models Using Model-to-Model Transformations 4 2. Foundations: UML Diagrams & Models UML := diagram + underlying model Diagram is just a partial view of the model. Model does not contain any information related to diagrams: No layout information! Abstract syntax (=metamodel) of UML model: Defined using MOF (Meta Object Facility). Concrete syntax of UML diagram: Defined using prose language and graphical examples.

Einarsson, Neukirchen: Refactoring of UML Diagrams and Models Using Model-to-Model Transformations 5 Foundations: XMI and UMLDI Standard formats for UML models and diagrams: Model: XMI (XML Metadata Interchange) Applicable to anything that has a MOF-compliant metamodel. As UML standard does not define diagrams in terms of MOF, XMI cannot be immediately used to store diagrams. Diagram: UMLDI (UML Diagram Interchange): Introduces MOF-compliant metamodel for layout information  XMI can be used as well for storing diagrams. Contains only information not contained in the model. Refer to model elements using GUID (Globally Unique Identifier).

Einarsson, Neukirchen: Refactoring of UML Diagrams and Models Using Model-to-Model Transformations 6 UMLDI of diagram (excerpt): XMI of model (excerpt): Foundations: XMI/UMLDI Example Definition of GUID Reference to another model element using GUID Name of element Definition of Action node Layout information Reference to model element using GUID

Einarsson, Neukirchen: Refactoring of UML Diagrams and Models Using Model-to-Model Transformations 7 3. Related Work A couple of commercial UML editors support simple refactorings: “Rename element”: is in fact just an operation on the model. (Due to references, diagram will refer to the changed name in the model.) A couple of academic tools support more advanced refactorings: However, only performed on the model.  Diagrams will become inconsistent.

Einarsson, Neukirchen: Refactoring of UML Diagrams and Models Using Model-to-Model Transformations 8 4. Approach Refactor model + diagram using Model to Model (M2M) transformations. We use the transformation language Query/View/Transformation (QVT). Standardised by OMG  Natural choice for transforming UML. Flavours: QVT Relations (declarative), QVT Operational (procedural). Applicable to any MOF-compliant model. Both XMI and UMLDI are MOF-compliant:  QVT can be used to transform UML model + diagram. 1 transformation for XMI + 1 transformation for UMLDI.  Consistency of model + diagram preserved when applying comparable transformations!

Einarsson, Neukirchen: Refactoring of UML Diagrams and Models Using Model-to-Model Transformations 9 5. Prototype Tool Implemented refactoring plug-in for open- source Eclipse UML editor Papyrus. Stores model in XMI, diagram in UMLDI format. Eclipse M2M project provides QVTO engine. Implements QVT Operational language. Provides black-box approach: Implement using Java functionality that is not present in QVTO.

Einarsson, Neukirchen: Refactoring of UML Diagrams and Models Using Model-to-Model Transformations 10 Architecture Java invocation library: User interface + glue code to invoke QVTO transformations. QVTO transformations: The actual refactorings. Java black-box library: Mainly needed because the Eclipse QVTO implementation does not support the full QVT standard.

Einarsson, Neukirchen: Refactoring of UML Diagrams and Models Using Model-to-Model Transformations 11 Sample Refactoring: Merge Actions Merge actions of activity diagram Before: After: Summary: The action which is on the source-end (“first action”) of the connecting edge will be merged into the target- end action (“last action”). Mechanics (to be applied on model and diagram): Move the target of all incoming edges from first action to last action. Add name of first action to name last action. Remove the control flow edge that connects first and last action. Remove first action.

Einarsson, Neukirchen: Refactoring of UML Diagrams and Models Using Model-to-Model Transformations 12 Sample Merge Actions Implementation Refactor Diagram (simplified) (1 of 2) … transformation MergeActions(inout notation : NOTATION, inout uml : UML); configuration property toMerge1 : String; configuration property toMerge2 : String; property objToMerge1 : notation::Shape = null; property objToMerge2 : notation::Shape = null; … main() { notation.objectsOfType(Shape) -> getSelectedObjects(); notation.objectsOfType(Shape) -> map merge(); … } query Shape::getSelectedObjects() : Void { if (self.hasGlobalId(toMerge1)) then { objToMerge1 := self; } endif; if (self.hasGlobalId(toMerge2)) then { objToMerge2 := self; } endif; } Not shown: call of mapping to refactor model just like diagram Type of input and output models of transformation Input parameters: strings containing GUIDs of elements selected in the editor. Global variables: hold non-string reference to elements selected in editor Query to convert string GUIDs into non-string references. (Called on every element of type Shape.) Call mapping to refactor diagram. (Called on every element of type Shape.) Find out if current shape happens to have a GUID matching an element selected in the editor: if yes, store reference in global variable.

Einarsson, Neukirchen: Refactoring of UML Diagrams and Models Using Model-to-Model Transformations 13 Sample Merge Actions Implementation Refactor Diagram (simplified) (2 of 2) mapping inout notation::Shape::merge() when { self.hasGlobalId(toMerge1) } { var firstNode : Shape = null; var lastNode : Shape = null; var connectingEdge : Edge = null; self.targetEdges->forEach(incoming) { if (incoming.source = objToMerge2) then { firstNode := objToMerge2; lastNode := objToMerge1; connectingEdge := incoming; } endif; }; … firstNode.oclAsType(Shape).targetEdges->forEach(incomingEdge) { incomingEdge.target := lastNode; }; notation.removeElement(connectingEdge); notation.removeElement(firstNode); } Not shown: mapping to refactor model just like diagram was refactored (plus: adjust name of activity node). Mapping called on every Shape, however only applicable if Shape happens to be the Activity to be merged. getSelectedObjects() did not tell us which of the two selected nodes is the first, which is the last: find out by investigating for each edges that targets us whether it comes from the other node. First step of actual refactoring mechanics: Move the target of all incoming edges in diagram from first action to last action. Further steps of actual refactoring mechanics: remove obsolete elements from diagram.

Einarsson, Neukirchen: Refactoring of UML Diagrams and Models Using Model-to-Model Transformations Discussion By considering UML diagram as model (using UMLDI), diagram can be refactored just like a UML model. QVT language useable for refactoring implementation. More and more UML tools support QVT, XMI, UMLDI. QVT refactoring implementations exchangeable between tools! QVTO advantage: procedural programmers feel familiar. QVTO disadvantage: procedural programming is awkward. But having pattern matching/iterating is already nice and the fact that transformations are done on the model level (not on data structure level) is nice. Implementation of 2 prototype refactorings is pretty short: 205 LOC of QVTO, 57 LOC of Java for the black-box library, 284 LOC of Java for user interface and glue code.

Einarsson, Neukirchen: Refactoring of UML Diagrams and Models Using Model-to-Model Transformations 15 Discussion Other M2M languages may be better suited, e.g. QVT Relations or languages specific to refactoring domain, e.g. Henshin. Transformation of two related models not based on any formal foundations with respect to consistency. Diskin and Czarnecki provide a formal algebraic framework for mapping changes applied to one model to another related model. Not considered: speed (UML models are typically small). Refactoring of QVT code itself needed!