Advanced state modeling

Slides:



Advertisements
Similar presentations
State Charts Mehran Najafi. Reactive Systems A reactive, event-driven, object is one whose behavior is best characterized by its response to events dispatched.
Advertisements

Nested state diagrams:Problems with flat state diagram
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.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
FLOWCHART BASED DESIGN A flowchart is ideal for a process that has sequential process steps. The steps will be executed in a simple order that may change.
1 Statecharts for the many: Algebraic State Transition Diagrams Marc Frappier GRIL – Groupe de recherche en ingénierie du logiciel.
Interaction Diagrams - Chapter 15 Describe/illustrate sequence of message exchanges among objects that are working together to achieve some functionality.
Embedded Systems Details. Object Model: Four main system objects or classes Controller object might be made up of several controllers is the brains of.
Sept Ron McFadyen Interaction Diagrams - Chapter 15 Describe/illustrate sequence of message exchanges among objects that are working together.
State Diagram. What is State Diagram?  State diagram is used to show the state space of a given class, the events that cause a transition from one state.
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 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.
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.
1 Software Engineering Dr. K. T. Tsang Lecture 8 State modeling
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
Chapter 3 Digital Logic Structures. 3-2 Combinational vs. Sequential Combinational Circuit always gives the same output for a given set of inputs  ex:
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.
 Engineering Quality Software.  Today o State Diagrams Jerry Kotuba SYST30009-Engineering Quality Software 2.
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.
State Machines State diagrams SE-2030 Dr. Mark L. Hornick 1.
State Machine Diagram Chapter 5 Introduction Pages
Chapter - State Based Design Systems have modes of operation. The controller should move sequentially between these states.
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
Review for Midterm, Fall 2009
State Machine Diagrams
UML State Diagrams.
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
Marlon Dumas Institute of Computer Science
States.
CSCI1600: Embedded and Real Time Software
Advanced state modeling
CS 791Z State Machines & Advanced State Machines
Identifying & Creating Use Cases - Part 3
Modeling Behavior in Statechart Diagrams
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

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

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

Exercise 2 Fix and simplify this state machine 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 Intro | Building Blocks | Advanced

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

This transition can only be fired when A.C is in M state Synchronization Orthogonal regions/states can be synchronized via transition guards This transition can only be fired when A.C is in M state State modeling -- Marlon Dumas

Class aggregation and their state diagrams A state diagram is a collection of state diagrams Class aggregation will usually require to combine the state diagrams of all parts The whole can be thought as a set of orthogonal regions! 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