Transitional Analysis

Transitional Analysis Guidelines for transforming DFD models to Structure Chart models Ernest Cachia Department of Computer Science The Reasons  ...
Author: Heather McCoy
17 downloads 0 Views 185KB Size
Transitional Analysis

Guidelines for transforming DFD models to Structure Chart models

Ernest Cachia Department of Computer Science

The Reasons 

To move from an abstract system representation to a more physical one.



To offer some guidelines to this procedure.



To reduce ambiguity which may arise from subjective interpretations.



To move from data flow concepts to program structure concepts.

General Steps Involved (1) 1.

The type of data flow is established 

2.

Determine flow boundaries (switch points)  

3.

What is the nature of the data flowing between processes? Input↔Output boundaries Hub↔Action boundaries

Map the abstract DFD on to a particular program structure  

Transformational structure Transactional structure

General Steps Involved (2) 4.

Define a valid control structure  

 

5.

Also known as “first-level” factoring Depends on whether transformational or transactional models are used. “Call-and-return” for transformational “Call-and-act” for transactional

Refine (tune) the resulting structure  

Also known as “second-level factoring” Map IO flow bounded parts of DFD

General Steps Involved (3) 6.

Supplement and tune the final architectural structure 

Apply basic module independence concepts (i.e. Explode or implode modules according to coupling/cohesion requirements) to obtain an easier implementation.



Please also visit the slides on the web-site “www.sei.cmu.edu/ata/ATAM/index.htm” for a more comprehensive and interesting approach to architectural analysis known as “Architectural Tradeoff Analysis – ATA”.

Transformational Analysis (aka Transformational Mapping) Context level (level 0) Example Control panel

Sys parameters and data

Display information

User cmds and data

SafeHome system* Sensor status

Sensors

Error msg

Alarm type Dial tones

Control panel display Alarm

Telephone line

* Example taken from “Software Engineering – A Practitioner's Approach” by R. S. Pressman.

Level 1 Example User cmds and data

Sys parameters and data configure system

Configuration data

Configure Interact request with Configuration data user Start stop Configuration Enable/ Password data disable system a/d msg Display Display information msgs & Process Valid id msg status password Error msg Configuration Sensor information data Alarm Monitor type sensors Sensor status Dial tones

Level 2 Example (Monitor sensors) Configuration data

Assess against setup

Sensor id, type and location alarm data

Sensor id and setting Read sensors

Sensor status

Format for display

Gen. alarm signal

Sensor information

Alarm type

Telephone number Dial phone

Dial tones

Level 3 Example (Assess against setup) Configuration data

Telephone number

Sensor id and setting

Acquire Estab. response alarm Alarm cond. conds. info. Code, sensor id, and timing info.

Sensor id, type and location

List of numbers

alarm data

Select phone number

Level 3 Example (Format for display)

Sensor id, type and location

Format display

Generate Formatted id, display Sensor type and information location

Level 3 Example (Dial phone)

Telephone number

Setup conn to phone net

Tone-ready telephone number

Gen. pulses to Dial tones line

Putting Level 3 Together

This DFD exhibits definite transform flow character. Afferent branch (input) Central transform (processing) Efferent branch (output)

First-Level Factoring

Monitor sensors

Sensor input controller

Alarm conds controller

Alarm output controller

Second-Level Factoring (1) These are all the processes in the efferent branch:

Sensor id, type and location

Format display

alarm data

Telephone number

Setup conn to phone net

Generate Formatted id, display Sensor type and information location Gen. alarm signal

Tone-ready telephone number

Alarm type

Gen. pulses to Dial tones line

Second-Level Factoring (2) For the efferent branch:

Sensor input controller

Monitor sensors

Alarm conds controller

Alarm output controller

Format display

Generate alarm signal

Generate display

Setup conn. to phone net

Generate pulses to line

Now, do the same for the other branches (i.e. Afferent and Central)...

Second-Level Factoring (3) Alarm data

Configuration data

Estab. alarm Alarm cond. conds. Code, sensor id, and timing info.

List of numbers Sensor id, type and location

Select phone number

Telephone number

Monitor sensors

For central transform: Sensor input controller

Alarm conds controller

Alarm output controller

Establish alarm conds

Select phone number

Second-Level Factoring (4) Finally, for the afferent branch: Acquire response info. Sensor id and setting Read sensors

Sensor status

Configuration data Alarm cond. Code, sensor id, and timing info.

Monitor sensors

Sensor input controller Acquire response info. Read sensors

Alarm conds controller

Alarm output controller

Design Refinement Some degree of refinement can sometimes be carried out on the initial “rough-cut” of the system's structure. Monitor sensors

Implode & assimilate (inherent functionality)

Sensor input controller

Establish alarm conds.

Alarm output controller

Read sensors

Produce display

Generate alarm signal

Implode (single flow) Implode (triviality and single flow)

Setup conn. to phone net

Generate pulses to line

What next...? 1. Check out your coupling and cohesion This was discussed earlier

1. Check out your “fan-in” and “fan-out” Fan-in should be high Fan-out should be low (see next slide)

1. Go through a predefined final check-list This will be organisation dependent (see example two slide on)

Fanning High fan-in example: (good)

Calculate average

Determine fee

Extract gender

Get unit registration

Access student record

High fan-out example: (watch out – usually bad)

Retrieve student ID

Issue result

Determine name

Retrieve unit list

Calculate grades

Calculate derived

Final Check-list Example Typical check-list content (Example taken and adapted form Alan Dennis: “Systems Analysis & Design”)



Library modules have been created whenever possible (reuse and portability).



The diagram has a high fan-in structure (reuse).



Control modules have no more than 7 subordinates (efficiency).



Each module performs only one distinct function (cohesive).



Modules sparingly share information (de-coupled).



Data couples passed are actually used by recipient (stamp coupling).



Control couples are passed from “child” to “parent” module? (control coupling)



Each module has a reasonable amount of code in it (a discernible system function).

Transactional Analysis (aka Transactional Mapping) First step of this analysis is exactly the same as for transformational – i.e. refine the DFD.  The initial “SafeHome*” example will be used.  The level one DFD will be decomposed to level two as necessary.  A “transactional centre” will then be determined. 

* Taken from “Software Engineering – A Practitioner's Approach” by R. S. Pressman.

Level 1 (reproduced) User cmds and data

Sys parameters and data configure system

Configuration data

Configure Interact request with Configuration data user Start stop Configuration Enable/ Password data disable system a/d msg Display Display information msgs & Process Valid id msg status password Error msg Configuration Sensor information data Alarm Monitor type sensors Sensor status Dial tones

Level 2 Example (Interact with user) User commands Read user cmd

Command type Invoke cmd processing Password

Configure request start stop

Level 2 Example (Process password)

Configuration data Password

Valid id msg

Compare Read password password Four digits with file Invalid password

Produce error msg

Error msg

Level 2 Example (Configure system)

Sys parameters and data

Configure request

Read system data Raw conf data

Build config file

Configuration data

Putting Level 2 Together

This DFD exhibits transaction flow character. Transaction centre (dispatching)

Transaction Structure Mapping

user interaction

Read user cmd

Enable/ disable sys.

Invoke cmd processing

Configuration controller

Password controller

Refining The Structure Fully refining the DFD could yield the following structure: user interaction

Read user cmd

Enable/ disable sys.

Read system data

Invoke cmd processing

Configuration controller

Build config file

Password controller

Read password

Display msgs & status

Compare password with file

Produce error msg