Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 State Behavior Patrick Bailey Keith Vander Linden Calvin College.

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

Behavioral Modeling: State Diagrams CIS 4800 Kannan Mohan Department of CIS Zicklin School of Business, Baruch College Copyright © 2009 John Wiley & Sons,
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
UML State chart/machine diagram State machine diagram is a behavior diagram which shows discrete behavior of a part of designed system through finite state.
Statecharts Semantics
Mastering the Unified Modeling Language -- State Transition Diagrams -- © Josef Schiefer, IBM Watson.
©Katz-2004CS formal SpecificationsLecture--State machines 1 State Machines and Statecharts Formal Specifications CS Spring 2004 Shmuel Katz.
CS 425/625 Software Engineering System Models
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.
State Machine Diagrams (State Chart in UML 1) Specifying Control (ref: Chapter 11 Bennett, Mc Robb and Farmer)
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.
UML Distilled Martin Fowler. State Diagrams  State Transition Diagrams define a number of states and the transitions between the states.
THE OBJECT-ORIENTED DESIGN WORKFLOW Statechart Diagrams.
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.
© 2008 IBM Corporation Behavioral Models for Software Development Andrei Kirshin, Dolev Dotan, Alan Hartman January 2008.
Dilbert © United Feature Syndicate, Inc.. © Keith Vander Linden, Analysis ● Principles Principles ● Specification Specification – Unified modeling.
CS451 Introduction to Software Engineering Behavioral Modeling.
Ch.2 Part A: Requirements, State Charts EECE **** Embedded System Design.
- 1 - Embedded Systems—State charts Specifications.
Lecture 4 Finite State Machine CS6133 Software Specification and Verification.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Architecture: Component and Deployment Diagrams Patrick Bailey Keith Vander Linden Calvin College.
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,
Software Engineering 1 Object-oriented Analysis and Design Chap 29 UML State Machine Diagrams and Modeling.
NJIT Modeling Behavior in State Chart Diagrams Chapter 29 Rafael Mello.
Object State Modeling for Event- Driven Systems Yonglei Tao 1.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Architecture: Component and Deployment Diagrams Patrick Bailey Keith Vander Linden Calvin College.
Behavioral diagrams Lecture p4 T120B pavasario sem.
Object-Oriented Modeling Using UML CS 3331 Section 2.3 of Jia 2003.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 The Unified Modeling Language Patrick Bailey Keith Vander Linden Calvin College.
Ch. 2. Specification and Modeling 2.1 Requirements Describe requirements and approaches for specifying and modeling embedded systems. Specification for.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Interaction and Communication Diagrams Patrick Bailey Keith Vander Linden Calvin College.
OO Methodology Elaboration Iteration 3 – Part 2 Refining Models.
Information System Design IT60105
By: David Harel & Eran Grey Presenter: Elizabeth Antony CISC 836.
Chapter 29 State Machine Diagrams 1CS6359 Fall 2011 John Cole.
UML Discussion on State Machines Perfectly static system is intensely uninteresting Because nothing ever happens.
CSCI1600: Embedded and Real Time Software Lecture 7: Modeling II: Discrete Systems Steven Reiss, Fall 2015.
Documenting Control Problems with Statecharts Charles Wallace Michigan Technological University
CSE 403 Lecture 9 UML State Diagrams Reading:
States.
CS3773 Software Engineering Lecture 06 UML State Machines.
State Chart diagram Week objective Describe State chart Diagrams in Dynamic Modelling 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.
Modeling Object Lifecycles and State-Dependent Behavior ©SoftMoore ConsultingSlide 1.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Procedural Activity Patrick Bailey Keith Vander Linden Calvin College.
® IBM Software Group © 2009 IBM Corporation Module 11: Creating State Machine Diagrams Essentials of Modeling with IBM Rational Software Architect V7.5.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Discussion UML/Rhapsody’s Patrick Bailey Keith Vander Linden Calvin College.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 Classes and Objects Patrick Bailey Keith Vander Linden Calvin College.
State Machine Diagram.
Finite State Machines Dr K R Bond 2009
Dynamic Modeling of Banking System Case Study - I
State Machine Diagrams
UML State Diagrams.
UML dynamic Modeling (Behavior Diagram)
CSE 403 Lecture 9 UML State Diagrams Reading:
UML Activity Diagrams & State Charts
States.
CS/CPE 426 Senior Projects
CS/CPE 426 Senior Projects
Dynamic Modeling Lecture # 37.
States.
CS 791Z State Machines & Advanced State Machines
Modeling Behavior in Statechart Diagrams
Copyright © 2015, 2012, 2009 Elsevier Inc. All rights reserved.
Presentation transcript:

Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 State Behavior Patrick Bailey Keith Vander Linden Calvin College

