CS451 Introduction to Software Engineering Behavioral Modeling.

Slides:



Advertisements
Similar presentations
Chapter 5 – System Modeling
Advertisements

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.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Figures – Chapter 5. Figure 5.1 The context of the MHC-PMS.
1 Lecture 4 Behaviour Modelling Requirement Specification Object-Oriented Paradigm.
Ch5: Software Specification. 1 Dynamic modeling using UML  Static models:  Dynamic models:
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
THE OBJECT-ORIENTED DESIGN WORKFLOW Statechart Diagrams.
Advanced Behavioral Modeling
SE-565 Software System Requirements More UML Diagrams.
Chapter 5 – System Modeling 1Chapter 5 System modeling.
Chapter 5 System modeling Chapter 5 – System Modeling Lecture 1 1.
Lesson 3 ANALYSIS MODELLING.
Software Engineering 8. System Models.
Chapter 5 – System Modeling
Chapter 5 – System Modeling 1Chapter 5 System modeling.
Chapter 5 – System Modeling Lecture 1 1Chapter 5 System modeling.
Chapter 5 – System Modeling
Lecture 4 Finite State Machine CS6133 Software Specification and Verification.
Chapter 10 State Machine Diagrams
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Real-Time Systems time dependent control oriented driven by events rather than data.
1 Object-Oriented Modeling Using UML (2) CS 3331 Fall 2009.
Lecture 6 Systems Modeling
Chapter 5 – System Modeling
1 Software Engineering Dr. K. T. Tsang Lecture 8 State modeling
Chapter 5 – System Modeling 1Chapter 5 System modeling CS 425 October 13, 2011 Ian Sommerville, Software Engineering, 9 th Edition Pearson Education, Addison-Wesley.
Behavioral diagrams Lecture p4 T120B pavasario sem.
Object-Oriented Modeling Using UML CS 3331 Section 2.3 of Jia 2003.
 Chapter 5 System Modeling 1. Context Model  Shows context (environment) of proposed system  Other software  People  Roadmap of major areas to consider.
Rekayasa Perangkat Lunak (Software Engineering) M.Sukrisno Mardiyanto Kuliah Umum Universitas Dian Nuswantoro Semarang, 16 Oktober 2008.
Chapter 5 System Modeling (2/2) Yonsei University 2 nd Semester, 2014 Sanghyun Park.
Chapter 12 Analysis Modeling
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Chapter 5 – System Modeling Chapter 5 System Modeling1 CS 425 October 20, 2015 Ian Sommerville, Software Engineering, 10 th Edition Pearson Education,
Chapter 5 – System Modeling 1Chapter 5 System modeling CS 425 October 18, 2010 Ian Sommerville, Software Engineering, 9 th Edition Pearson Education, Addison-Wesley.
Chapter 5 – System Modeling
Systems Analysis and Design in a Changing World, Fourth Edition
States.
UML: State Chart Diagrams
CS3773 Software Engineering Lecture 06 UML State Machines.
Unit 4 – System Modeling 1Chapter 5 System modeling.
Chapter 5 – System Modeling Chapter 5 System Modeling130/10/2014.
Software Engineering Lecture 6 – System Modelling
Chapter 5 – System Modeling Lecture 9 Section A 27/4/2015 Section B 29/4/2015 1Chapter 5 System modeling.
Software Engineering for Embedded Systems Lecture 12.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
1 8.1 Requirements Analysis Rules of Thumb Rules of Thumb Models should focus on requirements that are visible within the problem or business domain. The.
EKT 421 SOFTWARE ENGINEERING
State transition modeling
State Machine Model.
State Machine Diagram.
Marlon Dumas Institute of Computer Science
BM by States class / System
Requirements Modeling: Flow, Behavior, Patterns, and WebApps
Chapter 8 Building the Analysis Model (2) Analysis Modeling
Chapter 5 – System Modeling
IS301 – Software Engineering V:
UML State Diagrams.
Software Engineering Chapter 5 (Part 3) System Modeling Dr.Doaa Sami.
CSC 422 Kutztown University Dr. Spiegel
States.
Object Oriented System Design
CS310 Software Engineering Dr.Doaa Sami
Marlon Dumas Institute of Computer Science
States.
UML State Diagrams.
Chapter 5 System modeling Chapter 5 – System Modeling Lecture 2 1.
Presentation transcript:

CS451 Introduction to Software Engineering Behavioral Modeling

Outside world Application events behavior

