The Problem of Model-Code Consistency and Model Driven Development

Total Page:16

File Type:pdf, Size:1020Kb

The Problem of Model-Code Consistency and Model Driven Development Masaryk University Faculty of Informatics MASTER'S THESIS Matej Jakab The problem of model-code consistency and Model Driven Development Supervisor: Ing. RNDr. Barbora B¨uhnov´a,Ph.D. Study program: Informatics Field of study: Information systems 2012 Acknowledgements: I would like to thank my supervisor Ing. RNDr. Barbora B¨uhnov´a,Ph.D., for intensive discussions and guidance for my thesis to the right direction. Special thanks go to my sister and girlfriend who supported me in various ways. I declare that I have worked on this thesis independently using only the sources listed in the bibliography. All resources, sources, and literature, which I used in preparing or I drew on them, I quote in the thesis properly with stating the full reference to the source. In Brno, Matej Jakab Abstrakt: Pr´aceje zamˇeˇren´ana udrˇzen´ıkonzistence medzi modelem a k´odem pomoc´ıMDD. Pr´aceanalyzuje existuj´ıc´ın´astroje, kter´etento probl´emˇreˇs´ı. Na kombinaci n´astroj˚udemonstruje funkˇcnost. Na z´avˇerzhrnuje nadobud- nut´evˇedomostia porovn´an´ızobrazuje v tabulk´ach. Kl´ıˇcov´aslova: Model driven development, code engineering, reverse en- gineering, transformace modelu, konzistence modelu a k´odu,IDE Abstract: The thesis is focused on maintaining the consistency between a source code and a model with the help of MDD. The thesis analyses existing tools that are capable of dealing with this issue. On the best combination of such a tools, demonstration is introduced. Finally the knowledge gained is listed and the evaluation of tools is displayed in tables. Keywords: Model driven development, code engineering, reverse engi- neering, model transformation, model code consistency, IDE Contents Introduction 6 1 Model Driven Development 9 1.1 Definition . .9 1.2 Model Transformation . 11 2 Categorisation 13 3 Platform Specific Category 17 3.1 Eclipse . 17 3.2 Visual Studio . 20 4 Platform Independent Category 24 4.1 NetBeans . 24 4.2 Altova . 28 4.3 StarUML . 31 4.4 OpenAmeos . 34 4.5 VisualParadigm . 37 4.6 EnterpriseArchitect . 41 4.7 OtimalJ . 45 4.8 Rational Rose . 46 5 Demonstration 48 6 Discussion 55 6.1 Ideal Tool . 55 6.2 Final comparison . 57 3 CONTENTS 5 Conclusion 61 Bibliography 61 Appendix 64 Introduction Motivation The model consistency problem is caused by an absence of automated func- tions within modelling tools, that maintain consistency when changes to one model are made. Even if a system is in a consistent state, the risk that after many changes implemented during the project's lifetime the consistency is violated, is real. In the case, when the source code is present at the beginning of the project, consistency may be an issue right from the start of the project. The source code may be looked at as a model on the lowest level with zero rate of abstraction. The consistency with a model constructed with one level higher abstraction rate needs to be maintained. This is the area that this thesis is focusing on. There is no need for a tool that helps representing source code. However, one for representation of the model with some rate of an abstraction is needed. The best instrument to do so is Unified Modelling Language (UML). Aim The aim of this thesis is to find methods and tools that are able to solve the problem of consistency between a source code and a model, represented as UML diagram. There are many tools available nowadays. However, their functionality, correctness and robustness needs to be analysed. A tool with full and robust functionality in this matter is not likely to be found. Never- theless, satisfactory result can be achieved by applying combination of several tools. 6 CONTENTS 7 Model consistency There are several approaches on how to solve the issue of model consistency. In the thesis of Kim Mens [11] the solution for the problem of maintaining the consistency between a software architecture and the corresponding source code using a logic programming language is introduced. Even though the algorithm is correct, it turned to be inefficient. Even more disturbing is the fact, that a full-fledged programming language is used. Therefore there is no guarantee concerning the decidability or completeness of the consistency algorithm. [18]. Another solution is offered by Tom Mens, Ragnhild Van Der Straeten, and Jocelyn Simmonds [18]. They split the consistency problem into two cases. The first one is caused by the fact, that the design may be inter- nally inconsistent or incomplete. The other one, is caused by the source code being "out of sync". Their approach to the problem is based on the use of description logic (DL). DL is an appropriate formal tool for solving consistency issue, due to the fact that DL contains five reasoning tasks that achieve the consistency. There are subsumption, instance checking, relation checking, concept consistency and knowledge base consistency [18]. The question, whether it is necessary to look for another approach solving consistency issue, may be asked. However the study [18] is dated in 2003 and the main motivation is a poor UML tools support in the given matter. Work on defining model driven development (MDD) started in 2001 and was far from complete at that time. Many new tools focusing on the MDD's approach to the project development have been launched and many new approaches have been defined. This is the main reason why we adopt this approach to achieve the goal of the thesis. Structure of the thesis In the first chapter we define MDD and all related terms. We need to identify all the connections between these definitions and code-model consistency aspects. Consistency problem is separated and tools capable of solving the problem are categorised and analysed. Demonstration of the best set of tools CONTENTS 8 on an exemplary project is build. In the last chapter, the ideal tool described. Other tools analysed within this thesis are evaluated with respect to the ideal tool. Chapter 1 Model Driven Development In this chapter, definitions of notions necessary for understanding the thesis are defined. We need to fully understand the difference between model driven development and model driven architecture, terms like model, transformation and relations between them. The following knowledge is gained from [2] and [18]. 1.1 Definition During the study of the model development, one often meets with terms mod- els, modelling and model transformation. Models serve us for the reasoning about the problem and the solution domain. Relationships between them provide us with the web of dependencies recording the process. These facts allow us to define the kind of models that must be modelled, and define pre- cise semantics of these models. As follows, we can define rules for automat- ing steps converting one model representation into another, tracing between model elements and analysing characteristics of the model that we desire. This methodology is called Model driven development (MDD) [2]. MDD is a paradigm for writing and implementing computer programs quickly, effec- tively and at minimum cost. Model driven architecture (MDA) [2] is a software design approach for development of software systems. It provides a set of guidelines for structur- ing specifications, which are expressed as models. MDA is a type of domain 9 CHAPTER 1. MODEL DRIVEN DEVELOPMENT 10 engineering, and supports model-driven engineering of software systems. It was launched by the Object Management Group (OMG) [12] in 2001. It is important to mention at the beginning, that model driven develop- ment and model driven architecture often refer to the same methodology. In the commercial sector, this methodology is more often named MDA, but MDA is only a style of MDD, that offers the possibility of defining rules for automating many of the steps needed to convert one model representation to another. MDA enhances the use of MDD by tracing throughout model elements and analysing important characteristics of the models. Since these automated steps of converting models are the main focus of this thesis, the term MDA is being used from now on, as its definition captures given theme the best. There are several terms, that need to be explained for better understand- ing of the following chapters. The central term of MDA is a model [2]. According to MDA's definition, model is a set of statements about the sys- tem that is under study. The model is in a need of abstraction for the user to better understand it. Abstraction allows the user to focus on the system aspects one wishes to, and enables model's complexity to be handled. The language is in the MDA's definition termed as a formalism [2]. Its meaning is to precisely define the syntax and semantics for the given model. There are two types of the syntax of the formalism, concrete and abstract. Concrete syntax is used for a specification of the readable representation of the abstract notational elements. There are two types of semantics as well, static, also referred to as well-formed rules, and dynamic. Representation of restrictions for valid models is ensured by static semantics. The dynamic semantics is the behaviour of a sentence as its context potentially changes. It is expected, with the dynamic semantics description of a model, a foundation for understanding and evaluating the design issues, and a valuable reference for transformations that involve this model [3]. Figure 1.1 describes the relationship between given terms. CHAPTER 1. MODEL DRIVEN DEVELOPMENT 11 Figure 1.1: Model Driven Architecture [2] 1.2 Model Transformation The main focus of this thesis lies within model transformation. Before con- tinuing any further, this term needs to be defined and explained. Lets assume that M is the model of a system S (or specification for a system set) and F is the formalism in which the model is described.
Recommended publications
  • Altova Umodel 2012 User & Reference Manual
    User and Reference Manual Altova UModel 2012 User & Reference Manual All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or mechanical, including photocopying, recording, taping, or information storage and retrieval systems - without the written permission of the publisher. Products that are referred to in this document may be either trademarks and/or registered trademarks of the respective owners. The publisher and the author make no claim to these trademarks. While every precaution has been taken in the preparation of this document, the publisher and the author assume no responsibility for errors or omissions, or for damages resulting from the use of information contained in this document or from the use of programs and source code that may accompany it. In no event shall the publisher and the author be liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this document. Published: 2012 © 2012 Altova GmbH UML®, OMG™, Object Management Group™, and Unified Modeling Language™ are either registered trademarks or trademarks of Object Management Group, Inc. in the United States and/or other countries. Table of Contents 1 UModel 3 2 Introducing UModel 6 3 What's new in UModel 8 4 UModel tutorial 14 4.1 Starting UModel................................................................................................................. 16 4.2 Use cases ................................................................................................................
    [Show full text]
  • Umodel – UML Tool for Software Modeling and Application Development
    The starting point for successful UML, SysML, and BPMN project development UModel – UML tool for software modeling and application development Altova® UModel® 2021 combines a rich visual interface with superior usability features to help level the UML learning curve, yet it also includes high-end functionality to empower users with the most compelling advantages of UML software development. get account balance get account balance get account balance Use case Sequence diagram Activity diagram Class diagram • Support for all 14 UML diagrams • Model Driven Architecture with trans- formation to and from UML, C#, C++, VB.NET, Java, databases, and XSD • SQL database modeling with SQL script generation • Support for all 9 SysML diagrams • Business process (BPMN) diagrams • Integrates with popular source control systems • Modeling of XML Schemas in UML diagrams • Source code generation in Java, C++, C#, and VB.NET languages • Reverse engineering of existing Java, C++, C#, and VB.NET code and binary files • Generation of customizable project documentation • Tight integration with Visual Studio® UModel allows you to design your application with UML models, SysML and Eclipse and business process (BPMN 1.0 and 2.0) diagrams, plus a UML-style • Synchronizes model and code through XML Schema diagram for XML data architectures in your project. round-trip engineering Generate code in C#, C++, Java, or Visual Basic. Then enhance either • Diagram layers with selective visibility the code or model, and synchronize with round-trip • Support for XMI model interchange engineering. Or, reverse-engineer an existing application for visual analysis. UModel adapts to Download your development style – you can run it inside a free trial now at www.altova.com Visual Studio, Eclipse, or as a stand-alone tool.
    [Show full text]
  • Oose-UML-Toolliste Teil 1 Von 2 (Stand: 24.05.2013) Hinweis: Die Inhalte Stammen Von Den Toolherstellern Und Sind Von Oose Nicht Auf Ihre Richtigkeit Überprüft Worden
    oose-UML-Toolliste Teil 1 von 2 (Stand: 24.05.2013) Hinweis: Die Inhalte stammen von den Toolherstellern und sind von oose nicht auf ihre Richtigkeit überprüft worden. Englischsprachige Inhalte haben wir unverändert übernommen. UML-Werkzeug Eintragung am Hersteller Hersteller-Webseite Werkzeug-Webseite Version Screenshots UML-Version Zielgruppe Anpassung Codegenerierung Generierbare Sprachen BPMN? SysML? Klassendiagramm? Komponentendiagramm? Kompositionsstrukturdiagramm? Objektdiagramm? Paketdiagramm? Profildiagramm? Aktivitätsdiagramm? Anwendungsfalldiagramm? Interaktionsübersichtsdiagramm? Kommunikationsdiagramm? Sequenzdiagramm? Timingdiagramm? Zustandsdiagramm? Codegenerierung? Reverse Engineering? Verteilungsdiagramm? Altova UModel 31.05.2012 Altova Inc. www.altova.com http://www.altova.com/umodel.html Version 2012 http://www.altova.com/umodel.html UML version 2.3, XMI X X Developers and teams who want a cost-effective UML XXXXXXXXXXXXXXXX Java, C#, Visual Basic .NET X Release 2 version 2.1 tool with high-end functionality for projects of all sizes. AnyLogic 13.11.2012 The AnyLogic Company www.anylogic.com www.anylogic.com Current www.anylogic.com/screentshots Any X X modelers, consultants, engineers, analysts, researchers, X X X X X X X X X X X X X X X The tool generates Java code based on a Java - version 6.8.1 academics, risk, logistics managers, top management model created with AnyLogic components ArgoUML 31.05.2012 Open Source Project http://argouml.tigris.org http://argouml.tigris.org 0,34 http://argouml.tigris.org 1,5 - -
    [Show full text]
  • Oose UML Tool List Part 1 of 2 (Version: 24.05.2013) Note: the Data Had Been Collected Based on Vendor Information
    oose UML tool list part 1 of 2 (Version: 24.05.2013) Note: The data had been collected based on vendor information. We just check them for basic plausibility. Some vendors don’t send us informations about their tools. They are not in the list. UML tool Entry date Vendor Vendor website Tool website Version Screenshots UML version Target audience Customization of the code generator Target languages of the code generator BPMN? SysML? Class diagram? Component diagram? Composite structure diagram? Object diagram? Package diagram? Profile diagram? Deployment diagram? Activity diagram? Use case diagram? Interaction overview diagram? Communication diagram? Sequence diagram? Timing diagramm? State machine diagram? Code generation? Reverse engineering? Altova UModel 31.05.2012 Altova Inc. www.altova.com http://www.altova.com/umodel.html Version 2012 http://www.altova.com/umodel.html UML version 2.3, XMI X X Developers and teams who want a cost-effective UML XXXXXXXXXXXXXXXX Java, C#, Visual Basic .NET X Release 2 version 2.1 tool with high-end functionality for projects of all sizes. AnyLogic 13.11.2012 The AnyLogic Company www.anylogic.com www.anylogic.com Current www.anylogic.com/screentshots Any X X modelers, consultants, engineers, analysts, researchers, X X X X X X X X X X X X X X X The tool generates Java code based on a Java - version 6.8.1 academics, risk, logistics managers, top management model created with AnyLogic components ArgoUML 31.05.2012 Open Source Project http://argouml.tigris.org http://argouml.tigris.org 0,34 http://argouml.tigris.org 1,5 - - Software developpers XX-XX-XXX-XX-XX- Java, C++, PHP4, PHP5, SQL, CSharp X Astah 31.05.2012 Change Vision, Inc.
    [Show full text]
  • Mdn 0512Dg.Pdf
    Duplicate Code Detection & Consolidation with CodeRush CodeRush helps you create and maintain source code with optimum efÄ ciency. Consume-Ä rst declaration, powerful templates, smart selection tools, intelligent code analysis, innovative navigation and an unrivalled collection of refactorings all work together to increase your productivity dramatically. Download the 30-day free trial to experience the next generation of developer productivity tools at www.DevExpress.com © 1998-2012 Developer Express Inc. ALL RIGHTS RESERVED. All trademarks or registered trademarks are property of their respective owners. Untitled-7 1 4/10/12 4:57 PM THE MICROSOFT JOURNAL FOR DEVELOPERS MAY 2012 VOL 27 NO 5 Creating Media Apps for Windows Phone COLUMNS Mark Hopkins .......................................................................... 22 CUTTING EDGE Understanding the Power Develop HTML5 Windows Phone Apps of WebSockets with Apache Cordova Dino Esposito, page 6 Colin Eberhardt ........................................................................ 28 FORECAST: CLOUDY 5 Reasons to Start Working Using HTML5 to Create Mobile Experiences with Windows Azure Brandon Satrom ....................................................................... 46 Joseph Fultz, page 14 TEST RUN What’s New for Mobile Development Dive into Neural Networks in ASP.NET MVC 4 James McCaffrey, page 72 Keith Burnell ............................................................................ 52 THE WORKING PROGRAMMER Introducing the Navigation Talk to Me, Part 3: Meet the Therapist
    [Show full text]
  • Altova Umodel 2019 User & Reference Manual
    User and Reference Manual Altova UModel 2019 User & Reference Manual All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or mechanical, including photocopying, recording, taping, or information storage and retrieval systems - without the written permission of the publisher. Products that are referred to in this document may be either trademarks and/or registered trademarks of the respective owners. The publisher and the author make no claim to these trademarks. While every precaution has been taken in the preparation of this document, the publisher and the author assume no responsibility for errors or omissions, or for damages resulting from the use of information contained in this document or from the use of programs and source code that may accompany it. In no event shall the publisher and the author be liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this document. Published: 2019 © 2019 Altova GmbH Table of Contents 1 UModel 3 2 Introducing UModel 6 2.1 Support Notes................................................................................................................. 7 3 UModel Tutorial 10 3.1 Getting Started................................................................................................................. 11 3.2 Use Cases................................................................................................................. 14 3.3 Class Diagrams................................................................................................................
    [Show full text]
  • Altova Umodel 2017 User & Reference Manual
    User and Reference Manual Altova UModel 2017 User & Reference Manual All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or mechanical, including photocopying, recording, taping, or information storage and retrieval systems - without the written permission of the publisher. Products that are referred to in this document may be either trademarks and/or registered trademarks of the respective owners. The publisher and the author make no claim to these trademarks. While every precaution has been taken in the preparation of this document, the publisher and the author assume no responsibility for errors or omissions, or for damages resulting from the use of information contained in this document or from the use of programs and source code that may accompany it. In no event shall the publisher and the author be liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this document. Published: 2017 © 2017 Altova GmbH Table of Contents 1 UModel 3 2 Introducing UModel 6 3 UModel tutorial 8 3.1 Starting .................................................................................................................UModel 10 3.2 Use cases................................................................................................................. 14 3.3 Class Diagrams................................................................................................................. 22 3.3.1 Creating..................................................................................................
    [Show full text]
  • Altova Umodel 2009 User & Reference Manual
    User and Reference Manual Altova UModel 2009 User & Reference Manual All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or mechanical, including photocopying, recording, taping, or information storage and retrieval systems - without the written permission of the publisher. Products that are referred to in this document may be either trademarks and/or registered trademarks of the respective owners. The publisher and the author make no claim to these trademarks. While every precaution has been taken in the preparation of this document, the publisher and the author assume no responsibility for errors or omissions, or for damages resulting from the use of information contained in this document or from the use of programs and source code that may accompany it. In no event shall the publisher and the author be liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this document. Published: 2009 © 2009 Altova GmbH UML®, OMG™, Object Management Group™, and Unified Modeling Language™ are either registered trademarks or trademarks of Object Management Group, Inc. in the United States and/or other countries. Table of Contents 1 UModel 3 2 Introducing UModel 6 3 What's new in UModel 2009 8 3.1 What's new in UModel................................................................................................................. 2008 Release 2 9 3.2 What's new in................................................................................................................
    [Show full text]
  • Altova Umodel 2021 Basic Edition
    Altova UModel 2021 Basic Edition User & Reference Manual Altova UModel 2021 Basic Edition User & Reference Manual All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or mechanical, including photocopying, recording, taping, or information storage and retrieval systems - without the written permission of the publisher. Products that are referred to in this document may be either trademarks and/or registered trademarks of the respective owners. The publisher and the author make no claim to these trademarks. While every precaution has been taken in the preparation of this document, the publisher and the author assume no responsibility for errors or omissions, or for damages resulting from the use of information contained in this document or from the use of programs and source code that may accompany it. In no event shall the publisher and the author be liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this document. Published: 2021 © 2015-2021 Altova GmbH Table of Contents 1 Introduction 10 1.1 Support.......................................................................................................................................................... Notes 11 2 UModel Tutorial 14 2.1 Getting.......................................................................................................................................................... Started 15 2.2 Use Cases.........................................................................................................................................................
    [Show full text]
  • Umodel – UML Tool for Software Modeling and Application Development
    The starting point for successful UML, SysML, and BPMN project development UModel – UML tool for software modeling and application development Altova® UModel® 2016 combines a rich visual interface with superior usability features to help level the UML learning curve, yet it also includes high-end functionality to empower users with the most compelling advantages of UML software development. get account balance get account balance get account balance Use case Sequence diagram Activity diagram Class diagram • Support for all 14 UML diagrams • Model Driven Architecture with transformation to and from UML, C#, VB.NET, Java, databases, and XSD • SQL database modeling with SQL script generation • Support for all 9 SysML diagrams • Business process (BPMN) diagrams • Integrates with popular source control systems • Modeling of XML Schemas in UML diagrams • Source code generation in Java, C#, and VB.NET languages • Reverse engineering of existing Java, C#, and VB.NET code and binary files • Generation of customizable project documentation • Tight integration with Visual Studio® UModel allows you to design your application with UML models, SysML and Eclipse and business process (BPMN 1.0 and 2.0) diagrams, plus a UML-style • Synchronizes model and code through XML Schema diagram for XML data architectures in your project. round-trip engineering Generate code in Java, C#, or Visual Basic. Then enhance either the • Diagram layers with selective visibility code or model, and synchronize with round-trip • Support for XMI model interchange engineering. Or, reverse-engineer an existing application for visual analysis. UModel adapts to Download your development style – you can run it inside a free trial now at Visual Studio, Eclipse, or as a stand-alone tool.
    [Show full text]
  • Umodel – UML Tool for Software Modeling and Application Development
    Send “No Suppliers Message” No Find Reservation Any Suppliers? <<include>> Pamela Passenger <<include>> Repeat for Each Supplier Flight Check In Select Seat Send RFQ Receive Quote Analyze Quote <<extend>> Find Check Luggage Time Limit Exceeded Optimal Quote UModel – UML tool for software modeling and application development Altova® UModel® 2012 combines a rich visual interface with superior usability features to help level the UML learning curve, yet it also includes high-end functionality to empower users with the most compelling advantages of UML software development. tnuoccateg ecnalab tnuoccateg ecnalab tnuoccateg ecnalab Use case Sequence diagram Activity diagram Class diagram • Support for all 14 UML diagrams • Model Driven Architecture with transformation to and from UML, C#, VB.NET, Java, databases, and XSD • SQL database modeling with SQL script generation • Support for all 9 SysML diagrams • Business process (BPMN) diagrams • Integrates with popular source control systems • Modeling of XML Schemas in UML diagrams • Source code generation in Java, C#, and VB.NET languages • Reverse engineering of existing Java, C#, and VB.NET code and binary files • Generation of customizable project documentation • Tight integration with Visual Studio® and Eclipse UModel allows you to design your application with UML models, SysML • Synchronizes model and code through and business process (BPMN 1.0 and 2.0) diagrams, plus a UML-style round-trip engineering XML Schema diagram for XML data architectures in your project. • Diagram layers with selective visibility Generate code in Java, C#, or Visual Basic. Then enhance either the • Support for XMI 2.1 model interchange code or model, and synchronize with round-trip engineering.
    [Show full text]
  • Altova Umodel 2010 User & Reference Manual
    User and Reference Manual Altova UModel 2010 User & Reference Manual All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or mechanical, including photocopying, recording, taping, or information storage and retrieval systems - without the written permission of the publisher. Products that are referred to in this document may be either trademarks and/or registered trademarks of the respective owners. The publisher and the author make no claim to these trademarks. While every precaution has been taken in the preparation of this document, the publisher and the author assume no responsibility for errors or omissions, or for damages resulting from the use of information contained in this document or from the use of programs and source code that may accompany it. In no event shall the publisher and the author be liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this document. Published: 2010 © 2010 Altova GmbH UML®, OMG™, Object Management Group™, and Unified Modeling Language™ are either registered trademarks or trademarks of Object Management Group, Inc. in the United States and/or other countries. Table of Contents 1 UModel 3 2 Introducing UModel 6 3 What's new in UModel 8 4 UModel tutorial 12 4.1 Starting UModel................................................................................................................. 14 4.2 Use cases ................................................................................................................
    [Show full text]