Graphviz How to Create Diagrams from Text

Total Page:16

File Type:pdf, Size:1020Kb

Graphviz How to Create Diagrams from Text PlantUML and Graphviz How to Create Diagrams from Text Dmitrii Pisarenko, Denis Savenko, 2021-01-15 Agenda 1. Basic Diagrams using Graphviz 2. PlantUML for Java Developers 3. PlantUML for Database Developers Benefit of using PlantUML/GraphViz Why not just use LibreOffice Draw? • You can concentrate on the content • Leave the less important aspects to the machine • Layout • You can easily create code that generates diagrams • Just create a text file • Example: Doxygen uses GraphViz to create class diagrams • https://www.doxygen.nl/index.html Basic Diagrams using Graphviz GraphViz • https://graphviz.org • Open Source Project • Developed by AT&T around 1991 • dot: Tool for drawing directed graphs • Generates images from text GraphViz Basics GraphViz Basics GraphViz Dot Language • Documentation • Introduction: https://graphviz.org/doc/info/lang.html • Reference: https://graphviz.org/doc/info/attrs.html • Minimal GraphViz Dot file GraphViz Basics Dot command line interface • Most frequently used syntax: • dot -T<format> <inputFile> -o <outputFile> • Example • dot -Tpng src/graphviz.dot -o target/graphviz.png Demo Styling Nodes Styling Nodes • Syntax • <nodeId> [<key1>=<value1>, <key2>=<value2>, ...] • Example • A [label="Foo"] • Full list of attributes available https://graphviz.org/doc/info/attrs.html • Supported shapes: https://www.graphviz.org/doc/info/shapes.html Demo Styling Edges Styling Edges • Syntax • <Source Node ID> -> <Target Node ID> [<key1>=<value1>, <key2>=<value2>, ...] • Example • N1 -> N3 [label="Supports", style=filled, color=green] Demo Subgraphs Subgraphs • Subgraphs allows to place nodes close to each other Demo PlantUML for Java Developers PlantUML • https://plantuml.com Demo: Sequence Diagram pu-seq.plantuml Demo: Class Diagram pu-class.plantuml Demo: Activity Diagram pu-act.plantuml Wireframe Diagram • Alternative to • Evolus Pencil (free): https://pencil.evolus.vn • Balsamiq (pleasant): https://balsamiq.com • Mockup as a code Demo: Wireframe pu-wf.plantuml PlantUML for Database Developers Demo: Entity-Relationship Diagram pu-er.plantuml Thank you for your attention.
Recommended publications
  • Unifying Modeling and Programming with ALF
    SOFTENG 2016 : The Second International Conference on Advances and Trends in Software Engineering Unifying Modeling and Programming with ALF Thomas Buchmann and Alexander Rimer University of Bayreuth Chair of Applied Computer Science I Bayreuth, Germany email: fthomas.buchmann, [email protected] Abstract—Model-driven software engineering has become more The Eclipse Modeling Framework (EMF) [5] has been and more popular during the last decade. While modeling the established as an extensible platform for the development of static structure of a software system is almost state-of-the art MDSE applications. It is based on the Ecore meta-model, nowadays, programming is still required to supply behavior, i.e., which is compatible with the Object Management Group method bodies. Unified Modeling Language (UML) class dia- (OMG) Meta Object Facility (MOF) specification [6]. Ideally, grams constitute the standard in structural modeling. Behavioral software engineers operate only on the level of models such modeling, on the other hand, may be achieved graphically with a set of UML diagrams or with textual languages. Unfortunately, that there is no need to inspect or edit the actual source code, not all UML diagrams come with a precisely defined execution which is generated from the models automatically. However, semantics and thus, code generation is hindered. In this paper, an practical experiences have shown that language-specific adap- implementation of the Action Language for Foundational UML tations to the generated source code are frequently necessary. (Alf) standard is presented, which allows for textual modeling In EMF, for instance, only structure is modeled by means of of software systems.
    [Show full text]
  • Plantuml Language Reference Guide (Version 1.2021.2)
    Drawing UML with PlantUML PlantUML Language Reference Guide (Version 1.2021.2) PlantUML is a component that allows to quickly write : • Sequence diagram • Usecase diagram • Class diagram • Object diagram • Activity diagram • Component diagram • Deployment diagram • State diagram • Timing diagram The following non-UML diagrams are also supported: • JSON Data • YAML Data • Network diagram (nwdiag) • Wireframe graphical interface • Archimate diagram • Specification and Description Language (SDL) • Ditaa diagram • Gantt diagram • MindMap diagram • Work Breakdown Structure diagram • Mathematic with AsciiMath or JLaTeXMath notation • Entity Relationship diagram Diagrams are defined using a simple and intuitive language. 1 SEQUENCE DIAGRAM 1 Sequence Diagram 1.1 Basic examples The sequence -> is used to draw a message between two participants. Participants do not have to be explicitly declared. To have a dotted arrow, you use --> It is also possible to use <- and <--. That does not change the drawing, but may improve readability. Note that this is only true for sequence diagrams, rules are different for the other diagrams. @startuml Alice -> Bob: Authentication Request Bob --> Alice: Authentication Response Alice -> Bob: Another authentication Request Alice <-- Bob: Another authentication Response @enduml 1.2 Declaring participant If the keyword participant is used to declare a participant, more control on that participant is possible. The order of declaration will be the (default) order of display. Using these other keywords to declare participants
    [Show full text]
  • 7 Best Free Flowchart Tools for Windows
    2018. 6. 1. Pocket: 7 Best Free Flowchart Tools for Windows 7 Best Free Flowchart Tools for Windows By Joel Lee, www.makeuseof.com 6월 20일, 2017 Flowcharts aren’t just for engineers, programmers, and managers. Everyone can benet from learning how to make owcharts, most notably as a way to streamline your work and life, but even to break free from bad habits. The only problem is, what’s the best way to make a owchart? Plenty of top-notch owcharting apps exist, but they can get pricey. Microsoft Visio, the most popular option, is $300 (standalone) or $13 per month (on top of Oce 365). ConceptDraw Pro is $200. Edraw Max is $180. MyDraw is $70. Is it really necessary to spend so much on a owcharting tool? No! There are plenty of free options that are more than good enough, especially for non-business uses. You can either learn to create stunning owcharts in Microsoft Word How to Create Stunning Flowcharts With Microsoft Word How to Create Stunning Flowcharts With Microsoft Word Used with imagination, owcharts can simplify both your work or life. Why not try out a few owcharts with one of the easiest tools on hand – Microsoft Word. Read More if you already have it or use one of the following free Windows apps. Web-based apps have been intentionally excluded. 1. Dia Dia is a free and full-featured owchart app. It’s also entirely open source under the GPLv2 license, which is great if you adhere to open source philosophy. It’s powerful, extensible, and easy to use.
    [Show full text]
  • Thesis Artificial Intelligence Method Call Argument Completion Using
    Method Call Argument Completion using Deep Neural Regression Terry van Walen [email protected] August 24, 2018, 40 pages Academic supervisors: dr. C.U. Grelck & dr. M.W. van Someren Host organisation: Info Support B.V., http://infosupport.com Host supervisor: W. Meints Universiteit van Amsterdam Faculteit der Natuurwetenschappen, Wiskunde en Informatica Master Software Engineering http://www.software-engineering-amsterdam.nl Abstract Code completion is extensively used in IDE's. While there has been extensive research into the field of code completion, we identify an unexplored gap. In this thesis we investigate the automatic rec- ommendation of a basic variable to an argument of a method call. We define the set of candidates to recommend as all visible type-compatible variables. To determine which candidate should be recom- mended, we first investigate how code prior to a method call argument can influence a completion. We then identify 45 code features and train a deep neural network to determine how these code features influence the candidate`s likelihood of being the correct argument. After sorting the candidates based on this likelihood value, we recommend the most likely candidate. We compare our approach to the state-of-the-art, a rule-based algorithm implemented in the Parc tool created by Asaduzzaman et al. [ARMS15]. The comparison shows that we outperform Parc, in the percentage of correct recommendations, in 88.7% of tested open source projects. On average our approach recommends 84.9% of arguments correctly while Parc recommends 81.3% correctly. i ii Contents Abstract i 1 Introduction 1 1.1 Previous work........................................
    [Show full text]
  • Prodeling with the Action Language for Foundational UML
    Prodeling with the Action Language for Foundational UML Thomas Buchmann Chair of Applied Computer Science I, University of Bayreuth, Universitatsstrasse¨ 30, 95440 Bayreuth, Germany Keywords: UML, Java, Model-driven Development, Behavioral Modeling, Code Generation. Abstract: Model-driven software development (MDSD) – a software engineering discipline, which gained more and more attention during the last few years – aims at increasing the level of abstraction when developing a soft- ware system. The current state of the art in MDSD allows software engineers to capture the static structure in a model, e.g., by using class diagrams provided by the Unified Modeling Language (UML), and to generate source code from it. However, when it comes to expressing the behavior, i.e., method bodies, the UML offers a set of diagrams, which may be used for this purpose. Unfortunately, not all UML diagrams come with a precisely defined execution semantics and thus, code generation is hindered. Recently, the OMG issued the standard for an Action Language for Foundational UML (Alf), which allows for textual modeling of software system and which provides a precise execution semantics. In this paper, an integrator between an UML-based CASE tool and a tool for Alf is presented, which empowers the modeler to work on the desired level of ab- straction. The static structure may be specified graphically with the help of package or class diagrams, and the behavior may be added using the textual syntax of Alf. This helps to blur the boundaries between modeling and programming. Executable Java code may be generated from the resulting Alf specification. 1 INTRODUCTION days need to manually supply method bodies in the code generated from structural models.
    [Show full text]
  • The Treasure Chest Tikz Package for Single-Color Pixel-Art Pictures
    88 TUGboat, Volume 39 (2018), No. 1 pixelart in graphics The Treasure Chest TikZ package for single-color pixel-art pictures. pst-antiprism in graphics/pstricks/contrib An antiprism in PSTricks. * pst-calculate in graphics/pstricks/contrib This is a selection of the new packages posted to Floating point support in LATEX, using expl3. CTAN (ctan.org) from October 2017{April 2018, pst-dart in graphics/pstricks/contrib with descriptions based on the announcements and Dart boards with PSTricks. edited for extreme brevity. structmech in graphics/pgf/contrib Entries are listed alphabetically within CTAN TikZ support for structural mechanics drawings. directories. More information about any package tikz-feynhand in graphics/pgf/contrib Feynman diagrams with TikZ. can be found at ctan.org/pkg/pkgname. A few tikz-karnaugh in graphics/pgf/contrib entries which the editors subjectively believe to be PGF package for Karnaugh maps supporting of especially wide interest or otherwise notable are many variables. starred (*); of course, this is not intended to slight tikz-ladder in graphics/pgf/contrib the other contributions. Ladder diagrams for the PLC LD language. We hope this column and its companions will tikz-layers in graphics/pgf/contrib help to make CTAN a more accessible resource to the Provide more graphics layers for TikZ. TEX community. See also ctan.org/topic. Com- tikz-relay in graphics/pgf/contrib ments are welcome, as always. Electrical diagrams with TikZ. tikz-sfc in graphics/pgf/contrib Symbol collection for PLC programming sequential Karl Berry function chart (SFC) diagrams in TikZ. tugboat (at) tug dot org biblio info gbt7714 in biblio/bibtex/contrib guide-latex-fr in info A Support for the Chinese bibliography standard Introduction to LTEX written in French.
    [Show full text]
  • Fakulta Informatiky UML Modeling Tools for Blind People Bakalářská
    Masarykova univerzita Fakulta informatiky UML modeling tools for blind people Bakalářská práce Lukáš Tyrychtr 2017 MASARYKOVA UNIVERZITA Fakulta informatiky ZADÁNÍ BAKALÁŘSKÉ PRÁCE Student: Lukáš Tyrychtr Program: Aplikovaná informatika Obor: Aplikovaná informatika Specializace: Bez specializace Garant oboru: prof. RNDr. Jiří Barnat, Ph.D. Vedoucí práce: Mgr. Dalibor Toth Katedra: Katedra počítačových systémů a komunikací Název práce: Nástroje pro UML modelování pro nevidomé Název práce anglicky: UML modeling tools for blind people Zadání: The thesis will focus on software engineering modeling tools for blind people, mainly at com•monly used models -UML and ERD (Plant UML, bachelor thesis of Bc. Mikulášek -Models of Structured Analysis for Blind Persons -2009). Student will evaluate identified tools and he will also try to contact another similar centers which cooperate in this domain (e.g. Karlsruhe Institute of Technology, Tsukuba University of Technology). The thesis will also contain Plant UML tool outputs evaluation in three categories -students of Software engineering at Faculty of Informatics, MU, Brno; lecturers of the same course; person without UML knowledge (e.g. customer) The thesis will contain short summary (2 standardized pages) of results in English (in case it will not be written in English). Literatura: ARLOW, Jim a Ila NEUSTADT. UML a unifikovaný proces vývoje aplikací : průvodce ana­lýzou a návrhem objektově orientovaného softwaru. Brno: Computer Press, 2003. xiii, 387. ISBN 807226947X. FOWLER, Martin a Kendall SCOTT. UML distilled : a brief guide to the standard object mode•ling language. 2nd ed. Boston: Addison-Wesley, 2000. xix, 186 s. ISBN 0-201-65783-X. Zadání bylo schváleno prostřednictvím IS MU. Prohlašuji, že tato práce je mým původním autorským dílem, které jsem vypracoval(a) samostatně.
    [Show full text]
  • Sketching Process Models by Mining Participant Stories
    Sketching Process Models by Mining Participant Stories Ana Ivanchikj and Cesare Pautasso Software Institute, USI, Lugano, Switzerland [email protected] Abstract. Producing initial process models currently requires gather- ing knowledge from multiple process participants and using modeling tools to produce a visual representation. With traditional tools this can require significant effort and thus delay the feedback cycle where the initial model is validated and refined based on participants' feedback. In this paper we propose a novel approach for process model sketching by applying existing process mining techniques to a sample process log obtained directly from the process participants. To that end, we spec- ify a simple natural language-like domain-specific language to represent process traces or fragments of process traces. We also illustrate the ar- chitecture of a live modeling tool, the Sketch Miner, implementing the proposed approach. The tool produces a draft visual representation of the control flow which is updated in real-time as the traces are written down. The draft model generated by the tool can later be refined and completed by the business analysts using traditional tools. Keywords: Draft Process Model · Process Mining · Process Require- ments · Textual Modelling DSL 1 Introduction One of the identified challenges of business process management in a recent sur- vey is the involvement of people with different skills and background [1], such as process participants with business domain knowledge, the business analysts with process modelling knowledge, and the software engineers with IT background. In the requirements gathering phase for the implementation of a new process in Process Aware Information Systems (PAIS), or when trying to model/improve existing processes, the people with detailed knowledge about the AS-IS or TO- BE business process are the participants in the process.
    [Show full text]
  • Plantuml-Mode - UML Drawings�
    ⬉ Topic Index PlantUML-Mode - UML Drawings� Description Keystroke Function Note PlantUML - Mode � The plantuml-mode external package allows you to render PlantUML markup to create UML drawing image or ASCII-art text. See also the The Hitchhiker’s Guide to PlantUML. � The flycheck-plantuml external package integrates plantuml-mode with flycheck to automatically check the syntax of the plantuml files on the fly. � PEL activates the plantuml-mode package when the pel-use-plantuml is non-nil. You can set it to t or to server. When set to t it forces the use of a local platuml.jar program to render the markup. When set to server it sends the plantuml markup to the PlantUML server to render it. These values are set in the plantuml-default-exec-mode user option. � PEL activates the flycheck-plantuml package when the pel-use-flycheck-plantuml user option is set to t. � The plantuml-mode package can also be customized via the plantuml customization group: use <F11> <f1> G plantuml ⌨ PEL provides 2 different key prefixes: • pel:plantuml, mapped to <f11> D u, for global commands that be be issued from any major mode, • pel:for-plantuml, mapped to <f12> once the buffer major mode is plantuml-mode. To put a buffer in plantuml-mode use <f11> D u u. ⚠ Text rendering of PlantUML diagrams is limited to 4096 bytes of text. Attempting to render a larger description in ‘txt’ (text) mode fail. Rendering of diagrams larger than 4096 bytes of text works in graphics mode. Tested on macOS with Graphviz Dot 2.44.0 and PlantUML 1.2020.15.
    [Show full text]
  • ARENA: Asserting the Quality of Modeling Languages Information
    ARENA: Asserting the Quality of Modeling Languages Francisco de Freitas Vilar Morais Thesis to obtain the Master of Science Degree in Information Systems and Computer Engineering Supervisor: Prof. Alberto Manuel Rodrigues da Silva Examination Committee Chairperson: Prof. José Luís Brinquete Borbinha Supervisor: Prof. Alberto Manuel Rodrigues da Silva Member of the committee: Prof. André Ferreira Ferrão Couto e Vasconcelos July 2015 placeholder Em memória da minha avó Maria Amélia de Freitas Vilar e restantes familiares, pela força, exemplo e amor incondicional que sempre me deram. iii placeholder Acknowledgments I would like to thank my advisor, Prof. Alberto Silva, that supported and counselled me in ev- ery possible way. Without his knowledge on User-Interface and Business Process Modeling Languages, academic experience, commitment and perseverance, I couldn’t have structured, focused and developed this work. I must also thank my co-advisor, Mr. Andreas Schoknecht, for all the academic materials, drive and motivation that he has given me throughout this work while I was in Germany on the ERAS- MUS programme, as well as Prof. Jan Dietz, which contribution in ICEIS 2015 enlightened me to understand DEMO and its competing languages. This work was partially supported by the ARENA 2012 IBM Country Project, and by national funds through Fundação para a Ciência e a Tecnologia (FCT) with references UID/CEC/50021/2013 and EXCL/EEI- ESS/0257/2012 (DataStorm). I would also like to thank to my parents Maria José and António Manuel and my friends, for supporting me, giving me the strength to carry on and to remind me that hard work pays off.
    [Show full text]
  • Efficient Generation of Graphical Model Views Via Lazy Model-To-Text Transformation
    This is a repository copy of Efficient Generation of Graphical Model Views via Lazy Model- to-Text Transformation. White Rose Research Online URL for this paper: https://eprints.whiterose.ac.uk/164209/ Version: Accepted Version Proceedings Paper: Kolovos, Dimitris orcid.org/0000-0002-1724-6563, De La Vega, Alfonso and Cooper, Justin (Accepted: 2020) Efficient Generation of Graphical Model Views via Lazy Model-to-Text Transformation. In: ACM/IEEE 23rd International Conference on Model Driven Engineering Languages and Systems (MODELS ’20). (In Press) Reuse Items deposited in White Rose Research Online are protected by copyright, with all rights reserved unless indicated otherwise. They may be downloaded and/or printed for private study, or other acts as permitted by national copyright laws. The publisher or other rights holders may allow further reproduction and re-use of the full text version. This is indicated by the licence information on the White Rose Research Online record for the item. Takedown If you consider content in White Rose Research Online to be in breach of UK law, please notify us by emailing [email protected] including the URL of the record and the reason for the withdrawal request. [email protected] https://eprints.whiterose.ac.uk/ Efficient Generation of Graphical Model Views via Lazy Model-to-Text Transformation Dimitris Kolovos Alfonso de la Vega Justin Cooper Department of Computer Science Department of Computer Science Department of Computer Science University of York University of York University of York York, UK York, UK York, UK [email protected] [email protected] [email protected] ABSTRACT transforming them into textual formats such as Graphviz, Plan- Producing graphical views from software and system models is tUML, SVG and HTML, which are subsequently rendered in an often desirable for communication and comprehension purposes, embedded browser.
    [Show full text]
  • Transformation Method from Scenario to Sequence Diagram
    Transformation Method from Scenario to Sequence Diagram Yousuke Morikawa, Takayuki Omori and Atsushi Ohnishi Department of Computer Science, Ritsumeikan University, Kusatsu, Shiga, Japan Keywords: Scenario, Sequence Diagram, Transformation between Scenario and Sequence Diagram. Abstract: Both scenario and sequence diagram are effective models for specifying behaviours of the target systems. Scenarios can be used for requirements elicitation in the requirements definition. Sequence diagrams can be used for interactions between a system user and system, and between objects. If these two models specifying behaviours of the same system, these models should be consistent. In this paper, we propose a transformation method from a scenario written with a structured scenario language named SCEL to a sequence diagram written with PlantUML. The transformation method will be illustrated with an example. 1 INTRODUCTION PlantUML. In section 5 we discuss the proposed method and a prototype system based on the method. Scenarios are important in software development, In section 6, we discuss related works. In the last particularly in requirements engineering, by section we give concluding remarks. providing concrete system description (Weidenhaupt, 1998). Especially, scenarios (or use case descriptions) are useful in defining system 2 SCENARIO DESCRIPTION behaviours by system developers and validating the LANGUAGE: SCEL requirements by customers. Sequence diagrams may be used to specify A scenario can be regarded as a sequence of events. software behaviours in the later phases of the object- Events are behaviours employed by users or the oriented software development. In such a case, system for accomplishing their goals. We assume because scenarios and sequence diagrams represent that each event has just one verb, and that each verb behaviours of the same target software system, these has its own case structure (Fillmore, 1968).
    [Show full text]