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
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

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.
Dynamic Modeling. Dynamic Modeling with UML Interaction diagram –Dynamic behavior of a set of objects arranged in time sequence –Interaction between objects.
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.
K. Stirewalt CSE 335: Software Design Administrivia Homework #7 on web –A “tour” rather than a working project –Please look through it and try to understand.
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.
SE-565 Software System Requirements More UML Diagrams.
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
An Introduction to Rational Rose Real-Time
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
CS3320::CH111 OBJECT-ORIENTED ANALYSIS Chapter 11.
Guide to State Transition Diagram. 2 Contents  What is state transition diagram?  When is state transition diagram used?  What are state transition.
1 Relational Expressions Relational expressions: –Expressions that compare operands –Sometimes called conditions –Evaluated to yield a result –Typically.
CSE 251 Dr. Charles B. Owen Programming in C1 States and State Machines.
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.
Information System Design IT60105
Communicating Real-Time State Machines (CRSM) State machines that communicate synchronously Unique unidirectional channels are used for the communication.
UML Discussion on State Machines Perfectly static system is intensely uninteresting Because nothing ever happens.
STATE MODELING | Website for Students | VTU - Notes - Question Papers | RESULTS | NEWS.
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.
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.
The Dynamic Analysis Model StateCharts Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
Module 2 OOMD.
York University Department of Computer Science © Castro, Mylopoulos and Easterbrook Lecture 11: Modelling “State”  What is State?  statespace.
State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.
1 Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
State Machine Model.
State Machine Diagrams
Marlon Dumas Institute of Computer Science
Object Oriented Modeling and Design
State Machine Diagrams
Software Architecture and Larger System Design Issues
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 ocurrences. Examples of error events: »Motor jammed »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 fro 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 ay or ay not chose 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 object, 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 tie 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 liasibilities. 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 parade 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 fro 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

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 froma state or upon some event within a state.

Examples

Case study