Modeling
Modeling
Chapter 12.5
Behavioral Modeling
events behavior
Outside
Application
world
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
2
The States of a System
state—a set of observable circum-stances
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
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
3
Behavioral Modeling
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
4
State Transition Diagram
Notation
state
new state
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
5
State Transition Diagram
full and start
invoke manage-copying reading
operator
commands
full
invoke read-op-input
copies done
invoke read-op-input
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
6
Control Flow Diagram
Paper feed status
(jammed, empty) Alarm
Start/stop Produce
Manage
user
Copying
displays
Reload
Operator
Input
Perform
Problem
Reload diagnosis
paper
++
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
8
The Control Model
the control flow diagram is "superimposed" on the DFD
and shows events that control the processes noted in
the DFD
control flows—events and control items—are noted 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
activation tables
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
10
Guidelines for Building a CSPEC
list all sensors that are "read" by the software
list all interrupt conditions
list all "switches" that are actuated by the operator
list all data conditions
recalling the noun-verb parse that was applied to the
software statement of scope, review all "control items"
as possible CSPEC inputs/outputs
describe the behavior of a system by identifying its
states; identify how each state is reach and defines
the transitions between states
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
11
Process Specification (PSPEC)
bubble
PSPEC
narrative
pseudocode (PDL)
equations
tables
diagrams and/or charts
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
12
A Design Note
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
13
Creating Mini-Specs
Software
Specification
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
14
Real-Time Analysis
Methods
each introduces its own notation, but all
propose an approach for representing control and
separating it from data
provide a mechanism for specifying events, states, and
distributed processing
begin at the analysis level and work to derive processor
assignments, tasks and program architectures
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
15
Time continuous data flow
Monitored
temperature Input “continuous”
Output
Monitor “continuous”
And adjust
Temperature
level
Temperature
Set point
++
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
16
Real-Time Analysis
& Design Methods
Gomaa, H., Software Design Methods for Concurrent and
Real-Time Systems, Addison-Wesley, 1995.
Harel, D. et al, "STATEMATE: A Working Environment for
the Development of Complex Reactive Systems, IEEE Trans.
Software Engineering, vol. 16, no. 3, April, 1990, pp. 403-414.
Hatley, D.J. and I.A. Pirbhai, Strategies for Real-Time System
Specification, Dorset House, 1987.
Selic, B., G. Gullekson, and P. Ward, Real-Time Object-
Oriented Modeling, Wiley, 1994.
Shumate, K. and M. Keller,, Software Specification and Design
—A Disciplined Approach For Real-Time Systems, Wiley
1992.
Ward, P.T. and S.J. Mellor, Structured Development for
Real-Time Systems, 3 volumes, Yourdon Press, 1985, 1986.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
17
Data & control flows
Process
Robot Movement
Parts status buffer commands alarm
Start/stop
Bit string flag
Process
Monitor activate
Fixture & Position
Operator commands
interface Process
Operator Robot
Operator settings commands
commands
PSPEC
If absolute tank pressure > max pressure
Then
Set above pressure to true
Else
Set above pressure to false
Begin conversion algorithm x-ola
Compute converted pressure
End
endif Hatley & Pirbhai Extension
++
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
19
The Data Dictionary
a quasi-formal grammar for describing the content
of data that the software will process and create
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
20
Building a Data Dictionary
Name: the primary name of the composite data item
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
21
Data Dictionary Notation
Notation Meaning
= is composed of
+ and
[ ] either-or
n
{ } n repetitions of
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
23
Next…
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001
24