Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis...

47
Chapter 12 Analysis Modeling

Transcript of Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis...

Page 1: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Chapter 12

Analysis Modeling

Page 2: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Analysis ModelingAnalysis Modeling

Two primary methods todayTwo primary methods today Structured AnalysisStructured Analysis Object-oriented analysisObject-oriented analysis

Some important considerationsSome important considerations Analysis products must be maintainableAnalysis products must be maintainable Effective partitioning is essentialEffective partitioning is essential Graphics should be used whenever possibleGraphics should be used whenever possible Distinguish between logical and implementationDistinguish between logical and implementation

Page 3: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Elements of the Analysis ModelElements of the Analysis Model

Primary ObjectivesPrimary Objectives Describe what customer requiresDescribe what customer requires Establish basis for creating software designEstablish basis for creating software design Define requirements Define requirements that can be validatedthat can be validated

Page 4: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

The structure of analysis modelThe structure of analysis model

Data

Dictionary

Entity

Relationship

Diagram

Data Flow

Diagram

State Transition

Diagram

Dat

a

ObjectDescription Process

Specification

Control Specification

( ERD)

(DFD)

(STD)

Page 5: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

The Flow Model

Every computer-based system is an Every computer-based system is an information transform ....information transform ....

computercomputerbasedbased

systemsysteminputinput outputoutput

Page 6: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Data ModelingData Modeling

The model consists ofThe model consists of Data object [types]Data object [types] AttributesAttributes RelationshipsRelationships

Data objectsData objects A representation of almost any composite A representation of almost any composite

information that must be understood by information that must be understood by softwaresoftware..

Page 7: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

…Data Modeling…Data Modeling AttributesAttributes

Attributes define the properties of a data object Attributes define the properties of a data object and take on one of three different characteristics:and take on one of three different characteristics: Name an instance of the data objectName an instance of the data object Describe the instanceDescribe the instance Make reference to another instanceMake reference to another instance

Make Model ID# Body type Color Owner

Ford Taurus Q12A45.. Sedan Blue ABC

Lexus LS400 AB123... Sports White XYZ

Naming attributesDescriptive attributes

Referential attributes

Identifier

Page 8: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

…Data Modeling…Data Modeling

RelationshipsRelationships Defined pairwise -- many varietiesDefined pairwise -- many varieties

Book Bookstore

orders

displays

sells

returns

Page 9: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Cardinality and ModalityCardinality and Modality

CardinalityCardinality How many occurrences of object X are related to How many occurrences of object X are related to

how many occurrences of object Yhow many occurrences of object Y One-to-one (1:1)One-to-one (1:1) One-to-many (1:N)One-to-many (1:N) Many-to-many (M:N)Many-to-many (M:N)

ModalityModality =0 => optional relationship=0 => optional relationship =1 => relationship must appear=1 => relationship must appear

Page 10: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Example: ModalityExample: Modality

Customer Repair actionis provided with

Mandatory: in order to havea repair action, we must havea customer

Optional: there may be a situationin which a repair action is not necessary

Page 11: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Entity Relation Diagrams (ERD)Entity Relation Diagrams (ERD)

Cornerstone of the data model -- includesCornerstone of the data model -- includes data objects, data objects, attributes, attributes, relationships, andrelationships, and various type indicatorsvarious type indicators

manufacturer carbuilds

ID# model body type engine transmission . . .Data Object Table

Page 12: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Example: Expanded ERDExample: Expanded ERD

Page 13: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Data Object type hierarchiesData Object type hierarchies

Page 14: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Associative Data ObjectsAssociative Data Objects

Page 15: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Functional ModelingFunctional Modeling

Data

Dictionary

Entity

Relationship

Diagram

Data Flow

Diagram

State Transition

Diagram

Data

ObjectDescription Process

Specification

Control Specification

( DFD )

Page 16: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Data Flow Diagrams (DFD)Data Flow Diagrams (DFD)

A graphical technique that depicts A graphical technique that depicts information flow and the transforms information flow and the transforms applied as data move from input to outputapplied as data move from input to output

