Advanced state modeling

Slides:



Advertisements
Similar presentations
Nested state diagrams:Problems with flat state diagram
Advertisements

Behavioral Modeling: State Diagrams CIS 4800 Kannan Mohan Department of CIS Zicklin School of Business, Baruch College Copyright © 2009 John Wiley & Sons,
Vered Gafni – Formal Development of Real Time Systems 1 Statecharts Semantics.
Week 6Fall 2001 CS5991 The STATEMATE Semantics of Statecharts D. Harel and A. Naamand Ahmad Alsawi 1-4 Bob Chen 5-8 Dapeng Xie 9-11.
Statecharts Slide: 1. Objectives Learn the concepts for modeling object states Learn Statechart notation to depict object state models Do some modelling…
1 Statecharts for the many: Algebraic State Transition Diagrams Marc Frappier GRIL – Groupe de recherche en ingénierie du logiciel.
Embedded Systems Details. Object Model: Four main system objects or classes Controller object might be made up of several controllers is the brains of.
1 CS 691z/791z Topics in Software Engineering Chapter 20: Advanced Statechart Modeling [Arlow and Neustadt, 2002] March 8, 2007.
1 CS/CPE 426 Senior Projects Chapter 21: State Machines Chapter 22:Advanced State Machines [Arlow and Neustadt 2005] March 24, 2009.
THE OBJECT-ORIENTED DESIGN WORKFLOW Statechart Diagrams.
1Spring 2005 Specification and Analysis of Information Systems Specifying State-based Behavior With UML Statechart Diagrams Eran Toch
CS 290C: Formal Models for Web Software Lecture 2: Modeling States with Statecharts Instructor: Tevfik Bultan.
Advanced Behavioral Modeling
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.
SE-565 Software System Requirements More UML Diagrams.
1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops.
State Machines State diagrams SE-2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
State Machine Diagram Chapter 10. State Machine Diagram Used to describe system behavior.
Lecture 4 Finite State Machine CS6133 Software Specification and Verification.
Chapter 10 State Machine Diagrams
מידול התנהגותי 1. Today’s Session Sequence Diagrams State Machines 2.
1 Object-Oriented Modeling Using UML (2) CS 3331 Fall 2009.
UML / UML 2.0 Diagrams (Part III) 1. Sequence diagram is the most common kind of interaction diagram. It focuses on the message interchange between a.
Business Informatics Group Institute of Software Technology and Interactive Systems Vienna University of Technology Favoritenstraße 9-11/188-3, 1040 Vienna,
NJIT Modeling Behavior in State Chart Diagrams Chapter 29 Rafael Mello.
Fall 2010 CS4310 Requirements Engineering UML: Dynamic Modeling Dr. Guoqiang Hu Department of Computer Science UTEP 1.
Object-Oriented Modeling Using UML CS 3331 Section 2.3 of Jia 2003.
11 Software Engineering Dr. K. T. Tsang Lecture 9 Advance State Modeling
The Unified Modeling Language Part II Omar Meqdadi SE 2730 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Information System Design IT60105
1 Kyung Hee University Statecharts Spring Kyung Hee University Specifying Objects’ Behaviour  Interaction diagrams show message-passing behaviour.
Object Oriented Analysis & Design & UML (Unified Modeling Language)1 Part VI: Design Continuous Activity Diagams State Diagrams.
CSCI1600: Embedded and Real Time Software Lecture 7: Modeling II: Discrete Systems Steven Reiss, Fall 2015.
State Modeling. Events An event is an occurrence at a point in time, such as user depresses left button or.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 UML State Diagrams.
States.
CS3773 Software Engineering Lecture 06 UML State Machines.
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.
MCS 270 Spring 2014 Object-Oriented Software Development.
State Machines State diagrams SE-2030 Dr. Mark L. Hornick 1.
State Machine Diagram Chapter 5 Introduction Pages
1 7 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 7 The Object-Oriented Approach to Requirements.
Chapter - 6 Advanced State Modeling
Miguel Garzón, University of Ottawa Based on Powerpoint slides by Gunter Mussbacher with material from: K.E. Wiegers, D. Leffingwell & D. Widrig, M. Jackson,
® IBM Software Group © 2009 IBM Corporation Module 11: Creating State Machine Diagrams Essentials of Modeling with IBM Rational Software Architect V7.5.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Advanced UML State Diagrams.
Object-Oriented Analysis and Design
Marlon Dumas Institute of Computer Science
Concurrent Systems Modeling using Petri Nets
Chapter 5: MACHINATIONS
Review for Midterm, Fall 2009
7. State Diagram SWE SOFTWARE PROCESS MODELING - AMAN QUADRI.
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Advanced state modeling
State Machine Diagrams
UML State Diagrams.
Lesson 16: State-Based Sequential Design
Presented by: Huston Bokinsky Ying Zhang 25 April, 2013
UML Activity Diagrams & State Charts
System models October 5, 2005.
States.
CS/CPE 426 Senior Projects
Advanced State Chart diagrams
CS/CPE 426 Senior Projects
Cs212: Data Structures Computer Science Department Lecture 6: Stacks.
Marlon Dumas Institute of Computer Science
States.
CSCI1600: Embedded and Real Time Software
CS 791Z State Machines & Advanced State Machines
Identifying & Creating Use Cases - Part 3
Presentation transcript:

