The Convergence of Modeling and Programming

Total Page:16

File Type:pdf, Size:1020Kb

The Convergence of Modeling and Programming The Convergence of Modeling and Programming: Facilitating the Representation of Attributes and Associations in the Umple Model-Oriented Programming Language by Andrew Forward PhD Thesis Presented to the Faculty of Graduate and Postdoctoral Studies in partial fulfillment of the requirements for the degree Doctor of Philosophy (Computer Science1) Ottawa-Carleton Institute for Computer Science School of Information Technology and Engineering University of Ottawa Ottawa, Ontario, K1N 6N5 Canada © Andrew Forward, 2010 1 The Ph.D. program in Computer Science is a joint program with Carleton University, administered by the Ottawa Carleton Institute for Computer Science Acknowledgements A very special, and well-deserved, thank you to the following: a) Dr. Timothy C. Lethbridge. Tim has been a mentor of mine for several years, first as one of my undergraduate professors, later as my Master’s supervisor. Tim has again helped to shape my approach to software engineering, research and academics during my journey as a PhD candidate. b) The Complexity Reduction in Software Engineering (CRUISE) group and in particular Omar Badreddin and Julie Filion. Our weekly meetings, work with IBM, and the collaboration with the development of Umple were of great help. c) My family and friends. Thank you and much love Ayana; your support during this endeavor was much appreciated despite the occasional teasing about me still being in school. To my mom (and editor) Jayne, my dad Bill, my sister Allison and her husband Dennis. And, to my friends Neil, Roy, Van, Rob, Pat, and Ernesto – your help will be forever recorded in my work. Finally a special note to Ryan Lowe, a fellow Software Engineer that helped to keep my work grounded during our lengthy discussion about software development – I will miss you greatly. d) Software professionals around the world. Sincere thanks to the individuals that participated in my research, published valuable references for my writing, as well as to those in the various news-groups about software engineering that I follow. Your knowledge and insight helped provide the necessary substance for my work. ii Abstract This thesis investigates approaches to model-driven development (MDD) in which developers can keep using their familiar textual programming languages, but with additional model- oriented concepts. The added concepts include associations and attributes as found in the Unified Modeling Language (UML), as well as concepts from software patterns and other common programming abstractions. By keeping text at the forefront of development, we maintain all of the advantages of text, without having to sacrifice the benefits of diagrams. By allowing a model to be equally expressed in either diagrammatic or textual form, we enable what we have termed text-diagram duality, a duality that benefits programmers and modelers alike. We explore why software developers in some situations prefer diagrams, but tend to revert to textual means to write and maintain software systems. To explore the capabilities of modeling in code, we developed a model-oriented programming language called Umple. At its core, Umple is a family of object-oriented languages enhanced with additional abstractions. Umple supports both platform-independent models (PIM), as well as platform specific models (PSM). Umple currently integrates with Java, PHP and Ruby; referred to as base languages throughout this thesis. Our research focuses on investigating the opportunities and obstacles we discovered in the course of implementing and using UML-like associations and attributes in Umple. It is our hypothesis that current features available in object-oriented languages can be enhanced with a more model-oriented approach, providing a textual form for modeling concepts that have been primarily available diagrammatically. By providing modeling abstractions in a programming language, the complexity and size of the resulting systems, we argue, is reduced and more developers, particularly those who are used to writing code, will be more eager to adopt modeling practices. At the same time, our approach maintains the benefits of diagrammatic approaches to software development, since Umple can be rendered and edited as a UML-like diagram. Our primary contributions to the field of computer science are as follows: First, we provide an empirical investigation on the nature of modeling practices. Second, we present the design, implementation and analysis of a model-oriented language, Umple. The language is presented as enhancements to existing programming languages including Java, PHP and Ruby. iii Table of Contents Chapter 1 Introduction.....................................................................................................................1 1.1 Research Questions ................................................................................................................2 1.2 Hypothesized Solutions ..........................................................................................................6 Chapter 2 Attitudes Towards Software Modeling – a Survey.........................................................8 2.1 Attitudes towards Modeling ...................................................................................................8 2.2 The Preliminary Study: Categorizing Software Applications ..............................................10 2.3 The Main Study: Modeling Survey ......................................................................................13 2.4 Demographics of the Modeling Survey................................................................................14 2.5 Modeling Survey Results .....................................................................................................15 2.5.1 What is a Software Model? ...........................................................................................16 2.5.2 Creating Versus Consuming Software Models .............................................................16 2.5.3 What Modeling Notations Do You Use?.......................................................................17 2.5.4 How Are You Using Your Modeling Tools? ................................................................18 2.5.5 How Good Are Your Modeling Tools?.........................................................................19 2.5.6 Important Attributes of a Software Model ....................................................................19 2.5.7 Which Approach, Code Versus Model Works Best? ....................................................21 2.5.8 Model-Centric Issues and Concerns..............................................................................22 2.5.9 Code-Centric Issues and Concerns................................................................................24 2.6 Threats to Validity................................................................................................................25 2.7 Contributions of the Modeling Survey .................................................................................26 Chapter 3 Umple: A Model Oriented Language ...........................................................................28 3.1 What Models and Modeling Languages Should Be .............................................................29 3.2 Motivations...........................................................................................................................34 3.2.1 Lack of Adoption of Modeling......................................................................................34 3.2.2 Reducing the Need to Program Boilerplate Code .........................................................35 3.3 Description of Umple ...........................................................................................................36 3.3.1 Simple............................................................................................................................36 iv 3.3.2 UML Programming Language ......................................................................................37 3.3.3 Ample ............................................................................................................................38 3.4 Motivating Examples............................................................................................................38 3.4.1 Course Registration .......................................................................................................38 3.4.2 Airline Reservation System...........................................................................................39 3.5 Overview of Umple Entities.................................................................................................41 3.5.1 Attributes .......................................................................................................................41 3.5.2 Associations...................................................................................................................42 3.5.3 Generalizations ..............................................................................................................43 3.5.4 Action Semantics Using Java-Like Methods ................................................................44 3.6 Umple Design and Tooling ..................................................................................................46 3.6.1 Umple’s IDE Tooling ....................................................................................................46 3.6.2 Modeling in the Browser ...............................................................................................47
Recommended publications
  • Curriculum for Second Year of Computer Engineering (2019 Course) (With Effect from 2020-21)
    Faculty of Science and Technology Savitribai Phule Pune University Maharashtra, India Curriculum for Second Year of Computer Engineering (2019 Course) (With effect from 2020-21) www.unipune.ac.in Savitribai Phule Pune University Savitribai Phule Pune University Bachelor of Computer Engineering Program Outcomes (PO) Learners are expected to know and be able to– PO1 Engineering Apply the knowledge of mathematics, science, Engineering fundamentals, knowledge and an Engineering specialization to the solution of complex Engineering problems PO2 Problem analysis Identify, formulate, review research literature, and analyze complex Engineering problems reaching substantiated conclusions using first principles of mathematics natural sciences, and Engineering sciences PO3 Design / Development Design solutions for complex Engineering problems and design system of Solutions components or processes that meet the specified needs with appropriate consideration for the public health and safety, and the cultural, societal, and Environmental considerations PO4 Conduct Use research-based knowledge and research methods including design of Investigations of experiments, analysis and interpretation of data, and synthesis of the Complex Problems information to provide valid conclusions. PO5 Modern Tool Usage Create, select, and apply appropriate techniques, resources, and modern Engineering and IT tools including prediction and modeling to complex Engineering activities with an understanding of the limitations PO6 The Engineer and Apply reasoning informed by
    [Show full text]
  • Capabilities Statement
    Capabilities Statement Email: [email protected] Web site: www.modeldriven.com 1 Model Driven Solutions Model Driven Solutions is a leading provider of professional services and products that leverage Services Oriented Architecture (SOA), the Object Management Group’s (OMG) Model Driven Architecture (MDA), Information Sharing, Ontologies and Semantics and W3C’s Semantic Web techniques and standards to federate processes, information, systems and organizations. A current focus is information interoperability and federation with a current emphasis on finance, risk and threats across cyber and physical domains as well as a model-driven approach to NIEM. We assist major organizations in achieving effectiveness and agility in a changing and collaborative world. Founded in 1996, as Data Access Technologies, Inc., its division, Model Driven Solutions, has been a leader in the development of open standards and supporting products that result in SOA based Executable Enterprise Architectures (EEA). Model Driven Solutions’ EEA focus helps drive information systems to quickly and cost effectively address business and defense initiatives. Active in the Object Management Group (OMG), the Organization for the Advancement of Structured Information Standards (OASIS), the Open Group and other standards development organizations, Model Driven Solutions has provided industry leadership that is, today, resulting in significant technological advancements and customer satisfaction. With customers like the General Services Administration (GSA), the U.S. Information Sharing Environment, the US Army, Raytheon, Lockheed Martin, Kaiser Permanente, Unisys and many others, Model Driven Solutions is at the leading edge of today’s software technology advances. General Information Parent Company Name: Data Access Technologies, Inc. (DAT) Virginia Affiliate: Model Driven Solutions, Inc.
    [Show full text]
  • 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]
  • Sysml Distilled: a Brief Guide to the Systems Modeling Language
    ptg11539604 Praise for SysML Distilled “In keeping with the outstanding tradition of Addison-Wesley’s techni- cal publications, Lenny Delligatti’s SysML Distilled does not disappoint. Lenny has done a masterful job of capturing the spirit of OMG SysML as a practical, standards-based modeling language to help systems engi- neers address growing system complexity. This book is loaded with matter-of-fact insights, starting with basic MBSE concepts to distin- guishing the subtle differences between use cases and scenarios to illu- mination on namespaces and SysML packages, and even speaks to some of the more esoteric SysML semantics such as token flows.” — Jeff Estefan, Principal Engineer, NASA’s Jet Propulsion Laboratory “The power of a modeling language, such as SysML, is that it facilitates communication not only within systems engineering but across disci- plines and across the development life cycle. Many languages have the ptg11539604 potential to increase communication, but without an effective guide, they can fall short of that objective. In SysML Distilled, Lenny Delligatti combines just the right amount of technology with a common-sense approach to utilizing SysML toward achieving that communication. Having worked in systems and software engineering across many do- mains for the last 30 years, and having taught computer languages, UML, and SysML to many organizations and within the college setting, I find Lenny’s book an invaluable resource. He presents the concepts clearly and provides useful and pragmatic examples to get you off the ground quickly and enables you to be an effective modeler.” — Thomas W. Fargnoli, Lead Member of the Engineering Staff, Lockheed Martin “This book provides an excellent introduction to SysML.
    [Show full text]
  • Designpatternsphp Documentation Release 1.0
    DesignPatternsPHP Documentation Release 1.0 Dominik Liebler and contributors Jul 18, 2021 Contents 1 Patterns 3 1.1 Creational................................................3 1.1.1 Abstract Factory........................................3 1.1.2 Builder.............................................8 1.1.3 Factory Method......................................... 13 1.1.4 Pool............................................... 18 1.1.5 Prototype............................................ 21 1.1.6 Simple Factory......................................... 24 1.1.7 Singleton............................................ 26 1.1.8 Static Factory.......................................... 28 1.2 Structural................................................. 30 1.2.1 Adapter / Wrapper....................................... 31 1.2.2 Bridge.............................................. 35 1.2.3 Composite............................................ 39 1.2.4 Data Mapper.......................................... 42 1.2.5 Decorator............................................ 46 1.2.6 Dependency Injection...................................... 50 1.2.7 Facade.............................................. 53 1.2.8 Fluent Interface......................................... 56 1.2.9 Flyweight............................................ 59 1.2.10 Proxy.............................................. 62 1.2.11 Registry............................................. 66 1.3 Behavioral................................................ 69 1.3.1 Chain Of Responsibilities...................................
    [Show full text]
  • Executable UML: a Foundation for Model Driven Architecture
    01-Introduction.fm Page 1 Wednesday, April 17, 2002 4:33 PM 1 Introduction Organizations want systems. They don’t want processes, meetings, mod- els, documents, or even code.1 They want systems that work—as quickly as possible, as cheaply as possible, and as easy to change as possible. Organizations don’t want long software development lead-times and high costs; they just want to reduce systems development hassles to the abso- lute minimum. But systems development is a complicated business. It demands distilla- tion of overlapping and contradictory requirements; invention of good abstractions from those requirements; fabrication of an efficient, cost- effective implementation; and clever solutions to isolated coding and abstraction problems. And we need to manage all this work to a successful conclusion, all at the lowest possible cost in time and money. None of this is new. Over thirty years ago, the U.S. Department of Defense warned of a “software crisis” and predicted that to meet the burgeoning need for software by the end of the century, everyone in the country would have to become a programmer. In many ways this prediction has come true, as anyone who has checked on the progress of a flight or made a stock trade using the Internet can tell you. Nowadays, we all write our own 1 Robert Block began his book The Politics of Projects[1] in a similar manner. 1 01-Introduction.fm Page 2 Wednesday, April 17, 2002 4:33 PM 2 INTRODUCTION programs by filling in forms—at the level of abstraction of the application, not the software.
    [Show full text]
  • Executing UML Models
    Executing UML Models Miguel Pinto Luz1, Alberto Rodrigues da Silva1 1Instituto Superior Técnico Av. Rovisco Pais 1049-001 Lisboa – Portugal {miguelluz, alberto.silva}@acm.org Abstract. Software development evolution is a history of permanent seeks for raising the abstraction level to new limits overcoming new frontiers. Executable UML (xUML) comes this way as the expectation to achieve the next level in abstraction, offering the capability of deploying a xUML model in a variety of software environments and platforms without any changes. This paper comes as a first expedition inside xUML, exploring the main aspects of its specification including the action languages support and the fundamental MDA compliance. In this paper is presented a future new xUML tool called XIS-xModels that gives Microsoft Visio new capabilities of running and debugging xUML models. This paper is an outline of the capabilities and main features of the future application. Keywords: UML, executable UML, Model Debugging, Action Language. 1. Introduction In a dictionary we find that an engineer is a person who uses scientific knowledge to solve practical problems, planning and directing, but an information technology engineer is someone that spends is time on implementing lines of code, instead of being focus on planning and projecting. Processes, meetings, models, documents, or even code are superfluous artifacts for organizations: all they need is well design and fast implemented working system, that moves them towards a new software development paradigm, based on high level executable models. According this new paradigm it should be possible to reduce development time and costs, and to bring new product quality warranties, only reachable by executing, debugging and testing early design stages (models).
    [Show full text]
  • Laravel - My First Framework Companion for Developers Discovering Laravel PHP Framework
    Laravel - my first framework Companion for developers discovering Laravel PHP framework Maksim Surguy This book is for sale at http://leanpub.com/laravel-first-framework This version was published on 2014-09-05 This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do. ©2014 Maksim Surguy Tweet This Book! Please help Maksim Surguy by spreading the word about this book on Twitter! The suggested hashtag for this book is #laravelfirst. Find out what other people are saying about the book by clicking on this link to search for this hashtag on Twitter: https://twitter.com/search?q=#laravelfirst Also By Maksim Surguy Integrating Front end Components with Web Applications Contents Introduction ................................................. i About the author ............................................. i Prerequisites ................................................ ii Source Code ................................................ ii 1. Meeting Laravel ............................................. 1 1.1 Introducing Laravel 4 PHP framework .............................. 1 1.1.1 Laravel’s Expressive code .................................. 2 1.1.2 Laravel applications use Model-View-Controller pattern ................. 3 1.1.3 Laravel was built by a great community .......................... 3 1.2 History of Laravel framework ................................... 4 1.2.1 State of PHP frameworks world before Laravel 4 ..................... 4 1.2.2 Evolution of Laravel framework .............................. 4 1.3 Advantages of Using Laravel ................................... 5 1.3.1 Convention over configuration ............................... 5 1.3.2 Ready out of the box .................................... 6 1.3.3 Clear organization of all parts of the application ....................
    [Show full text]
  • An Open Source Software Selection Process and a Case Study
    AN OPEN SOURCE SOFTWARE SELECTION PROCESS AND A CASE STUDY A Record of Study by GUOBIN HE Submitted to the Office of Graduate Studies of Texas A&M University in partial fulfillment of the requirements for the degree of DOCTOR OF ENGINEERING August 2007 Major Subject: Engineering College of Engineering AN OPEN SOURCE SOFTWARE SELECTION PROCESS AND A CASE STUDY A Record of Study by GUOBIN HE Submitted to the Office of Graduate Studies of Texas A&M University in partial fulfillment of the requirements for the degree of DOCTOR OF ENGINEERING Approved by: Chair of Committee, Dick B. Simmons Committee Members, William M. Lively Jianer Chen Sheng-Jen Hsieh John Fierstien Head of Doctor of Engineering Programs, N.K. Anand August 2007 Major Subject: Engineering College of Engineering iii ABSTRACT An Open Source Software Selection Process and a Case Study. (August 2007) Guobin He, B.S., National University of Defense Technology; M.S., Beijing University of Aeronautics and Astronautics Chair of Advisory Committee: Dr. Dick B. Simmons In this study, I design an empirical open source software selection process, which reuses some ideas from Commercial Off-the-Shelf selection methods and addresses the characteristics of the open source software. Basically, it consists of three basic steps: identification, screening and evaluation. The identification step is to find all possible alternatives to open source software that can meet the high level requirements. The next step is screening, in which the refined requirements are applied to filter the alternatives. The evaluation step is based on the Analytic Hierarchy Process, in which the alternatives are inspected from functional suitability, source code, support strength and popularity.
    [Show full text]
  • Model-Driven Testing in Umple
    Model-Driven Testing in Umple Sultan Eid A. Almaghthawi A thesis submitted in partial fulfillment of the requirements for the degree Ph.D in Computer Science Ottawa-Carleton Institute for Computer Science School of Electrical Engineering and Computer Science University of Ottawa Ottawa, Ontario, Canada April 2020 © Sultan Eid A. Almaghthawi, Ottawa, Canada, 2020 Acknowledgement Firstly, I would like to express my sincere gratitude to my supervisor Prof. Timothy Lethbridge for the continuous support of my Ph.D study and related research, for his patience, motivation, and immense knowledge. His guidance helped me in all the time of research and writing of this thesis. I could not have imagined having a better advisor and mentor for my Ph.D study. Besides my advisor, I would like to thank the rest of my thesis committee: Prof. Thomas R. Dean, Prof. Daniel Amyot, Prof. jean-Pierre Corriveau, and Prof. Stéphane Somé, for their insightful comments and encouragement, but also for the hard question which incented me to widen my research from various perspectives. Thanks to my country who had provided all the support needed and has always looked after its students. Also, thank you Taibah University for giving me the opportunity to pursue my study and providing the support needed especially professor Mosaed Alsobhe for his great insight and support during my early years as an academic. I also would like to thank everyone in the The Complexity Reduction in Software Engineering (CRUISE). All the discussion, brainstorming and code sprints we had over the years made this work possible. Last but not least, I would like to thank my family: Thank you and much love my wife Lamia; your endless support during the endeavor is forever appreciated.
    [Show full text]
  • An Experimental Study of the Performance, Energy, and Programming Effort Trade-Offs of Android Persistence Frameworks
    An Experimental Study of the Performance, Energy, and Programming Effort Trade-offs of Android Persistence Frameworks Jing Pu Thesis submitted to the Faculty of the Virginia Polytechnic Institute and State University in partial fulfillment of the requirements for the degree of Master of Science in Computer Science and Applications Eli Tilevich, Chair Barbara G. Ryder Francisco Servant July 1, 2016 Blacksburg, Virginia Keywords: Energy Efficiency; Performance; Programming Effort; Orthogonal Persistence; Android; Copyright 2016, Jing Pu An Experimental Study of the Performance, Energy, and Programming Effort Trade-offs of Android Persistence Frameworks Jing Pu (ABSTRACT) One of the fundamental building blocks of a mobile application is the ability to persist program data between different invocations. Referred to as persistence, this functionality is commonly implemented by means of persistence frameworks. When choosing a particular framework, Android|the most popular mobile platform—offers a wide variety of options to developers. Unfortunately, the energy, performance, and programming effort trade-offs of these frameworks are poorly understood, leaving the Android developer in the dark trying to select the most appropriate option for their applications. To address this problem, this thesis reports on the results of the first systematic study of six Android persistence frameworks (i.e., ActiveAndroid, greenDAO, Orm- Lite, Sugar ORM, Android SQLite, and Realm Java) in their application to and performance with popular benchmarks, such as DaCapo. Having measured and ana- lyzed the energy, performance, and programming effort trade-offs for each framework, we present a set of practical guidelines for the developer to choose between Android persistence frameworks. Our findings can also help the framework developers to optimize their products to meet the desired design objectives.
    [Show full text]
  • Umple Tutorial: Models 2020
    Umple Tutorial: Models 2020 Timothy C. Lethbridge, I.S.P, P.Eng. University of Ottawa, Canada Timothy.Lethbridge@ uottawa.ca http://www.umple.org Umple: Simple, Ample, UML Programming Language Open source textual modeling tool and code generator • Adds modeling to Java,. C++, PHP • A sample of features —Referential integrity on associations —Code generation for patterns —Blending of conventional code with models —Infinitely nested state machines, with concurrency —Separation of concerns for models: mixins, traits, mixsets, aspects Tools • Command line compiler • Web-based tool (UmpleOnline) for demos and education • Plugins for Eclipse and other tools Models T3 Tutorial: Umple - October 2020 2 What Are we Going to Learn About in This Tutorial? What Will You Be Able To Do? • Modeling using class diagrams —AttriButes, Associations, Methods, Patterns, Constraints • Modeling using state diagrams —States, Events, Transitions, Guards, Nesting, Actions, Activities —Concurrency • Separation of Concerns in Models —Mixins, Traits, Aspects, Mixsets • Practice with a examples focusing on state machines and product lines • Building a complete system in Umple Models T3 Tutorial: Umple - October 2020 3 What Technology Will You Need? As a minimum: Any web browser. For a richer command-line experience • A computer (laptop) with Java 8-14 JDK • Mac and Linux are the easiest platforms, but Windows also will work • Download Umple Jar at http://dl.umple.org You can also run Umple in Docker: http://docker.umple.org Models T3 Tutorial: Umple - October 2020 4
    [Show full text]