NotNot the same as flow charts. Does not the same as flow charts. Does not show the logic of the transformationsshow the logic of the transformations

Can be used at any level of abstractionCan be used at any level of abstraction

Page 17: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

General Information Flow ModelGeneral Information Flow Model

Page 18: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Basic NotationBasic Notation

Page 19: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Information Flow RefinementInformation Flow Refinement

AB

AB

V

W

X

Y

Z

X

Y

z z

z

x x

yy

Z

12

3

1

1

2

2

F

f

f

f

ff

f

f

f

f

f

f

f

1

2

3

4

5

6

7

41

42

43

44

45

Page 20: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Real Time ExtensionsReal Time Extensions

Fundamental issue - The time at which Fundamental issue - The time at which results are produced is a part of the results are produced is a part of the correctness of the computation.correctness of the computation.

Page 21: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Example: Time continuous data flowExample: Time continuous data flow

Page 22: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Ward/Mellor NotationWard/Mellor Notation

Page 23: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Example: Data and control flows, Ward and Mellor

Example: Data and control flows, Ward and Mellor

Page 24: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Hatley and Pirbhai ExtensionsHatley and Pirbhai Extensions

Use separate Use separate data flow diagramdata flow diagram (DFD) and (DFD) and control flow diagramcontrol flow diagram (CFD) (CFD)

Data flow diagrams Data flow diagrams Used to represent data and the processes that Used to represent data and the processes that

manipulate itmanipulate it Control flow diagrams Control flow diagrams

Show how events flow among processes and Show how events flow among processes and show those external events that cause various show those external events that cause various processes to be activatedprocesses to be activated

Page 25: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Relationship Between ModelsRelationship Between Models

Page 26: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Example: Data ConditionsExample: Data Conditions

Page 27: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

CFD for Photocopier SoftwareCFD for Photocopier Software

readoperator

input

managecopying produce

userdisplays

reloadpaper

performproblem

diagnosis

paper feed status(jammed, empty)

start/stop

alarm

fullreprofault

Copy

Info

status

Reloadstatus

Problemtype

Page 28: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Behavioral ModelingBehavioral Modeling

DataDictionary

Entity

Relationship

Diagram

Data Flow

Diagram

State Transition

Diagram

Data

ObjectDescription Process

Specification

Control Specification

( STD )

Page 29: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

State Transition DiagramsState Transition Diagrams

A State is any observable mode of behaviorA State is any observable mode of behavior e.g., reading commands, computing control, e.g., reading commands, computing control,

waiting for next time eventwaiting for next time event States represented as rectanglesStates represented as rectangles Arrows represent transitionsArrows represent transitions Value above arrow identifies event causing Value above arrow identifies event causing

transitiontransition Value below arrow indicates ensuring actionValue below arrow indicates ensuring action

Page 30: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

State Transition DiagramState Transition Diagram

readingcommands

making copiesreloading

paper

diagnosingproblem

jammedinvoke perform problem-diagnosis

emptyinvoke reload paper

not jammedinvoke read-op-input

fullinvoke read-op-input

idle

invoke read-op-inputfull and start

invoke manage-coping

copies doneinvoke read-op-input

Page 31: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Creating an ERDCreating an ERD

List entities that customer addressesList entities that customer addresses For each, determine the connectionsFor each, determine the connections For each connection, create one or more For each connection, create one or more

object-relationship pairsobject-relationship pairs For each relationship, determine cardinality For each relationship, determine cardinality

and modalityand modality Define the attributes of each entityDefine the attributes of each entity Formalize and review ERDFormalize and review ERD IterateIterate

Page 32: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Example1: Home Security SystemExample1: Home Security System Initial entitiesInitial entities

Homeowner, control panel, sensors, security Homeowner, control panel, sensors, security system and monitoring servicesystem and monitoring service

Page 33: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Example2: Home Security System Example2: Home Security System

Relationships between sensor and security sys.Relationships between sensor and security sys. Security system monitors sensorSecurity system monitors sensor Security system enables/disables sensorSecurity system enables/disables sensor Security system tests sensorSecurity system tests sensor Security system programs sensorSecurity system programs sensor

