Escolar Documentos
Profissional Documentos
Cultura Documentos
Analysis Modeling
Modeling
Two primary methods today
Structured Analysis
Object-oriented analysis
Some important considerations
Analysis products must be maintainable
Effective partitioning is essential
Graphics should be used whenever possible
Distinguish between logical and implementation
August 2003
1
Structured
Structured Analysis
Analysis
Elements of Analysis
Describe what customer requires
Establish basis for creating software design
Define requirements that can be validated
August 2003
2
Graphical
Graphical View
View of
of Model
Model
Pro
sc r i ption ce ss
De Sp
je ct ec
Ob ifi
ca
Entity Data Flow tio
n
ta
Diagram
Da
Relationship
Diagram Data (DFD)
( ERD) Dictionary
State Transition
Diagram (STD)
Con
trol ation
Specific
August 2003
3
Data
Data Modeling
Modeling
Relationships
Defined pairwise -- many varieties
orders
displays
Book sells Bookstore
returns
August 2003
6
Cardinality
Cardinality and
and Modality
Modality
Cardinality
How many occurrences of object X are related to
how many occurrences of object Y
One-to-one (1:1)
One-to-many (1:N)
Many-to-many (M:N)
Modality
=0 => optional relationship
=1 => relationship must appear
August 2003
7
Example
Example
is provided with
Customer Repair action
August 2003
8
Entity
Entity Relation
Relation Diagrams
Diagrams (ERD)
(ERD)
Cornerstone of the data model -- includes
data objects,
attributes,
relationships, and
various type indicators
August 2003
10
Data
Data Object
Object Hierarchies
Hierarchies
August 2003
11
Associating
Associating Data
Data Objects
Objects
August 2003
12
Functional
Functional Modeling
Modeling
c ri ption P ro
cess
De s
je ct Sp
Ob ec
if
Entity Data Flow ica
tio
a
n
at
Relationship Diagram
D
Diagram ( DFD )
Data
Dictionary
State Transition
Diagram
Con
trol a tion
Specific
August 2003
13
Data
Data Flow
Flow Diagrams
Diagrams (DFD)
(DFD)
August 2003
14
General
General Information
Information Flow
Flow Model
Model
August 2003
15
Basic
Basic Notation
Notation
August 2003
16
Information
Information Flow
Flow Refinement
Refinement
B
A F
V f2 X f6
A z2
f 1 f 4
Z z1 B
W
f5 f7
f3 Y z3
X f x1 f x2
41 43
f
45
Z
Y f y1 f
August 2003
42 44
y2
17
Real
Real Time
Time Extensions
Extensions
Fundamental issue - The time at which results
are produced is a part of the correctness of
the computation.
Hatley/Pirbhai notation
August 2003
18
Ward/Mellor
Ward/Mellor Notation
Notation
August 2003
19
Example
Example
August 2003
20
Example
Example
August 2003
21
Hatley
Hatley and
and Pirbhai
Pirbhai Extensions
Extensions
Use separate data flow diagram (DFD) and
control flow diagram (CFD)
Data flow diagrams
Used to represent data and the processes that
manipulate it
Control flow diagrams
Show how events flow among processes and show
those external events that cause various processes
to be activated
August 2003
22
Relationship
Relationship Between
Between Models
Models
August 2003
23
Example
Example
August 2003
24
CFD
CFD for
for Photocopier
Photocopier
paper feed status alarm
(jammed, empty)
full
August 2003
repro
fault 25
Behavioral
Behavioral Modeling
Modeling
c ri ption Pro
ce
Des ss
t
jec Sp
Ob e cif
Data Flow i ca
Entity tio
a
n
at
Diagram
D
Relationship
Diagram Data
Dictionary
State Transition
Diagram ( STD )
Con
trol ation
August 2003
Specific
26
State
State Transition
Transition Diagrams
Diagrams
reloading
making copies paper
empty
invoke reload paper
jammed
not jammed
invoke perform problem-diagnosis
diagnosing invoke read-op-input
August 2003
problem 28
Creating
Creating an
an ERD
ERD
List entities that customer addresses
For each, determine the connections
For each connection, create one or more
object-relationship pairs
For each relationship, determine cardinality
and modality
Define the attributes of each entity
Formalize and review ERD
Iterate
August 2003
29
Home
Home Security
Security System
System Example
Example
Initial entities
Homeowner, control panel, sensors, security
system and monitoring service
August 2003
30
Home
Home Security
Security System
System Example
Example
Relationships between sensor and security sys.
Security system monitors sensor
Security system enables/disables sensor
Security system tests sensor
Security system programs sensor
August 2003
31
Creating
Creating aa Data
Data Flow
Flow Model
Model
First create level 0 diagram
Depict software system as single bubble
Show primary inputs and outputs
Identify processes, data objects, and data stores
to be expanded at next level
Label all arrows with meaningful names
Information flow continuity must be maintained
Refine only one bubble at a time
August 2003
32
Home
Home Security
Security System
System Example
Example
August 2003
33
Refinement
Refinement
Analyze textual description of bubble
verbs are often processes
nouns are often external entities, data or control
objects or data stores
Examples
Control panel is used to program and configure the
system
Upon a sensor event, the software invokes an alarm
August 2003
34
Home
Home Security
Security System
System Example
Example
August 2003
35
Home
Home Security
Security System
System Example
Example
August 2003
36
Creating
Creating Control
Control Flow
Flow Models
Models
Strip arrows from DFD
Add event and control items. E.g., try
List all sensors read by the software
List all interrupt conditions
List all operator actuated switches
List all data conditions
Check noun-verb parse for possible CSPEC I/O
Identify states, how each is reached and transitions
Focus on possible omissions
August 2003
37
Level
Level 11 CFD
CFD for
for Safe-Home
Safe-Home
August 2003
38
Control
Control Specification
Specification
August 2003
39
Process
Process Specifications
Specifications
c ri ption Pro
cess
Des
t
bjec Sp
ec
O if
Entity Data Flow ica
tio
a
n
at
Relationship Diagram
D
Diagram
Data
Dictionary
State Transition
Diagram
Con
tro ation
August 2003 l Specific
42
Data
Data Dictionary
Dictionary
August 2003
45
Summary
Summary
Key elements
Data modeling
Data objects, attributes and relationships
Cardinality and modality
Entity-relationship diagrams
Functional modeling
Data and control flow diagrams
Behavioral modeling
State transition diagrams
Data Dictionary
August 2003
46