State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.

Slides:



Advertisements
Similar presentations
NCKU EE RTES LAB.1 Unified Modeling Language - Events and State Machines.
Advertisements

1 CIS224 Software Projects: Software Engineering and Research Methods Lecture 6 State Machine and Activity Diagrams (Based on Stevens and Pooley (2006,
State Charts Mehran Najafi. Reactive Systems A reactive, event-driven, object is one whose behavior is best characterized by its response to events dispatched.
Concepts & Notations. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
Behavioral Modeling: State Diagrams CIS 4800 Kannan Mohan Department of CIS Zicklin School of Business, Baruch College Copyright © 2009 John Wiley & Sons,
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.
ESE Einführung in Software Engineering 7. Modeling Behaviour Prof. O. Nierstrasz.
Introduction to Software Engineering 7. Modeling Behaviour.
State Diagrams A state diagram is a graph whose nodes are states and whose directed arcs are transitions between states. A state diagram specifies the.
State Transition Diagrams
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.
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.
Logic Based LSC Consistency Testing Presenter: Anup Niroula.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 5, Analysis: Dynamic Modeling.
Software engineering Methods Software Engineering Methods State Diagrams Zvi Avidor Written By With additions by Zvika Gutterman and Adam Carmi.
THE OBJECT-ORIENTED DESIGN WORKFLOW Statechart Diagrams.
Advanced Behavioral Modeling
SE-565 Software System Requirements More UML Diagrams.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
Unified Modeling Language(UML) BY
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
Lecture 4 Finite State Machine CS6133 Software Specification and Verification.
Chapter 10 State Machine Diagrams
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
מידול התנהגותי 1. Today’s Session Sequence Diagrams State Machines 2.
1 Object-Oriented Modeling Using UML (2) CS 3331 Fall 2009.
E. Kraemer CSE 335: Software Design Software Architecture and Larger System Design Issues Lecture 5: Finite state modeling and analysis Topics: –Using.
Fall 2010 CS4310 Requirements Engineering UML: Dynamic Modeling Dr. Guoqiang Hu Department of Computer Science UTEP 1.
State Modeling.
1 Software Engineering Dr. K. T. Tsang Lecture 8 State modeling
Guide to State Transition Diagram. 2 Contents  What is state transition diagram?  When is state transition diagram used?  What are state transition.
Object-Oriented Modeling Using UML CS 3331 Section 2.3 of Jia 2003.
1 State Modeling  Events  States  Transitions and Conditions  State Diagrams  State Diagram Behavior  Practical Tips.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
Information System Design IT60105
Software Engineering Design & Modeling Statechart Diagram.
UML Discussion on State Machines Perfectly static system is intensely uninteresting Because nothing ever happens.
State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.
STATE MODELING | Website for Students | VTU - Notes - Question Papers | RESULTS | NEWS.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Object Oriented Analysis & Design & UML (Unified Modeling Language)1 Part VI: Design Continuous Activity Diagams State Diagrams.
OMT Modeling 1. Object Model : presented by the object model and the data dictionary. 2. Dynamic Model: presented by the state diagrams and event flow.
State Modeling. Events An event is an occurrence at a point in time, such as user depresses left button or.
Dynamic Models Sequence Diagrams Collaboration Diagrams Activity Diagrams.
Systems Analysis and Design in a Changing World, Fourth Edition
States.
CS3773 Software Engineering Lecture 06 UML State Machines.
Interaction Diagram An interaction diagram is a graphical representation of interactions between objects. Sequence diagram: shows the sequence in which.
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.
Modeling Object Lifecycles and State-Dependent Behavior ©SoftMoore ConsultingSlide 1.
Dynamic Models - Page L M.E. Fayad Lesson 30: Dynamic Models Object- Oriented Modeling & Application s.
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.
1 7 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 7 The Object-Oriented Approach to Requirements.
Module 2 OOMD.
York University Department of Computer Science © Castro, Mylopoulos and Easterbrook Lecture 11: Modelling “State”  What is State?  statespace.
1 Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
State transition modeling
State Machine Model.
State Machine Diagrams
Marlon Dumas Institute of Computer Science
Object Oriented Modeling and Design
State Machine Diagrams
States.
Object Oriented System Design
Chapter 5 state Modeling
Marlon Dumas Institute of Computer Science
States.
CHAPTER 2 Object-Oriented Modeling Using UML (Continued)
UML State Diagrams.
Presentation transcript:

State Modeling

Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations do, what they operate on, or how they are implemented. Changes to objects and their relationships over time should be examined. A state model consists of multiple state diagrams, one for each class with temporal behavior that is important to an application. A state diagram relates events and states. Events represent external stimuli States represent values of (attributes) objects

Events (1) An event is an occurrence at a point of time Examples: –User depresses left button –Flight 123 departs from Amman –Power turned on –Alarm set –Paper tray becomes empty Events corresponds to verb in the past tense or the onset of some condition. By definition an event happens instantaneously. The time at which an event occurs is an implicit attribute of the event.

Events (2) One event may logically precede or follow another, or the two events are unrelated. Events that are causally unrelated are said to be concurrent. Events include error conditions as well as normal occurrences. Examples of error events: »Transaction aborted »Timeout There are several kinds of events. The most common are: »Signal event »Change event »Time event

Signal Events (1) A signal is a one-way transmission of information from one object to another object. It is different from a function call that returns a value An object sending a signal to another object may expect a reply, but the reply is a separate signal under the control to the second object, which may or may not choose to send it. A signal event is the event of sending or receiving a signal. In general we are more concerned about the receipt of a signal because it causes effects in the receiving object. Difference between signal and signal event: the first one is a message between objects, the second one is an occurrence in time.

Signal Events (2) Signal classes and Attributes:

Change Event A change event is an event that is caused by the satisfaction of a boolean expression. The intent of a change event is that the expression is continually tested and whenever the expression changes from false to true the event happens. (an implementation would not continuously check a change event) Examples:

Time event A time event is an event caused by the occurrence of an absolute time or the elapse of a time interval. Examples:

States A state is an abstraction of the values and the links of an object. Sets of values and links are grouped together into a state according to the gross behavior of objects. Example: The state of an bank is either solvent or insolvent, depending on whether its assets exceed its liaibilities. States often correspond to: – verbs with a suffix ‘ing’: waiting, dialing.. –Or the duration of some condition: powered, below freezing.

States Notation: The objects in a class have a finite number of possible states. One or possibly larger number. Each object can only be in one state at time. Objects may go through one to more states in their lifetime A state specifies the response of an object to input events. The response may include the invocation of a behavior or a change of state.

States Event versus State: Both events and states depend on the level of abstraction

State States may be characterized in various ways. Here one way to characterize states:

Transitions and Conditions A transition is an instantaneous change from one state to another. The transition is said to fire upon the change from the source state to the target state. Usually the origin and target states are different but may be the same. A transition occurs when its event occurs, unless an optional guard condition causes the event to be ignored. A guard condition is a Boolean expression that must be true in order for a transition to occur. The choice of next state depends on both the source state and the event received.

Transitions and conditions Guarded transition

State Diagram A state diagram is a graph whose nodes are states and whose directed arcs are transitions between states. A state diagram specifies or describes the state sequence caused by event sequences. State names must be unique within the scope of the state diagram. All objects in a class execute the state diagram for that class. The class state diagram models the common behavior of the class objects.

State diagram example

Activity An activity is behavior than can be executed in response to an event. An activity can be performed upon a transition, upon the entry to or exit from a state or upon some event within a state.

Examples

Complete Transition –Often the sole purpose of a state is to perform a sequential activity. –When the activity is completed a transition to another state occurs. –An arrow without event name indicates an automatic transition that fires when the activity associated with the source state is completed.

Sending signals An object can perform the activity of sending a signal to another object. A signal can be directed to a set of objects or to a single one. If the target is a set of objects, each of them will receive a separate copy of the signal concurrently and each of them independently processes the signal and determines whether to fire the transition. If an object receives signals from more than an object, the order in which concurrent signals may affect the final state.

Case study