Page 34: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Creating a Data Flow ModelCreating a Data Flow Model

First create level 0 diagramFirst create level 0 diagram Depict software system as single bubbleDepict software system as single bubble Show primary inputs and outputsShow primary inputs and outputs

Identify processes, data objects, and data stores Identify processes, data objects, and data stores to be expanded at next levelto be expanded at next level

Label all arrows with meaningful namesLabel all arrows with meaningful names Information flow continuity must be maintainedInformation flow continuity must be maintained Refine only one bubble at a timeRefine only one bubble at a time

Page 35: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Example3: Home Security SystemExample3: Home Security System

Page 36: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

RefinementRefinement

Analyze textual description of bubbleAnalyze textual description of bubble verbs are often processesverbs are often processes nouns are often external entities, data or control nouns are often external entities, data or control

objects or data storesobjects or data stores ExamplesExamples

Control panel is used to program and configure Control panel is used to program and configure the systemthe system

Upon a sensor event, the software invokes an Upon a sensor event, the software invokes an alarmalarm

Page 37: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Example4: Home Security SystemExample4: Home Security System

Page 38: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Example5: Home Security SystemExample5: Home Security System

Page 39: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Creating Control Flow ModelsCreating Control Flow Models Strip arrows from DFDStrip arrows from DFD Add event and control items. E.g., tryAdd event and control items. E.g., try

List all sensors read by the softwareList all sensors read by the software List all interrupt conditionsList all interrupt conditions List all operator actuated switchesList all operator actuated switches List all data conditionsList all data conditions Check noun-verb parse for possible CSPEC I/OCheck noun-verb parse for possible CSPEC I/O Identify states, how each is reached and Identify states, how each is reached and

transitionstransitions Focus on possible omissionsFocus on possible omissions

Page 40: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Level 1 CFD for Safe-HomeLevel 1 CFD for Safe-Home

Page 41: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

State transition diagram for SafeHomeState transition diagram for SafeHome

Page 42: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Process SpecificationsProcess Specifications

Describes all flow model processes at final Describes all flow model processes at final level of refinementlevel of refinement Narrative text,Narrative text, Program design language descriptionProgram design language description Mathematical equationsMathematical equations TablesTables DiagramsDiagrams ChartsCharts

Page 43: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Data DictionaryData Dictionary

DataDictionary

Entity

Relationship

Diagram

Data Flow

Diagram

State Transition

Diagram

Data

ObjectDescription Process

Specification

Control Specification

Page 44: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Data DictionaryData Dictionary

Why a data dictionary? Need an organized way Why a data dictionary? Need an organized way to represent data & control characteristicsto represent data & control characteristics

Usual contentsUsual contents NameName AliasAlias Where and how usedWhere and how used Content description (of composite items)Content description (of composite items) Supplementary information, e.g., restrictions, Supplementary information, e.g., restrictions,

limitations, preset valueslimitations, preset values

Page 45: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

ExampleExample

Name:Name: Shuttle poseShuttle pose Aliases:Aliases: Position-orientation vectorPosition-orientation vector Where used:Where used: Display of Shuttle on mapDisplay of Shuttle on map Content:Content: x, y, z position wrt to Earth’s x, y, z position wrt to Earth’s

Center, roll, pitch, yawCenter, roll, pitch, yaw Supplementary Info: Elevation must be Supplementary Info: Elevation must be

above 140 nautical milesabove 140 nautical miles

Page 46: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

Data DictionaryData Dictionary

Common tools supporting DDCommon tools supporting DD Preventing creation of duplicate namesPreventing creation of duplicate names Enforce naming conventionsEnforce naming conventions Printing dictionary Printing dictionary Determine the range of impact of changes, i.e., Determine the range of impact of changes, i.e.,

which processes are affectedwhich processes are affected Assist configuration managementAssist configuration management

Page 47: Chapter 12 Analysis Modeling. Analysis Modeling ä Two primary methods today ä Structured Analysis ä Object-oriented analysis ä Some important considerations.

EndEnd