Rendering UML Class Diagrams to Support Layout Design

Total Page:16

File Type:pdf, Size:1020Kb

Rendering UML Class Diagrams to Support Layout Design Rendering UML Class Diagrams to Support Layout Design A thesis submitted to the Kent State University Honors College in partial fulfillment of the requirements for University Honors by Paul “P.J.” Leyden December, 2019 Thesis written by Paul “P.J.” Leyden Approved by _______________________________________________________________________, Advisor _____________________________________________, Chair, Department of Computer Science Accepted by ___________________________________________________________, Dean, Honors College ii TABLE OF CONTENTS LIST OF FIGURES ........................................................................................................... iv LIST OF TABLES .............................................................................................................. v Acknowledgements ............................................................................................................ vi CHAPTER 1 Introduction................................................................................................... 1 CHAPTER 2 Related Work ................................................................................................ 4 2.1 UML .......................................................................................................................... 4 2.2 Comprehension and Layout ...................................................................................... 5 2.3 Automatically Reverse Engineering UML Class Diagrams ..................................... 7 2.4 srcUML ..................................................................................................................... 8 CHAPTER 3 srcML Infrastructure ..................................................................................... 9 3.1 srcML ........................................................................................................................ 9 3.2 SAX and srcSAX .................................................................................................... 11 3.3 srcSAXEventDispatcher ......................................................................................... 12 CHAPTER 4 The Development of srcUML ..................................................................... 13 4.1 Previous srcUML .................................................................................................... 13 4.2 Generating Graphviz ............................................................................................... 15 iii CHAPTER 5 Automatic Rendering of UML Class Diagrams ......................................... 19 5.1 Architecture............................................................................................................. 19 5.2 Implemented Output Types ..................................................................................... 20 5.3 Extending srcUML to Support User Defined Layouts ........................................... 23 5.4 Implemented Layout Algorithms ............................................................................ 24 5.5 Explanation of a Layout Algorithm ........................................................................ 29 CHAPTER 6 Conclusions and Future Work .................................................................... 35 Appendix A ....................................................................................................................... 37 Appendix B ....................................................................................................................... 39 References ......................................................................................................................... 40 iv LIST OF FIGURES Figure 1 - Diagram showing the flow of execution in order to generate a UML class diagram. .............................................................................................................................. 3 Figure 2 - Example program for demonstrating srcUML functionality. .......................... 10 Figure 3 - yUML representation of Figure 1 Modified for spacing purposes. ................. 14 Figure 4 - UML diagram generated by yUML.me ........................................................... 15 Figure 5 - DOT representation of the car manufacturer program. Modified for space purposes. ........................................................................................................................... 17 Figure 6 - Diagram generated from the DOT output. ....................................................... 18 Figure 7 - Example of overridden constructor for example DGML outputter. ................ 21 Figure 8 - Example beginning of the output function for the DGML outputter example. 22 Figure 9 - Enumeration addition example. ....................................................................... 22 Figure 10 - if-else statement addition example. ................................................................ 22 Figure 11 - switch statement addition example. ............................................................... 23 Figure 12 - Example usage of a newly added format. ...................................................... 23 Figure 13 – Sugiyama layout produced by srcUML. ........................................................ 26 Figure 14 - Example of a new algorithm implementation in the standard style. .............. 26 Figure 15 - A three clustered layout generated by srcUML. ............................................ 28 Figure 16 - svg_three_outputter's cluster determination implementation. ....................... 31 Figure 17 - svg_three_outputter formal creation of OGDF clusters. ................................ 32 Figure 18 - svg_three_outputters OGDF layout and print call. ........................................ 33 Figure 19 - Full example of the svg_three_outputter resultant UML diagram. ................ 34 v LIST OF TABLES Table 1 - Show the objects that are created and populated by the initialization functions provided by srcUML. ........................................................................................................ 30 vi Acknowledgements First, I would like to thank my thesis advisor, Professor Jonathan Maletic. He has had to put up with my antics for three long years and, despite that, he has given me many opportunities to improve and grow as both a computer scientist and a person. I would also like to thank Professor Michael Decker of Bowling Green State University for guiding me along in my research, answering my onslaught of questions, encouraging me to keep going and being a friend. I would of course like to thank those on my defense committee, Professor Mikhail Nesterenko, Professor Alexander Seed and Professor Robin Selinger, for taking the time out of their busy schedules to hear out my defense. Also, I would like to thank Drew Guarnera for always being friendly and open to whatever random questions I could think up and throw at him. I would also like to thank the Honors Thesis Advisor from the Honors College, Lori Michael, for always having time to meet when I had questions or doubts. Lastly, I would like to thank my friends and especially my family for always having my back and being there for when insanity seemed like a definite option. vii 1 CHAPTER 1 Introduction The process of creating and maintaining software systems is a difficult task and only growing more so as new Application Program Interfaces (APIs), frameworks, and technologies are released. The total pool of all technologies is growing rapidly and developers are less likely to know every piece of tech. With companies wanting to stay on the leading edge of what is new in tech, developers are expected to be capable of learning these new systems quickly. Within this context, studies [1, 2] have shown that Unified Modeling Language (UML) diagrams can be extremely useful. The Unified Modeling Language (UML) aims to provide system architects, software engineers, and software developers with a way to analyze, visualize, design, and maintain software-based systems [1]. The language standard itself is a specification on how to draw different diagrams that lend themselves to software organization and flow. One diagram in particular, the UML class diagram, is used to illustrate classes, interfaces, and their associations in a static object model [2]. In other words, it presents a simplified, yet no less informative, visual graphic, mapping out a software system. In the software development process, specifically the Agile Process, there is a stage in which the development team is supposed to update and create new design documents and diagrams. This is good for the initial build, however, over time as developers leave and new ones come in, design documents can be easily forgotten, leaving them misleading and 2 obsolete. This is why UML diagrams are used less often in the maintenance and evolution [4] of software, as keeping UML diagrams current can be a tedious task. One can manually reverse engineer the UML diagram in order to help themselves understand the code, but this as well can be tedious. In order to solve this problem, Decker et al. [3] created srcUML to automatically reverse engineer accurate UML diagrams for just such situations. srcUML currently outputs a text-based diagram in the yUML [4] format. yUML.me is a web service that takes this yUML formatted diagram and produces a visual representation. This presents three issues. First is that the layout of the diagram is dependent on yUML.me. Second is that one must use this online service
Recommended publications
  • The Hitchhiker's Guide to Graph Exchange Formats
    The Hitchhiker’s Guide to Graph Exchange Formats Prof. Matthew Roughan [email protected] http://www.maths.adelaide.edu.au/matthew.roughan/ Work with Jono Tuke UoA June 4, 2015 M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 1 / 31 Graphs Graph: G(N; E) I N = set of nodes (vertices) I E = set of edges (links) Often we have additional information, e.g., I link distance I node type I graph name M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 2 / 31 Why? To represent data where “connections” are 1st class objects in their own right I storing the data in the right format improves access, processing, ... I it’s natural, elegant, efficient, ... Many, many datasets M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 3 / 31 ISPs: Internode: layer 3 http: //www.internode.on.net/pdf/network/internode-domestic-ip-network.pdf M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 4 / 31 ISPs: Level 3 (NA) http://www.fiberco.org/images/Level3-Metro-Fiber-Map4.jpg M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 5 / 31 Telegraph submarine cables http://en.wikipedia.org/wiki/File:1901_Eastern_Telegraph_cables.png M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 6 / 31 Electricity grid M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 7 / 31 Bus network (Adelaide CBD) M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 8 / 31 French Rail http://www.alleuroperail.com/europe-map-railways.htm M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 9 / 31 Protocol relationships M.Roughan (UoA) Hitch Hikers Guide June 4, 2015 10 / 31 Food web M.Roughan (UoA) Hitch Hikers
    [Show full text]
  • A DSL for Defining Instance Templates for the ASMIG System
    A DSL for defining instance templates for the ASMIG system Andrii Kovalov Dissertation 2014 Erasmus Mundus MSc in Dependable Software Systems Department of Computer Science National University of Ireland, Maynooth Co. Kildare, Ireland A dissertation submitted in partial fulfilment of the requirements for the Erasmus Mundus MSc Dependable Software Systems Head of Department : Dr Adam Winstanley Supervisor : Dr James Power Date: June 2014 Abstract The area of our work is test data generation via automatic instantiation of software models. Model instantiation or model finding is a process of find- ing instances of software models. For example, if a model is represented as a UML class diagram, the instances of this model are UML object diagrams. Model instantiation has several applications: finding solutions to problems expressed as models, model testing and test data generation. There are sys- tems that automatically generate model instances, one of them is ASMIG (A Small Metamodel Instance Generator). This system is focused on a `problem solving' use case. The motivation of our work is to adapt ASMIG system for use as a test data generator and make the instance generation process more transparent for the user. In order to achieve this we provided a way for the user to interact with ASMIG internal data structure, the instance template graph via a specially designed graph definition domain-specific language. As a result, the user is able to configure the instance template in order to get plausible instances, which can be then used as test data. Although model finding is only suitable for obtaining test inputs, but not the expected test outputs, it can be applied effectively for smoke testing of systems that process complex hierarchic data structures such as programming language parsers.
    [Show full text]
  • GOLD 3 Un Lenguaje De Programación Imperativo Para La Manipulación De Grafos Y Otras Estructuras De Datos
    GOLD 3 Un lenguaje de programación imperativo para la manipulación de grafos y otras estructuras de datos Autor Alejandro Sotelo Arévalo UNIVERSIDAD DE LOS ANDES Asesora Silvia Takahashi Rodríguez, Ph.D. UNIVERSIDAD DE LOS ANDES TESIS DE MAESTRÍA EN INGENIERÍA DEPARTAMENTO DE INGENIERÍA DE SISTEMAS Y COMPUTACIÓN FACULTAD DE INGENIERÍA UNIVERSIDAD DE LOS ANDES BOGOTÁ D.C., COLOMBIA ENERO 27 DE 2012 > > > A las personas que más quiero en este mundo: mi madre Gladys y mi novia Alexandra. > > > Abstract Para disminuir el esfuerzo en la programación de algoritmos sobre grafos y otras estructuras de datos avanzadas es necesario contar con un lenguaje de propósito específico que se preocupe por mejorar la legibilidad de los programas y por acelerar el proceso de desarrollo. Este lenguaje debe mezclar las virtudes del pseudocódigo con las de un lenguaje de alto nivel como Java o C++ para que pueda ser fácilmente entendido por un matemático, por un científico o por un ingeniero. Además, el lenguaje debe ser fácilmente interpretado por las máquinas y debe poder competir con la expresividad de los lenguajes de propósito general. GOLD (Graph Oriented Language Domain) satisface este objetivo, siendo un lenguaje de propósito específico imperativo lo bastante cercano al lenguaje utilizado en el texto Introduction to Algorithms de Thomas Cormen et al. [1] como para ser considerado una especie de pseudocódigo y lo bastante cercano al lenguaje Java como para poder utilizar la potencia de su librería estándar y del entorno de programación Eclipse. Índice general I Preliminares 1 1 Introducción 2 1.1 Resumen ............................................... 2 1.2 Contexto...............................................
    [Show full text]
  • Preserving Command Line Workflow for a Package Management System
    To appear in IEEE Transactions on Visualization and Computer Graphics Preserving Command Line Workflow for a Package Management System using ASCII DAG Visualization Katherine E. Isaacs and Todd Gamblin Fig. 1: ASCII depiction of the package dependency graph of dia (40 nodes), as specified in the Spack package management tool. The dependency cairo and its direct neighbors have been interactively highlighted. Abstract— Package managers provide ease of access to applications by removing the time-consuming and sometimes completely prohibitive barrier of successfully building, installing, and maintaining the software for a system. A package dependency contains dependencies between all packages required to build and run the target software. Package management system developers, package maintainers, and users may consult the dependency graph when a simple listing is insufficient for their analyses. However, users working in a remote command line environment must disrupt their workflow to visualize dependency graphs in graphical programs, possibly needing to move files between devices or incur forwarding lag. Such is the case for users of Spack, an open source package management system originally developed to ease the complex builds required by supercomputing environments. To preserve the command line workflow of Spack, we develop an interactive ASCII visualization for its dependency graphs. Through interviews with Spack maintainers, we identify user goals and corresponding visual tasks for dependency graphs. We evaluate the use of our visualization through a command line-centered study, comparing it to the system’s two existing approaches. We observe that despite the limitations of the ASCII representation, our visualization is preferred by participants when approached from a command line interface workflow.
    [Show full text]
  • Survey of Graph Tools Used by Github Projects
    Supplemental Material for “Preserving Command Line Workflow for a Package Management System using ASCII DAG Visualization” Katherine E. Isaacs and Todd Gamblin Fig. 1: Dependency Graph Characteristics for Tool Blocks Tool # Nodes # Edges Layers Nodes per Layer Question Question Layers GraphViz 11 22 4 1-2-5-3 paths 1 & 3 git-like 11 22 4 1-2-5-3 paths 1 & 4 graphterm 11 22 5 1-1-2-4-3 paths 1 & 4 GraphViz 17 27 6 1-1-4-2-6-3 dependencies 5 git-like 17 26 7 1-2-4-2-1-4-3 dependencies 4 graphterm 18 26 5 1-4-6-5-2 dependencies 4 GraphViz 22 45 7 1-1-1-4-6-6-3 paths 1 & 5 git-like 22 45 7 1-1-1-4-6-6-3 paths 1 & 5 graphterm 22 45 7 1-1-1-4-6-6-3 paths 1 & 5 GraphViz 34 62 7 1-2-4-5-5-11-5-1 dependencies 8 paths 1 & 7 git-like 33 60 7 1-1-4-5-5-11-5-1 dependencies 6 paths 1 & 7 graphterm 34 61 7 1-2-4-5-5-11-5-1 dependencies 6 paths 1 & 7 1 EXPERIMENTAL OBJECTS USED IN STUDY We provide more details about the experimental objects used in the We included machine learning network visualizations but not sentence study. Fig. 1 appends information about the number of layers per structure dependencies in natural language processing or scene graph graph, the division of nodes in each layer, and the layers on which overlays in computer vision.
    [Show full text]
  • Lesson 10: Graph Visualisation and Analysis
    IS428 Visual Analytics for Business Intelligence 10/29/2015 Lesson 10: Graph Visualisation and Analysis Lesson 10 Graph Visualisation and Analysis: Methods and Applications Mentor: Dr. Kam Tin Seong Associate Professor of Information Systems (Practice) School of Information Systems, Singapore Management University Content • Motivation of graph visualisation • Graph Visualisation in Actions • Typology of network data • Graph data file formats • Graph Layout Techniques • Network visualisation and analysis process model • Network Metrics • Network visualisation and analysis tools – Gephi – NodeXL 10-1 IS428 Visual Analytics for Business Intelligence 10/29/2015 Lesson 10: Graph Visualisation and Analysis Network in real World • Physical – Transportation (i.e. road, port, rail, etc) – Utility (electricity, water, gas, network cable, etc) – Natural (river, etc) • Abstract – Social media (i.e. e-mail, Facebook, Twitter, Wikipedia, etc) – Organisation (i.e. NGO, politics, customer-company, staff-to-staff, criminal, terrorist, disease, etc) 3 Classical Graph Theory • The Seven Bridges of Königsberg is a historically notable problem in mathematics. Its negative resolution by Leonhard Euler in 1735 laid the foundations of graph theory and prefigured the idea of topology. Source: http://en.wikipedia.org/wiki/Seven_Bridges_of_K%C3%B6nigsberg 4 10-2 IS428 Visual Analytics for Business Intelligence 10/29/2015 Lesson 10: Graph Visualisation and Analysis Classical Graph Visualisation and Analysis • Using sociogram, also know as network graph Early 20th-century
    [Show full text]
  • Unravelling Graph Exchange File Formats
    1 Unravelling Graph-Exchange File Formats Matthew Roughan and Jonathan Tuke Abstract—A graph is used to represent data in which the this context is not purely about syntax. Exchange also requires relationships between the objects in the data are at least as common definitions of the meaning of the attributes. important as the objects themselves. Over the last two decades nearly a hundred file formats have been proposed or used On the other hand, file size is not a primary consideration. to provide portable access to such data. This paper seeks to Hence many exchange formats pay little attention to this and review these formats, and provide some insight to both reduce related details (e.g., read/write performance). the ongoing creation of unnecessary formats, and guide the We concentrate on exchange formats, but some of the development of new formats where needed. formats considered here were not originally developed with exchange in mind, but have become de facto exchange formats I. INTRODUCTION through use. In these cases we see reversals of objectives XCHANGE of data is a basic requirement of scientific compared to some purpose-built exchange formats. We shall E research. Accurate exchange requires portable file for- therefore consider a large range of such features for compari- mats, where portability means the ability to transfer (without son, noting as we do so that as exchange of very large datasets extraordinary efforts) the data both between computers (hard- becomes important, the requirements will change. ware and operating system), and between software (different Many of the formats presented may seem obsolete.
    [Show full text]
  • YARS-PG: Serialization for Property Graphs
    YARS-PG: Serialization for Property Graphs Dominik Tomaszuk1 Renzo Angles2,3 Łukasz Szeremeta1 Karol Litman1 Diego Cisterna3 1Institute of Informatics, 2Department of Computer Science, 3Center for Semantic Web Research, University of Bialystok, Bialystok, Poland Universidad de Talca, Curicó, Chile Santiago, Chile Abstract Our proposal Graph serialization is critical for the evolution of graph-oriented Understanding the use cases and requirements of different people systems and applications. Unfortunately, there is still no uni- will help define the needs and the priority of features. Finally, versal serialization for property graphs that will cover all main on fundamentals of this, we propose YARS-PG [5] that is platform features of graph databases systems. We propose YARS-PG prop- independent and extensible serialization. Our serialization supports erty graphs serialization which is simple, extensible, and platform all the features allowed by the current database systems based on independent. YARS-PG supports all the features allowed by the the property graph data model, and can be adapted to work with current database systems based on the property graph data model, various visualization software, database-driven systems and other and can be adapted in the future to work with various database graph-oriented tools. systems, visualization software and other graph-oriented tools. 1 <"Author01">{"Author"}["fname":"John","lname":"Smith"] 2 <"Author02">{"Author"}["fname":"Alice","lname":"Brown"] 3 <"EI01">{"Entry","InProc"}["title":"Serialization for...", Introduction "numpages":10,"keyword":"Graph database"] Data serialization is fundamental in data management as it al- 4 <"EA01">{"Entry","Article"}["title":"Property Graph...", lows to support database exchange, systems benchmarking, data "numpages":10,"keyword":["Query", "Graph"]] visualization and presentation.
    [Show full text]
  • Lesson 10 Visualising and Analysing Network Data
    ISSS608 Visual Analytics and Applications 11/18/2015 Lesson 10: Visualising and Analysing Network Data Lesson 10 Visualising and Analysing Network Data Mentor: Dr. Kam Tin Seong Associate Professor of Information Systems (Practice) School of Information Systems, Singapore Management University Content • Introduction to Graph Visual Analytics • Graph Visualisation in Actions • Basic Principles of Graph – Network data sets – Graph data format • Network Visualisation and Analysis – Network visualisation and analysis process model – Graph layouts and visual attributes – Network metrics • Network visualisation and analysis tools – NodeXL – Gephi 2 10-1 ISSS608 Visual Analytics and Applications 11/18/2015 Lesson 10: Visualising and Analysing Network Data Network in real World • Physical – Transportation (i.e. road, port, rail, etc) – Utility (electricity, water, gas, network cable, etc) – Natural (river, etc) • Abstract – Social media (i.e. e-mail, Facebook, Twitter, Wikipedia, etc) – Organisation (i.e. NGO, politics, customer-company, staff-to-staff, criminal, terrorist, disease, etc) 3 Classical Graph Theory • The Seven Bridges of Königsberg is a historically notable problem in mathematics. Its negative resolution by Leonhard Euler in 1735 laid the foundations of graph theory and prefigured the idea of topology. Source: http://en.wikipedia.org/wiki/Seven_Bridges_of_K%C3%B6nigsberg 4 10-2 ISSS608 Visual Analytics and Applications 11/18/2015 Lesson 10: Visualising and Analysing Network Data Classical Graph Visualisation and Analysis • Using
    [Show full text]
  • Veritas Information Map User Guide
    Veritas Information Map User Guide November 2017 Veritas Information Map User Guide Last updated: 2017-11-21 Legal Notice Copyright © 2017 Veritas Technologies LLC. All rights reserved. Veritas and the Veritas Logo are trademarks or registered trademarks of Veritas Technologies LLC or its affiliates in the U.S. and other countries. Other names may be trademarks of their respective owners. This product may contain third party software for which Veritas is required to provide attribution to the third party (“Third Party Programs”). Some of the Third Party Programs are available under open source or free software licenses. The License Agreement accompanying the Software does not alter any rights or obligations you may have under those open source or free software licenses. Refer to the third party legal notices document accompanying this Veritas product or available at: https://www.veritas.com/about/legal/license-agreements The product described in this document is distributed under licenses restricting its use, copying, distribution, and decompilation/reverse engineering. No part of this document may be reproduced in any form by any means without prior written authorization of Veritas Technologies LLC and its licensors, if any. THE DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. VERITAS TECHNOLOGIES LLC SHALL NOT BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH THE FURNISHING, PERFORMANCE, OR USE OF THIS DOCUMENTATION. THE INFORMATION CONTAINED IN THIS DOCUMENTATION IS SUBJECT TO CHANGE WITHOUT NOTICE.
    [Show full text]
  • Visualization of Gene Ontology and Cluster Analysis Results
    Degree project Visualization of Gene Ontology and Cluster Analysis Results Author: Vladyslav Aleksakhin Date: 2012-08-20 Subject: Computer Science Level: Master Course code: 5DV00E Abstract The purpose of the thesis is to develop a new visualization method for Gene On- tologies and hierarchical clustering. These are both important tools in biology and medicine to study high-throughput data such as transcriptomics and metabolomics data. Enrichment of ontology terms in the data is used to identify statistically over- represented ontology terms, that give insight into relevant biological processes or functional modules. Hierarchical clustering is a standard method to analyze and visualize data to find relatively homogeneous clusters of experimental data points. Both methods support the analysis of the same data set, but are usually considered independently. However, often a combined view such as: visualizing a large data set in the context of an ontology under consideration of a clustering of the data. The result of the current work is a user-friendly program that combines two different views for analysing Gene Ontology and Cluster simultaneously. To make explorations of such a big data possible we developed new visualization approach. Keywords Graph Visualization, Gene Ontology, Hierarchical Clustering, Mappings, Interaction Technique, GML, JUNG. ii Acknowledgments I would like to express my gratitude to my supervisor Dr. Andreas Kerren and to my co-supervisor Ilir Jusufi. They encouraged and stimulated me in each step of this work. Moreover, my greatest gratitude goes to my father Oleksandr and my family that made my study possible, for their constant moral support even though thousands of kilometers separated us.
    [Show full text]