Modelling Features as Statecharts Pourya Shaker and Joanne M. Atlee.

Slides:



Advertisements
Similar presentations
Formal Methods of Systems Specification Logical Specification of Hard- and Software Dr. Armin Wolf Fraunhofer Institut für Rechnerarchitektur.
Advertisements

© 2005 by Prentice Hall Appendix 3 Object-Oriented Analysis and Design Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George.
Design by Contract.
Use Case Diagrams Damian Gordon.
COMMUNICATING SEQUENTIAL PROCESSES C. A. R. Hoare The Queen’s University Belfast, North Ireland.
Models of Concurrency Manna, Pnueli.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Use Case & Use Case Diagram
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der.
Object-Oriented Analysis and Design
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 5, Analysis: Dynamic Modeling.
Slide 10B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented design 2.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
THE OBJECT-ORIENTED DESIGN WORKFLOW Statechart Diagrams.
7. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Detailed Object-Oriented Requirements Definitions  System Processes—A Use.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 10: Statecharts.
Designing with Interaction and Design Class Diagrams Chapters 15 & 16 Applying UML and Patterns Craig Larman With some ideas from students in George Blank’s.
An Introduction to Rational Rose Real-Time
UI/UI PROTOTYPE GENERATION Sum Pham. C ONTENTS Framework overview Current approaches Introduce a model-driven user interface generation.
Chapter 14: Object-Oriented Data Modeling
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
Copyright GoldSim Technology Group LLC, 2005 Slide 1 Introduction to the GoldSim Reliability Module GoldSim Technology Group Issaquah, Washington USA.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
A First Program Using C#
Lecture 4 Finite State Machine CS6133 Software Specification and Verification.
Timed UML State Machines Ognyana Hristova Tutor: Priv.-Doz. Dr. Thomas Noll June, 2007.
מידול התנהגותי 1. Today’s Session Sequence Diagrams State Machines 2.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Systems Analysis and Design in a Changing World, Fifth Edition
Systems Analysis and Design in a Changing World, 6th Edition
Dynamic Modeling Chapter 11 Part of Analysis Modeling Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001)
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Conceptual Modelling – Behaviour
Systems Analysis and Design in a Changing World, 3rd Edition
L6-S1 UML Overview 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
The Unified Modeling Language Part II Omar Meqdadi SE 2730 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
SWT - Diagrammatics Lecture 4/4 - Diagramming in OO Software Development - partB 4-May-2000.
1 Kyung Hee University Diagram Editor : Design View Spring 2001.
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Design Patterns VIII Chain of Responsibility, Strategy, State.
Object Oriented Analysis & Design & UML (Unified Modeling Language)1 Part VI: Design Continuous Activity Diagams State Diagrams.
Systems Analysis and Design in a Changing World, Fourth Edition
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
 In the java programming language, a keyword is one of 50 reserved words which have a predefined meaning in the language; because of this,
Chapter 5 System Modeling. What is System modeling? System modeling is the process of developing abstract models of a system, with each model presenting.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 10: Statecharts.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 6: Restaurant.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
Engineering Quality Software Week02 J.N.Kotuba1 SYST Engineering Quality Software.
Design Review.
Systems Analysis and Design in a Changing World, Fourth Edition
Appendix 3 Object-Oriented Analysis and Design
Case Study -- Weather system
Business System Development
UML Activity Diagrams & State Charts
Lec 3: Object-Oriented Data Modeling
Chapter 20 Object-Oriented Analysis and Design
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
Engineering Quality Software
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
Appendix 3 Object-Oriented Analysis and Design
Formal Methods in Software Engineering 1
Presentation transcript:

Modelling Features as Statecharts Pourya Shaker and Joanne M. Atlee

Feature-Oriented Requirements Modelling Research study will evaluate the readability and writeability of two approaches to modelling features –Model a feature AND its context –Model just the feature (state its context) Time Commitment: 2 hours –50 minute tutorial on modelling language (July 17 th ) –50 minute questionnaire about models (July 24 th ) –$30 renumeration Asked to consent us to use questionnaire answers in thesis or publication –Can withdraw consent at any time –Can withdraw from study at any time