Behavioral Modeling Make a list of the different states of a system (How does the system behave?) Indicate how the system makes a transition from one state to another (How does the system change state?) –indicate event –indicate action Draw a state transition diagram

The States of a System state—a set of observable circumstances that characterizes the behavior of a system at a given time state transition—the movement from one state to another event—an occurrence that causes the system to exhibit some predictable form of behavior action—process that occurs as a consequence of making a transition

State Transition Diagram Notation state new state event causing transition action that occurs

State Transition Diagram reading operator commands making copies reloading paper problem state full invoke read-op-input full and start invoke manage-copying copies done invoke read-op-input empty invoke reload paper jammed invoke problem-diagnosis not jammed invoke read-op-input

Control Model The control flow diagram is "superimposed" on the DFD and shows events that control the processes noted in the DFDThe control flow diagram is "superimposed" on the DFD and shows events that control the processes noted in the DFD Control flowsControl flows –Events and control items—by dashed arrows –A vertical bar implies an input to or output from a control spec (CSPEC) — a separate specification that describes how control is handled –A dashed arrow entering a vertical bar is an input to the CSPEC –A dashed arrow leaving a process implies a data condition –A dashed arrow entering a process implies a control input read directly by the process Control flows do not physically activate/deactivate the processes—this is done via the CSPECControl flows do not physically activate/deactivate the processes—this is done via the CSPEC

Control Flow Diagram

UML: Behavioral modeling Activity Diagrams Statechart Diagrams Interaction Diagrams

UML: State Diagram Shows the behavior of one object How does it change its state based on the messages it receives, narrowly focused, fine-grained State : condition/situation during lifetime of an object State transition : relationship indicating a state change (atomic & non interruptible) Action : atomic & non-interruptible Over drafted ok deposit withdraw deposit withdraw

State notation (1) Substates: disjoint/concurrent Entry/exit actions –entry: an action that is performed on entry to the state –exit: an action performed on exiting the state do: an ongoing activity performed while in the state (example: display window) –interruptible on: an action performed as a result of a specific event State name entry: entry action exit: exit-action do: activity-A on: event-A: action-A state variable(s)

State-A State-B Event(arguments)[condition]/action Transition notation (2) Event: significant occurrence that has a location in time and space –triggers the transition –signals, calls, passing of time, change in state Guard condition: Transition only eligible to fire when guard evaluates to true Guards of transition exiting one state are mutually exclusive Action: executable atomic computation

State diagram notation (3) Start state –No event triggers allowed –Branch conditions allowed –May not remain in start states End state –Top level end state terminates a state machine Initial state State-B Event(attribute)

State transitions for an order Checking do: check item Dispatching do: initiate delivery Waiting Delivered / get first item Item received[ some items not in stock ] Item received[ all items available ] Delivered [ All items checked && some items not in stock ] [ All items checked && all items available ] get next item[ not all items checked ]

Example: Payment authorization in class Order Authorizing do: check payment Authorized Delivered Rejected [ payment ok ] [ payment not ok ] 2 parallel processes: - authorization - order handling

Concurrent state diagram for the class Order Checking Waiting Dispatching Authorizing Authorized Checking Waiting Dispatching Authorizing Authorized Cancelled Delivered Rejected

Statecharts Allow the decomposition of a model into sub-models A brief description of the actions is included following the ‘do’ in each state Can be complemented by tables describing the states and the stimuli

Microwave Oven Model

Microwave oven state description StateDescription WaitingThe oven is waiting for input. The display shows the current time. Half powerThe oven power is set to 300 watts. The display shows ‘Half power’. Full powerThe oven power is set to 600 watts. The display shows ‘Full power’. Set timeThe cooking time is set to the user’s input value. The display shows the cooking time selected and is updated as the time is set. DisabledOven operation is disabled for safety. Interior oven light is on. Display shows ‘Not ready’. EnabledOven operation is enabled. Interior oven light is off. Display shows ‘Ready to cook’. OperationOven in operation. Interior oven light is on. Display shows the timer countdown. On completion of cooking, the buzzer is sounded for 5 seconds. Oven light is on. Display shows ‘Cooking complete’ while buzzer is sounding.

Microwave oven stimuli StimulusDescription Half powerThe user has pressed the half power button Full powerThe user has pressed the full power button TimerThe user has pressed one of the timer buttons NumberThe user has pressed a numeric key Door openThe oven door switch is not closed Door closedThe oven door switch is closed StartThe user has pressed the start button CancelThe user has pressed the cancel button

Microwave oven operation