Download presentation
Presentation is loading. Please wait.
1
Chapter 12 Analysis Modeling
2
Analysis 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
3
Elements of the Analysis Model
Primary Objectives Describe what customer requires Establish basis for creating software design Define requirements that can be validated
4
Refactoring Fowler [FOW99] defines refactoring in the following manner: "Refactoring is the process of changing a software system in such a way that it does not alter the external behavior of the code [design] yet improves its internal structure.” When software is refactored, the existing design is examined for redundancy unused design elements inefficient or unnecessary algorithms poorly constructed or inappropriate data structures or any other design failure that can be corrected to yield a better design.
5
Relation of Analysis to Design
6
The structure of analysis model
Data Dictionary Entity Relationship Diagram Data Flow State Transition Object Description Process Specification Control ( ERD) (DFD) (STD)
7
The Flow Model Every computer-based system is an
information transform .... computer based system input output
8
Data Modeling The model consists of Data objects Data object [types]
Attributes Relationships Data objects A representation of almost any composite information that must be understood by software.
9
…Data Modeling Attributes
Attributes define the properties of a data object and take on one of three different characteristics: Name an instance of the data object Describe the instance Make reference to another instance Make Model ID# Body type Color Owner Ford Taurus Q12A Sedan Blue ABC Lexus LS AB Sports White XYZ Naming attributes Descriptive attributes Referential Identifier
10
…Data Modeling Relationships Defined pairwise -- many varieties Book
Bookstore orders displays sells returns
11
Cardinality and Modality
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
12
Example: Modality Customer Repair action is provided with
Mandatory: in order to have a repair action, we must have a customer Optional: there may be a situation in which a repair action is not necessary
13
Entity Relation Diagrams (ERD)
Cornerstone of the data model -- includes data objects, attributes, relationships, and various type indicators manufacturer car builds ID# model body type engine transmission . . . Data Object Table
14
Example: Expanded ERD
15
Data Object type hierarchies
16
Associative Data Objects
17
Functional Modeling Data Dictionary Entity Relationship Diagram
Data Flow State Transition Object Description Process Specification Control ( DFD )
18
Data Flow Diagrams (DFD)
A graphical technique that depicts information flow and the transforms applied as data move from input to output Not the same as flow charts. Does not show the logic of the transformations Can be used at any level of abstraction
19
General Information Flow Model
20
Basic Notation
21
Information Flow Refinement
B A F f V 2 X f A 6 z z f f 2 B Z 1 4 1 W f f 5 Y z 7 f 3 3 x X x f 1 f 2 Z 41 43 f 45 y Y f 1 f y 42 44 2
22
Real Time Extensions Fundamental issue - The time at which results are produced is a part of the correctness of the computation.
23
Example: Time continuous data flow
24
Ward/Mellor Notation
25
Example: Data and control flows, Ward and Mellor
26
Hatley and Pirbhai 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
27
Relationship Between Models
28
Example: Data Conditions
29
CFD for Photocopier Software
paper feed status (jammed, empty) alarm start/stop manage status produce Copy Info copying user read displays operator input Problem type Reload status perform problem reload diagnosis paper full repro fault
30
Behavioral Modeling Description Process Object Specification Data Flow
Dictionary Entity Relationship Diagram Data Flow State Transition Object Description Process Specification Control ( STD )
31
State Transition Diagrams
A State is any observable mode of behavior e.g., reading commands, computing control, waiting for next time event States represented as rectangles Arrows represent transitions Value above arrow identifies event causing transition Value below arrow indicates ensuring action
32
State Transition Diagram
reading commands making copies reloading paper diagnosing problem jammed invoke perform problem-diagnosis empty invoke reload paper not jammed invoke read-op-input full idle full and start invoke manage-coping copies done
33
Creating an 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
34
Example1: Home Security System
Initial entities Homeowner, control panel, sensors, security system and monitoring service
35
Example2: Home Security System
Relationships between sensor and security sys. Security system monitors sensor Security system enables/disables sensor Security system tests sensor Security system programs sensor
36
Creating a Data Flow 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
37
Example3: Home Security System
38
Refinement Analyze textual description of bubble Examples
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
39
Example4: Home Security System
40
Example5: Home Security System
41
Creating Control Flow 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 One of the issues here is to find the controlling events.
42
Level 1 CFD for Safe-Home
43
State transition diagram for SafeHome
44
Process Specifications
Describes all flow model processes at final level of refinement Narrative text, Program design language description Mathematical equations Tables Diagrams Charts
45
Data Dictionary Data Dictionary Entity Relationship Diagram Data Flow
State Transition Object Description Process Specification Control
46
Data Dictionary Why a data dictionary? Need an organized way to represent data & control characteristics Usual contents Name Alias Where and how used Content description (of composite items) Supplementary information, e.g., restrictions, limitations, preset values
47
Example Name: Shuttle pose Aliases: Position-orientation vector
Where used: Display of Shuttle on map Content: x, y, z position wrt to Earth’s Center, roll, pitch, yaw Supplementary Info: Elevation must be above 140 nautical miles
48
Data Structure For compositional data flow and data store elements
Describe the elements of the data structure using algebraic notation = Composed of { } Repetition ( ) Optional + and [ / ] or
49
Data Structure Example: Student record= student ID +
Student name+ Address + Date of birth + Gender + Nationality + Telephone number + (mobile telephone number) + { course record} Course record= course name + Course number+ Grade
50
Data Dictionary Common tools supporting DD
Preventing creation of duplicate names Enforce naming conventions Printing dictionary Determine the range of impact of changes, i.e., which processes are affected Assist configuration management
52
End
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.