Advanced state modeling Marlon Dumas Institute of Computer Science

How does a washing machine work? On/off (power) button. Start button (no stop button!) Light indicates current stage soaking, rinsing, draining, drying Three washing plans that can be changes using a “mode” button: Regular Delicate (no soaking) Super delicate (no soaking, no drying) Off can be pushed only: before starting or after finishing State modeling -- Marlon Dumas

Statechart for the washing machine State modeling -- Marlon Dumas

State explosion and history What if the “power” button can be clicked at anytime? What if we want to come back to the same state we left? State modeling -- Marlon Dumas

State explosion If we have “n” classes with “m” (boolean) attributes each (let’s assume that all classes have the same number of attributes) Possible states of the whole system = 2nm State modeling -- Marlon Dumas

Abstraction in Statecharts Factor out common behavior Segregate independent behavior Remember history Composite States Orthogonal/ Parallel States History pseudo-states © Eran Torch, Technion

The transition can be fired from any internal state Composite states The transition can be fired from any internal state State modeling -- Marlon Dumas

Exercise 1 Group “FlashOn” and “FlashOff” states into a composite state “Flashing” State modeling -- Marlon Dumas

Exercise 2 Fix and simplify this statechart State modeling -- Marlon Dumas

Exercise 3 Simplify this statechart State modeling -- Marlon Dumas

History pseudo-state H H* Return to a previously visited hierarchical state Shallow history: just the current level Deep history: includes all nested states Sometimes it is useful to clear history: clear-history(state) clh(state) clear-history(state*) clh(state*) H H* State modeling -- Marlon Dumas

Back to the washing machine… State modeling -- Marlon Dumas

Washing machine with “history” State modeling -- Marlon Dumas

Shallow vs. Deep history State modeling -- Marlon Dumas

Exercise 4 Revise the follow statechart such that: There is no flash button. The only way to make the lamp flash is to push the “on” button when we are in the LampOn state To stop flashing, we must push on the “on” button or the “off” button If we push “off” while the lamp is flashing, and then we push “on”, the lamp re-starts flashing State modeling -- Marlon Dumas

Note on transition precedence Two or more transitions may have the same event trigger inner transition takes precedence if no transition is triggered, event is discarded State modeling -- Marlon Dumas

Order of activities in nested models Same approach as for the simple case Execution sequence: exS11 exS1  actEenS2  initS2  enS21 State modeling -- Marlon Dumas

Independent behavior Multiple simultaneous perspectives on the same entity State modeling -- Marlon Dumas

Parallelism: States with orthogonal regions Combine multiple simultaneous descriptions State modeling -- Marlon Dumas

Parallelism: States with orthogonal regions All mutually orthogonal regions detect the same events and respond to them “simultaneously” usually reduces to interleaving of some kind State modeling -- Marlon Dumas

“Flat” vs. Parallel State Machines Every parallel machine can be transformed into a sequential machine: B C E G F A D a b g d m [in G] With Orthogonal Regions C,F C,E C,G B,G B,E B,F a b g d m Without Orthogonal Regions

Exercise 5: Rewrite this without parallel regions State modeling -- Marlon Dumas

Synchronization across orthogonal regions Orthogonal regions/states can be synchronized via conditions of the form “region in a state” This transition can only be fired when A.C is in M state Note: In Yakindu the syntax for checking if region A.C is in state M is as follows: [active(A.C.M)] State modeling -- Marlon Dumas

Readings & Resources Last week: Blaha & Rumbaugh, Chapter 5 This week: Blaha & Rumbaugh, Chapter 6 State modeling -- Luciano García-Bañuelos