Agenda Remember SE463? – A reference model for requirements engineering – Modelling requirements using UML class and statechart models Feature-oriented software development FORML: A feature-oriented requirements modelling language – Two approaches to evolving FORML models with new features Overview of questionnaire

A Requirements Engineering Framework Requirements – desired goals or behaviour

A Requirements Engineering Framework Requirements – desired goals or behaviour Requirements – desired changes to the world – Expressed in terms of world phenomena World (aka domain, environment) Software System Requirements World Phenomena Software-System Phenomena Interface Phenomena

Modelling Requirements Using UML The world can be modelled as a UML class diagram

Modelling Requirements Using UML The world can be modelled as a UML class diagram

Modelling Requirements Using UML The requirements can be modelled as UML state machines – Events, guards, and actions in terms of world phenomena

Feature-Oriented Software Development (FOSD) Stakeholders (e.g., users, developers) often think of a software system in terms of its features – Feature – a coherent bundle of functionality (e.g., call waiting, call forwarding, voice mail) FOSD – advocates the use of features as first-class entities throughout the lifecycle of a software system – Make features explicit in software artefacts (e.g., code, design models, requirements models)

FORML: A Feature-Oriented Requirements Modelling Language World Model Behaviour Model feature modules events & conditions actions FOSD + UML-based requirements modelling

Example A telephone system with a basic-call service (BCS) feature – Responds to user commands to start, accept, and end calls – Notifies users about the callees status

FORML World Model feature: groups shared phenomena by features software system

FORML: A Feature-Oriented Requirements Modelling Language World Model Behaviour Model feature modules events & conditions actions

World States The inputs and outputs of the behaviour model are over world states – instances of the world model, representing a possible snapshot of the world

BCS Feature Module One statechart instance per TelephoneSystem object Keyword this refers to the TelephoneSystem object of a statechart instance

BCS Feature Module Transition Labels: id: e [c] / id 1 : [c 1 ] a 1, …, id n : [c n ] a n Transition or action name Triggering event: world-change event Guard condition: world-state conditions Action: world-change action macros

FORML World Model

Adding a New Feature to a FORML Model Example: adding the requirements of call-forwarding on busy (CFB) to the model in the previous slides – CFB: when a user of a telephone system receives a call while he/she is busy (i.e., already in a call), forward the call to a designated user of a different telephone system Update the world model (new phenomena) Add a new feature module to the behaviour model (add new behaviours, modify existing behaviours)

Alternative Approaches to Modelling New Features Approach 1 – The requirements of a new feature can always be specified as a complete statechart Approach 2 – But sometimes, it is convenient to specify a new features requirements as differences with the requirements of existing features – i.e., as statechart fragments that extend the feature modules of existing features

Approach 1: CFB as a Complete Statechart Updated World Model CFB Feature Module override action a2 of transition t7 in the BDS feature module updates

BCS Feature Module

Approach 1: Composed Behaviour model in parallel with

Approach 2: CFB as Statechart Fragments Updated World Model CFB Feature Module updates add actions a1, a2, and a3 to transition t7 in the BDS feature module

Approach 2: Composed Behaviour Model element names qualified with the name of the feature module in which they were introduced CFB extensions of BDS feature module

Statechart Fragments F1 feature module F2 feature module Composed model

Statechart Fragments F1 feature module F2 feature module Composed model new region existing state

Statechart Fragments F1 feature module F2 feature module Composed model new transition and destination state existing region and source state

Statechart Fragments F1 feature module F2 feature module Composed model new action existing transition

Statechart Fragments F1 feature module F2 feature module Composed model new strengthening clause existing transition

Statechart Fragments F1 feature module F2 feature module Composed model new weakening clause existing transition

Statechart Fragments F1 feature module F2 feature module Composed model new strengthening clause existing action

Statechart Fragments F1 feature module F2 feature module Composed model new weakening clause existing action

FORML: A Feature-Oriented Requirements Modelling Language World Model Behaviour Model feature modules events & conditions actions How are these expressed?

World-State Expressions Basic Set Expressions: – Calls : the set of Call objects – this : the TelephoneSystem object of a statechart instance – o : an world-change event parameter Selection – Calls[voice = true] : the set of Call objects whose voice attribute has the value true

