Separation Of Concerns: Mixins + Variability Models + Aspects in Umple CSER – June 2013 – Montreal Timothy C. Lethbridge, University of Ottawa

Slides:



Advertisements
Similar presentations
Profiles Construction Eclipse ECESIS Project Construction of Complex UML Profiles UPM ETSI Telecomunicación Ciudad Universitaria s/n Madrid 28040,
Advertisements

Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
Aspect Oriented Programming. AOP Contents 1 Overview 2 Terminology 3 The Problem 4 The Solution 4 Join point models 5 Implementation 6 Terminology Review.
Professor John Hosking, Dean of Engineering and Computer Science Models, Modelling, MBSE.
CS 211 Inheritance AAA.
Classes and Object- Oriented... tMyn1 Classes and Object-Oriented Programming The essence of object-oriented programming is that you write programs in.
INTERPRETER Main Topics What is an Interpreter. Why should we learn about them.
1 CS 426 Senior Projects Chapter 19: Interfaces and Components [Arlow & Neustadt 2005] February 28, 2008.
Theme UML Extending UML to treat aspects Presented by Moran Birenbaum.
C++ fundamentals.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Tahir Nawaz Visual Programming C# Week 2. What is C#? C# (pronounced "C sharp") is an object- oriented language that is used to build applications for.
Visualization By: Simon Luangsisombath. Canonical Visualization  Architectural modeling notations are ways to organize information  Canonical notation.
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.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
The Umple Model-Oriented Programming Technology: Easy-to-Use Open-Source Code Generation Code Generation 2013, Cambridge UK Timothy C. Lethbridge, University.
Object Oriented Software Development
Model-Oriented Programming: Bridging the Model-Code Divide Modeling in Software Engineering (MiSE 2013) Omar Badreddin, Timothy C. Lethbridge University.
Proceso kintamybių modeliavimas Modelling process variabilities Donatas Čiukšys.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 18 Slide 1 Software Reuse.
Software Engineering Muhammad Fahad Khan
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 14Slide 1 Design with Reuse l Building software from reusable components.
C++ Object Oriented 1. Class and Object The main purpose of C++ programming is to add object orientation to the C programming language and classes are.
1COM6030 Systems Analysis and Design © University of Sheffield 2005 COM 6030 Software Analysis and Design Lecture 4 - System modelling Dr Richard Clayton.
Modeling Practices in Open Source Software OSS 2013 Koper-Capodistria, Slovenia Omar Badreddin Post Doctoral Fellow, University of Ottawa
Faculty of Informatics and Information Technologies Slovak University of Technology Peter Kajsa and Ľubomír Majtás Design.
11 1 Object oriented DB (not in book) Database Systems: Design, Implementation, & Management, 6 th Edition, Rob & Coronel Learning objectives: What.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
1/19 Component Design On-demand Learning Series Software Engineering of Web Application - Principles of Good Component Design Hunan University, Software.
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer Mappings, Use of MOF for Language Families Joachim Fischer Workshop on.
An Introduction to Software Architecture
Database Design - Lecture 2
Composing Adaptive Software Authors Philip K. McKinley, Seyed Masoud Sadjadi, Eric P. Kasten, Betty H.C. Cheng Presented by Ana Rodriguez June 21, 2006.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Hyper/J and Concern Manipulation Environment. The need for AOSD tools and development environment AOSD requires a variety of tools Life cycle – support.
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.
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.
A Meta-Level Specification and Profile for AspectJ in UML Joerg Evermann School of Information Management Victoria University of Wellington.
Improving Code Generation for Associations: Enforcing Multiplicity Constraints and Ensuring Referential Integrity SERA 2013SERA 2013 (August 7, 2013 in.
Part VII: Design Continuous
Applying a Research Prototype Tool in Industrial Practice Ottawa Carleton Institute for Computer Science Umple: a Model Oriented Programming Language University.
Chapter 8: Aspect Oriented Programming Omar Meqdadi SE 3860 Lecture 8 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Teaching UML Using Umple: Applying Model-Oriented Programming in the Classroom CSEE&T 2011 Timothy C. Lethbridge, Gunter Mussbacher, Andrew Forward and.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
Interfaces About Interfaces Interfaces and abstract classes provide more structured way to separate interface from implementation
Generating Software Documentation in Use Case Maps from Filtered Execution Traces Edna Braun, Daniel Amyot, Timothy Lethbridge University of Ottawa, Canada.
Chapter 19: Interfaces and Components [Arlow and Neustadt, 2005] University of Nevada, Reno Department of Computer Science & Engineering.
Aspect Oriented Security Tim Hollebeek, Ph.D.
Oct Interchangability in Software Design Notation - Timothy C. Lethbridge Interchangability in software design notation: programs models visual.
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
CSCE 240 – Intro to Software Engineering Lecture 3.
UML (Unified Modeling Language)
A Controlled Experiment in Maintenance Comparing Design Patterns to Simpler Solutions By Prechelt, Unger, Tichy, Brössler, and Votta Presentation by Chris.
SysML v2 Formalism: Requirements & Benefits
Behavioral Design Patterns
Applying a Research Prototype Tool in Industrial Practice
John D. McGregor C8 - Tactics
More Object-Oriented Programming
Umple Mini-Course Part 1: The Basics
Reference This talk is loosely based on the following
An Introduction to Software Architecture
Models 2015 M. Garzón, A. Forward, and T. Lethbridge
Teaching Effective UML Modeling by Combining it with Programming
AspectAda Aspect-Oriented Programming for Ada95
Timothy C. Lethbridge, Andrew Forward, Omar Badreddin
Presentation transcript:

Separation Of Concerns: Mixins + Variability Models + Aspects in Umple CSER – June 2013 – Montreal Timothy C. Lethbridge, University of Ottawa

Umple: Simple, Ample, UML Programming Language Open source textual modeling tool and code generator —Adds modeling to Java,. C++, PHP etc. —Sample features -Proper referential integrity and multiplicity constraints on associations -Infinitely nested state machines, with concurrency Tools Command line compiler Web-based tool (UmpleOnline) for demos and education Eclipse plugin T. Lethbridge CSER Separation of Concerns in Umple2

In Umple: Modeling and programming are merged Round-tripping is banished T. Lethbridge CSER Separation of Concerns in Umple3

A Quick Look at Selected Umple features Hello World State Machines Switch to ‘GraphViz state diagram’ in the options menu T. Lethbridge CSER Separation of Concerns in Umple4

Separation of Concerns (SoC) Concern: Functionality or quality of a software system of interest to stakeholders and which can be conceptualized separately Separation of concerns Ability to develop a concern in a software system with: —Minimal need for knowledge of other concerns —Minimal conflicts with development of other concerns —Minimal need to change requirements/model/design of the concern when other concerns change —i.e. fewer dependencies Ability to include/omit the concern or compose with others Result: Simpler system, greater flexibility, greater quality T. Lethbridge CSER Separation of Concerns in Umple5

Approaches to Separation of Concerns Various types of modules (files, functions, classes, packages, libraries, services, aspects, variants, etc) Various mechanisms to include/invoke/compose/separate concerns, while (ideally) minimizing coupling: Cloning (deprecated) Calling File inclusion/import Inheritance Aspect orientation Mixins and traits Variants Transformations Service invocation T. Lethbridge CSER Separation of Concerns in Umple6

Mixins and traits Mixin Ability to define some code/model that can be included (or not) in a various classes Explicit copy at compile time, as opposed to inheritance Popular in Ada, Ruby Trait Closely related to Mixins Behaviour (abstract methods, or code calling only such methods) that can be included (or not) in classes Scala T. Lethbridge CSER Separation of Concerns in Umple7

Pros and cons of traits/mixins + Facilitate SoC without the complexity of inheritance + Can give some of the power of multiple inheritance in languages without it + Form natural building blocks for features that can be included in variants - Code/model for classes becomes ‘spread out’ (delocalized) Hard to know entire class content unless there is tool support to show this T. Lethbridge CSER Separation of Concerns in Umple8

Intra-Class Mixins in Umple Mixins allow including attributes, associations, state machines, groups of states, stereotypes, etc Example: class X { a; } class X { b; } The result would be a class with both a and b. It doesn’t matter whether the mixins are Both in the same file One in one file that includes the other in an other file In two separate files, with a third file invoking them T. Lethbridge CSER Separation of Concerns in Umple9

Why Did We Decide to Support Mixins? Alternative use Cases: Separating abstractions —High level: Class diagram concepts, state machines, —Lower level: Methods Separating methods in multiple languages Separating features Demo T. Lethbridge CSER Separation of Concerns in Umple10

Limitations of Mixins in Umple A mixin cannot be included in multiple classes, except: When the mixed in code is inherited When mixing in state machines defined as first-class entities Limitations haven’t proved much of a problem in practice Our research questions Should we lift the limitations? Are there compelling use cases for more capability? If so what syntax and semantics? What would be the favourable or adverse consequences? T. Lethbridge CSER Separation of Concerns in Umple11

One Possible Umple Extension: Patterns as Reusable Concerns Composite pattern in file GeneralHierarchy.umpp class Node { // Methods that apply to all nodes } class SuperiorNode { * Node; isA Node; // Methods would go here; could be mixed in } Invocation to create an organizational chart use GeneralHierarchy.umpp < Node ->> Employee, SuperiorNode ->> Manager>; T. Lethbridge CSER Separation of Concerns in Umple12

Key Philosophies in Extending Umple 1 We must have a concrete problem to solve Ideally an application of the concept in the Umple compiler as well as some other system Not just ‘toy’ or ‘academically interesting’ examples Adding a new feature must have net benefit when considering Umple usability —Ease of learning —Speed of development for end-users Maintenance and other qualities of Umple itself T. Lethbridge CSER Separation of Concerns in Umple13

Key Philosophies in Extending Umple 2 Syntax and semantics must be as harmonious as possible with C family languages (C++ / Java / PhP etc.) UML Existing Umple features We should boldly go where others haven’t And yet … Follow others where they have blazed a trail T. Lethbridge CSER Separation of Concerns in Umple14

Aspect Orientation Create a pointcut that specifies (advises) where to inject code at multiple points elsewhere in a system Pieces of code that would otherwise be scattered are thus gathered into the aspect But: There is potentially acute sensitivity to change If the code changes the aspect may need to change Yet without tool support, developers wouldn’t know this Delocalization even stronger than for mixins T. Lethbridge CSER Separation of Concerns in Umple15

Aspect Orientation in Umple Pointcuts are currently limited Just inject code before and after execution of methods —Currently only generated methods Cannot cross class boundaries —except when the injected advice is inherited Again, we have found these limited abilities nonetheless solve key problems and we don’t crave too much more T. Lethbridge CSER Separation of Concerns in Umple16

Variability Modeling in Umple/VML Define bits of model as variants that can be put together to create different versions of a product line Currently Concerns list sets of variation points Variation points can be filled by variants —Blocks of Umple code -Hence also Java, PhP, C++ etc. —Optional, required, and/or, etc. Demo: T. Lethbridge CSER Separation of Concerns in Umple17

Ideas for Improving Variability Modeling in Umple Can we simplify to just have ‘variations’? variation xxx { //Umple Code class X {} use gef.ump; requires aaa and bbb; // These are also included ( requires not ccc; // ccc cannot be present at the same time requires ddd or eee; // At least one of these is required requires fff xor ggg; // Either of these but not both // Rename elements from pattern using generics requires zzz Airplane>; } The above would synergistically combine with mixins T. Lethbridge CSER Separation of Concerns in Umple18

Conclusions Umple, as a text-based platform combining modeling and coding allows us to experiment with separation of concerns We have found basic mixin and aspect capabilities combined are very useful We believe the language may be improved by further synergistic additions: Limited extensions to mixins and aspects Simple variant capability But ‘loading on the features’ may be counterproductive T. Lethbridge CSER Separation of Concerns in Umple19

Questions? T. Lethbridge CSER Separation of Concerns in Umple20