Smith’s Aerospace © P. Bailey & K. Vander Linden, State Behavior ● Objects can display: – Reactive, state-independent behavior – Discrete, state-dependent behavior – Continuous behavior ● UML models this intra-object behavior using State Machine diagrams.

Smith’s Aerospace © P. Bailey & K. Vander Linden, State Machine Diagrams ● State diagrams can be specified for classes, use cases, or other systems. ● They specify object behavior over a number of use cases. ● Key elements: – States – Transitions

Smith’s Aerospace © P. Bailey & K. Vander Linden, Example: State Machine Diagram Example from August, 2005www.ilogix.com

Smith’s Aerospace © P. Bailey & K. Vander Linden, Outline ● History History ● State Diagrams State Diagrams ● Implementing State Transitions Implementing State Transitions ● Using State Diagrams Using State Diagrams

Smith’s Aerospace © P. Bailey & K. Vander Linden, ● Developed statecharts, a higraph-based amalgam of graphs and Venn diagrams. ● Statecharts are the basis of UML state machine diagrams. David Harel State Charts Image from August, 2005www. Harel’s original digital watch state chart

Smith’s Aerospace © P. Bailey & K. Vander Linden, States ● Use states to represent conditions of objects in time. ● Internal Activities: – On Entry – On Exit – Internal Transition – Do Activities

Smith’s Aerospace © P. Bailey & K. Vander Linden, Transitions ● Transitions indicate movement from one state to another. ● Syntax: event-name ( parameter-list ) [ guard-expression ] / action-list

Smith’s Aerospace © P. Bailey & K. Vander Linden, Transition Events ● Events that can trigger transitions include: – Signal events – Call events – Time events – Change events ● Transitions without events and guards are followed immediately.

Smith’s Aerospace © P. Bailey & K. Vander Linden, Super-States Use super-states to represent sets of states that share common transitions and activities.

Smith’s Aerospace © P. Bailey & K. Vander Linden, Action Execution Order ● Actions are executed in this basic order: – Exit actions – Transition actions – Entry actions ● In the context of super/sub-states, outer actions are executed before inner actions.

Smith’s Aerospace © P. Bailey & K. Vander Linden, And States & Or States ● We’ve already seen Or states. ● And states represent orthogonal state spaces. Example from Fowler, M., UML Distilled, 2004.

Smith’s Aerospace © P. Bailey & K. Vander Linden, Example

Smith’s Aerospace © P. Bailey & K. Vander Linden, Pseudo-States Pseudo-states are state- like constructions that represent a variety of things, including: – Conditions – History – Termination – Branching varieties

Smith’s Aerospace © P. Bailey & K. Vander Linden, Example

Smith’s Aerospace © P. Bailey & K. Vander Linden, Implementing State Diagrams Code generators can implement state behavior in several ways: – Nested switch statements – State pattern – State table

Smith’s Aerospace © P. Bailey & K. Vander Linden, Using State Diagrams ● State diagrams represent intra-object behavior. ● Combine them with other diagrams to represent inter-object behavior. ● Use them only for objects with “interesting” state-based behavior. ● Take care to avoid: – Ambiguous specifications – Race conditions