World-State Expressions Basic Set Expressions: – Calls : the set of Call objects – this : the TelephoneSystem object of a statechart instance – o : an world-change event parameter Selection – Calls[voice = true] : the set of Call objects whose voice attribute has the value true

World-State Expressions Navigation – set-expr.feature-name this.BCS – set-expr.association-name.role-name this.BCS.Processing.Call – set-expr.attribute-name this.BCS.Processing.Call.voice – set-expr.role-name this.BCS.Processing.Call.caller

World-State Expressions Navigation – set-expr.feature-name this.BCS – set-expr.association-name.role-name this.BCS.Processing.Call – set-expr.attribute-name this.BCS.Processing.Call.voice – set-expr.role-name this.BCS.Processing.Call.caller

World-State Expressions Navigation – set-expr.feature-name this.BCS – set-expr.association-name.role-name this.BCS.Processing.Call – set-expr.attribute-name this.BCS.Processing.Call.voice – set-expr.role-name this.BCS.Processing.Call.caller

World-State Expressions Navigation – set-expr.feature-name this.BCS – set-expr.association-name.role-name this.BCS.Processing.Call – set-expr.attribute-name this.BCS.Processing.Call.voice – set-expr.role-name this.BCS.Processing.Call.caller

World-State Expressions Set, boolean, and integer operations: Binary Set OpsSet-Cardinality PredicatesBoolean OpsInteger Ops + (union)no set-expr (set has zero elements) and# set-expr (number of elements in set) - (intersection)one set-expr (set has exactly one element) or=>, =< = (equals)lone (set has zero or one elements) implies>, < in (subset of)some (set has one or more elements) iff== not!=

World-State Expressions World-change events – s ? M(o) : message o sent to a system s this ? StartCall(o) – C+(o) : object o of type C added to world state Call+(o) – C-(o) : object o of type C removed from world state Call-(o) – C.a~(o): attribute a of object o of type C changed value Call.voice~(o)

World-State Expressions World-change actions – o = +C(a 1 = exp 1,..., a n = exp n ) creates a C object (that can be referenced by the variable o) whose attributes a i have values exp i o = +User() – +A(a 1 = exp 1,..., a n = exp n, r 1 = o 1,..., r m = o m ) creates an A link that relates objects o j in roles r j, and whose link attributes a i have values exp i c = +Call(caller = set-expr, callee = set-expr, voice = false)

World-State Expressions World-change actions – s ! M(p 1 = exp 1,..., p n = exp n ) creates an M message object sent by system s whose parameters p i have values exp i this ! Busy() – -o removes the objects o and their dependent links -Calls[voice = true] – o.a := exp changes the value of os attribute a to value exp o.voice := true

Transition and Action Overrides

An action override specifies a new action, a2, that overrides an existing action, F{a1} in a transition t in feature-module F. – F{t} : / a2: override(a1) [c] – Literally, this states that whenever Fs transition t executes, action a2 is performed in place of a1 provided that the guard condition c is true.

Transition and Action Overrides Transition priority: specifies that a new transition, t2, has priority over an existing transition, F{t1} in feature module F, whenever both are simultaneously enabled. – t2 > F{ t1} :... Transition override: specifies that a new transition, t2, that overrides an existing transition, F{t1} in feature-module F. An override differs from a transition priority in that the enabling condition of t2 is implicitly the same as that of t1, but could be strengthened with an additional guard c: – t2 : override(F{t1}) [c] /... – Literally, this states that whenever Fs transition t1 is enabled, t2 executes instead provided that the behaviour model is in t2s source state and guard condition c is true.

Questionnaire You will be asked to perform model-reading and writing tasks with respect to one of the two approaches to adding a new feature to a FORML model of TelephoneSystem with BCS Model-reading task: – Reading-comprehension questions about a given model of a new feature added to TelephoneSystem Model-writing task: – Modelling of a new feature added to TelephoneSystem

Thank you for your participation! Any Questions? Slides will be made available at: Also, please feel free to contact me (Pourya) at or Joanne M. Atlee at with any questions about this presentation or about the study