The Umple Model-Oriented Programming Technology: Easy-to-Use Open-Source Code Generation Code Generation 2013, Cambridge UK Timothy C. Lethbridge, University.

Slides:



Advertisements
Similar presentations
Chapter 22 UML Tooks and UML as Blueprint Model-Driven Architecture (MDA) Object-Constraint Language (OCL)
Advertisements

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System modeling 2.
Static code check – Klocwork
Gild Project: Jan 8/2003 CSc 115/160 (S01) Gild: Groupware enabled Integrated Learning and Development for Java.
Software Engineering COMP 201
Liang,Introduction to Java Programming,revised by Dai-kaiyu 1 Chapter 10 Object-Oriented Modeling.
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
Version Enterprise Architect Redefines Modeling in 2006 An Agile and Scalable modeling solution Provides Full Lifecycle.
Miser-C MISRA-C Compliance Checker Ian Biller, Phillippe Dass, Bryan Eldridge, Jon Senchyna, Tracy Thomas Faculty Coach: Professor Michael Lutz Project.
Exploring a Model-Oriented and Executable Syntax for UML Attributes SERA 2013SERA 2013 (August 7, 2013 in Prague, Czech Republic) Omar Badreddin, Andrew.
SCHOOL OF COMPUTING QUEEN’S UNIVERSITY 08/03/2013 Andrew Forward, Omar Badreddin, Timothy C. Lethbridge, and Julian Solano School of Electrical Engineering.
CASE Tools And Their Effect On Software Quality Peter Geddis – pxg07u.
EclipseME Java Micro Edition The Eclipse Way Craig Setera April 19, 2006.
Introduction to High-Level Language Programming
DEVSENSE s.r.o.. Visual Studio Industry Partner DEVSENSE s.r.o. NEXT STEPS Contact us at: In 2009, DEVSENSE was founded by four software.
Model-Oriented Programming: Bridging the Model-Code Divide Modeling in Software Engineering (MiSE 2013) Omar Badreddin, Timothy C. Lethbridge University.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 14Slide 1 Design with Reuse l Building software from reusable components.
CS 355 – Programming Languages
Xactium xDSLs Run Models Not Code Tony Clark
Modeling Practices in Open Source Software OSS 2013 Koper-Capodistria, Slovenia Omar Badreddin Post Doctoral Fellow, University of Ottawa
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
(1.1) COEN 171 Programming Languages Winter 2000 Ron Danielson.
An Introduction to Software Architecture
Ranga Rodrigo. The purpose of software engineering is to find ways of building quality software.
T-unit: Tcl Unit Test Package Automated Unit Test Package For Tcl Procedures Final Presentation Joseph Boyle Loyola Marymount University.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Chapter 6 – Architectural Design CSE-411, Dr. Shamim H Ripon.
IBM Software Group ® Overview of SA and RSA Integration John Jessup June 1, 2012 Slides from Kevin Cornell December 2008 Have been reused in this presentation.
Distributed Java Programming Distributed Java Programming Setting up a Java Development Environment.
Model Oriented Programming: An Empirical Study of Comprehension Omar Badreddin Andrew Forward Timothy C. Lethbridge try.umple.org.
Umple Toolkit for Model-Oriented Programming NECSIS Webinar, May Timothy C. Lethbridge, University of Ottawa
Abstract We present two Model Driven Engineering (MDE) tools, namely the Eclipse Modeling Framework (EMF) and Umple. We identify the structure and characteristic.
Chapter 7 Software Engineering Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Software Engineering Chapter 3 CPSC Pascal Brent M. Dingle Texas A&M University.
First BlueJ Day Houston, 2006 Unit Testing with BlueJ Bruce Quig Deakin University.
Improving Code Generation for Associations: Enforcing Multiplicity Constraints and Ensuring Referential Integrity SERA 2013SERA 2013 (August 7, 2013 in.
Nov Quality Process for Research Software - Timothy C. Lethbridge Research Software Doesn't Have to be Buggy: A Model-Driven, Test-Driven and Agile.
TEST-1 6. Testing & Refactoring. TEST-2 How we create classes? We think about what a class must do We focus on its implementation We write fields We write.
Applying a Research Prototype Tool in Industrial Practice Ottawa Carleton Institute for Computer Science Umple: a Model Oriented Programming Language University.
© 2007 BigVisible Solutions, Inc. All Rights Reserved Training Solutions Agile Training Game v
Compiler Construction (CS-636)
Teaching UML Using Umple: Applying Model-Oriented Programming in the Classroom CSEE&T 2011 Timothy C. Lethbridge, Gunter Mussbacher, Andrew Forward and.
LanguageLab A Meta-modelling Environment Terje Gjøsæter and Andreas Prinz, University of Agder, Norway SDL Forum 2015, Berlin, Germany.
Separation Of Concerns: Mixins + Variability Models + Aspects in Umple CSER – June 2013 – Montreal Timothy C. Lethbridge, University of Ottawa
May08-21 Model-Based Software Development Kevin Korslund Daniel De Graaf Cory Kleinheksel Benjamin Miller Client – Rockwell Collins Faculty Advisor – Dr.
® IBM Software Group © 2007 IBM Corporation Module 1: Getting Started with Rational Software Architect Essentials of Modeling with IBM Rational Software.
(1) Introduction to Continuous Integration Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of.
Oct Interchangability in Software Design Notation - Timothy C. Lethbridge Interchangability in software design notation: programs models visual.
Software Development Process CS 360 Lecture 3. Software Process The software process is a structured set of activities required to develop a software.
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.
The Dagstuhl Middle Model: An Overview Timothy C. Lethbridge SITE, University. of Ottawa
Editing and Debugging Mumps with VistA and the Eclipse IDE Joel L. Ivey, Ph.D. Dept. of Veteran Affairs OI&T, Veterans Health IT Infrastructure & Security.
Notices Assn 2 is due tomorrow, 7pm. Moodle quiz next week – written in the lab as before. Everything up to and including today’s lecture: Big Topics are.
Visual Programming Borland Delphi. Developing Applications Borland Delphi is an object-oriented, visual programming environment to develop 32-bit applications.
Software Development. The Software Life Cycle Encompasses all activities from initial analysis until obsolescence Analysis of problem or request Analysis.
Software Development.
What is Wrong with Models?
Applying a Research Prototype Tool in Industrial Practice
Software Design and Architecture
Introduction to Eclipse Process Framework: EPF Composer and OpenUP
Evaluating Compuware OptimalJ as an MDA tool
Umple Mini-Course Part 1: The Basics
Models 2015 M. Garzón, A. Forward, and T. Lethbridge
UNIT 5 EMBEDDED SYSTEM DEVELOPMENT
UNIT 5 EMBEDDED SYSTEM DEVELOPMENT
Teaching Effective UML Modeling by Combining it with Programming
SE goes software engineering; (practically) managing the Compose
Timothy C. Lethbridge, Andrew Forward, Omar Badreddin
Software Architecture & Design
Presentation transcript:

The Umple Model-Oriented Programming Technology: Easy-to-Use Open-Source Code Generation Code Generation 2013, Cambridge UK Timothy C. Lethbridge, University of Ottawa

My background Once worked at Northern Telecom Collaborated with originators of ObjecTime / IBM Rational Tools since early 1990’s Professor of software engineering at University of Ottawa Have taught software engineering since 1991 Research focuses —Usability of software engineering tools —Empirical studies Recent research support: IBM, Ericsson, General Motors, Defense Deptartment T. Lethbridge Code Generation Umple2

Motivation From our studies of practitioners Code generation is weak in widely-deployed tools Tools are awkward, do not interoperate Modellers mostly —do it for documentation —make important errors From our teaching of modeling Students learned syntax, but failed to learn —Semantics —Pragmatics —To create implementable models due to lack of feedback T. Lethbridge Code Generation Umple3

Umple: Simple, Ample, UML Programming Language 1. Open source code generator for UML The only one that has —Infinitely nested state machines, with concurrency —Proper referential integrity and multiplicity constraints on associations 2. Textual modelling tool set Command line compiler Web-based tool (UmpleOnline) for demos and education Eclipse plugin 3. Pre-processor to add UML, patterns and other features on top of Java, PhP and other languages T. Lethbridge Code Generation Umple4

Exercise: Compiling and Changing a Model Go to Look at the example at the bottom Observe: attribute, association, class hierarchy, mixin Click on Load the above code into UmpleOnline Observe and modify the diagram Add an attribute Make a multiplicity error, then undo Generate code and take a look Download, compile and run if you want T. Lethbridge Code Generation Umple5

Demo of the command line Umple compiler Follows conventions of gcc Used by ant scripts for building T. Lethbridge Code Generation Umple6

Umple Philosophy 1-4 P1. Modeling is programming and vice versa P2. An Umple programmer should never need to edit generated code to accomplish any task. P3. The Umple compiler can accept and generate code that uses nothing but UML abstractions. -The above is the inverse of the following P4. A program without Umple features can be compiled by an Umple compiler. e.g. input Java results in the same as output T. Lethbridge Code Generation Umple7

Umple Philosophy 5-8 P5. A programmer can incrementally add Umple features to an existing program Umplification P6. Umple extends the base language in a minimally invasive and safe way. P7. Umple features can be created and viewed diagrammatically or textually P8. Umple goes beyond UML T. Lethbridge Code Generation Umple8

A look at selected Umple features Attributes Associations Notice the inline and independent state machines State Machines Switch to ‘GraphViz state diagram’ in the options menu T. Lethbridge Code Generation Umple9

Umple Architecture 1 Grammar DSL: Online (we migrated from Antlr to better handle embedded code blocks and gain flexibility) Umple is written in itself Key to testing and reliability ise.umple/src/Umple.umphttp://code.google.com/p/umple/source/browse/trunk/cru ise.umple/src/Umple.ump T. Lethbridge Code Generation Umple10

Umple Architecture 2 Umple’s own class diagram generated by itself from itself: Colours represent key subsystems Click on classes to see Javadoc, and then Umple Code T. Lethbridge Code Generation Umple11

Testing: TDD with100% pass always required Multiple levels: Parsing tests: basic constructs Metamodel tests: ensure it is populated properly —E.g. cruise/umple/compiler/AssociationTest.java cruise/umple/compiler/AssociationTest.java Implementation template tests: to ensure constructs generate code that looks as expected Testbed semantic tests: Generate code and make sure it behaves the way it should T. Lethbridge Code Generation Umple12

Continuous integration Small increments compiled frequently Single trunk, no branches for now Online QA report: T. Lethbridge Code Generation Umple13

Code Generation Approach 1 Generation relies on ‘walking’ the metamodel Where possible, new features are added by layering on top of the existing ones e.g. —There was an existing ‘code injection’ feature —Constraints were implemented almost entirely at the metamodel level by adding ‘before’ and ‘after’ code injections T. Lethbridge Code Generation Umple14

Code Generation Approach 2 Each generator is a separate plugin and can have a different architecture Use Jet templates Language independent common templates — %2Ftrunk%2FUmpleToTemplate%2Ftemplateshttp://code.google.com/p/umple/source/browse/#svn %2Ftrunk%2FUmpleToTemplate%2Ftemplates Language-specific templates — %2Ftrunk%2FUmpleToJava%2Ftemplateshttp://code.google.com/p/umple/source/browse/#svn %2Ftrunk%2FUmpleToJava%2Ftemplates Language-specific translation functions — /cruise.umple/src/Generator_CodeJava.umphttp://code.google.com/p/umple/source/browse/trunk /cruise.umple/src/Generator_CodeJava.ump T. Lethbridge Code Generation Umple15

Code generation lessons from Umple 1 Process of developing Umple Agile continuous integration Language written in itself Multi-level test-driven development Process for all users of Umple Modeling and programming at the same level Many semantic model checks produce warnings & errors Round trip engineering is banished Generation of diagrams from text and text from diagrams IDE Flexibility: Eclipse / Web / Command line Incremental umplification T. Lethbridge Code Generation Umple16

Code generation lessons from Umple 2 Language features Deep attention to detail in state machines and UML associations Mixins for separation of concerns Multi-lingual generation and embedding Generated code looks nice —No ‘Umple runtime’ —Can be inspected to gain confidence —No risk adoption T. Lethbridge Code Generation Umple17

Evidence of benefit Umple in use an a couple of small companies Umple development in itself 20+ developers Empirical studies show Umple code is easier to understand than Java Helps students learn to model: CSEE&T T. Lethbridge Code Generation Umple18

Results of survey T. Lethbridge CSEE&T Umple in the classroom helped me understand concepts Umple in the lab helped me understand concepts I will get better grades because of Umple Prof. Lethbridge should use it in future courses As of Dec 2010, Umple is too incomplete or buggy Other tools would have been just as effective I would use Umple in the future, assuming bugs fixed

T. Lethbridge CSEE&T Availability of a textual form for models and diagrams Ability to edit diagram or text & have the other reflect changes Ability to generate code to represent the model

Comparison of Grades Comparison of 4 offerings of the same course before introducing Umple, and 2 offerings afterwards Midterm examination grades on UML modeling question rose from 75.8% to 82.3% 8.6% improvement Final exam grades on UML modeling questions rose from 76.4% to 83.6% 9.4% improvement Highly statistically significant p< on T Test n=332 prior to Umple; n=137 afterwards Similar results in 4 th year course SEG4110 No difference in non-UML questions T. Lethbridge CSEE&T

The Near Future Real time UML/Autosar extensions Robust C/C++ generation Application for Eclipse Foundation hosting Seek industrial uptake T. Lethbridge Code Generation Umple22

A Few Direct Web Links UmpleOnline User Manual Google Code Hosting Site This presentation: orial-CodeGeneration.ppt T. Lethbridge Code Generation Umple23

Questions? T. Lethbridge Code Generation Umple24