Presentation is loading. Please wait.

Presentation is loading. Please wait.

Structured Analysis and Dataflow Diagrams

Similar presentations


Presentation on theme: "Structured Analysis and Dataflow Diagrams"— Presentation transcript:

1 Structured Analysis and Dataflow Diagrams

2 Structured Analysis Views
The functional view data flow diagrams the primary view of the system. defines what is done, the flow of data between things that are done The data view entity relationship diagrams, a record of what is in the system, or what is outside the system that is being monitored. The dynamic view state transition diagrams, defines when things happen and the conditions under which they happen 2

3 Structured Analysis Views
The functional view data flow diagrams the primary view of the system. defines what is done, the flow of data between things that are done The data view entity relationship diagrams, a record of what is in the system, or what is outside the system that is being monitored. The dynamic view state transition diagrams, defines when things happen and the conditions under which they happen 3

4 Data Flow Diagram (DFD)
A semi-formal operational specification System viewed as collection of data manipulated by “functions” Data can be persistent It is stored in data repositories Data can flow This is represented by data flows DFD has a graphical notation 4 4

5 Graphical Notation Bubbles represent functions
Arcs represent data flows Open boxes represent persistent data stores Closed boxes represent I/O interaction 5 5

6 An Example: Library I/O persistent data 6 6

7 Refinement of “Get a Book”
Shelves List of Authors List of titles Title and author of requested book; name of the user Book List of books borrowed Book title; user name Book request by the user reception Author Title Find book position <shelf#, book#> Get the book 7 7

8 Data Flow Diagram Creation
Given a system description, identify Functions (actions) Inputs and outputs Data Proceed top-down Start with level 0 (context) diagram Successively refine Use text to document diagram objects 8

9 Patient Monitoring System
The purpose is to monitor the patients’ vital signs -- blood pressure, temperature, pulse -- reading them at specified frequencies from analog devices and storing readings in a DB. If readings fall outside the range specified for patient an alarm must be sent to a nurse. The system also provides reports to nurses on request. 9 9

10 Patient Monitoring System
10 10

11 A Refinement 11 11

12 More Refinement 12 12

13 Describing Functions Function check-limit-violations
Input: Pressure, Temperature, Pulse, Limits Output: Pressure, Temperature, Pulse, Result If any of (Pressure, Temperature, Pulse) are outside of Limits result = alarm Else result = okay Endif Output result Output Pressure, Temperature, Pulse

14 Limitations of DFDs Easy to read, but … Informal semantics
Inherent ambiguities Couldn’t use to generate code Are outputs from A, B, C all needed? Are outputs for E and F are produced at the same time? 14 14

15 Limitations of DFDs Control information is absent
Possible interpretations: (a) A produces datum, waits until B consumes it (b) B can read the datum many times without consuming it (c) a pipe is inserted between A and B 15 15

16 DFD Problem Use a DFD to specify the requirements for an ATM machine that reads a user’s card and takes their PIN as input from a keypad, checks the PIN against a database, and if the user is authorized to proceed, allows the user to conduct transactions on their account, else if not, returns their card. Transactions are specified with selection arrows, and include receiving or dispensing cash. A receipt is given for each transaction. All transactions are logged by the system. 16

17 Same Problem: Can you Model this Using a State Diagram?
Use a DFD to specify the requirements for an ATM machine that reads a user’s card and takes their PIN as input from a keypad, checks the PIN against a database, and if the user is authorized to proceed, allows the user to conduct transactions on their account, else if not, returns their card. Transactions are specified with selection arrows, and include receiving or dispensing cash. A receipt is given for each transaction. All transactions are logged by the system. 17

18 Earlier State Diagram Problem: Can you Model this Using a DFD?
Consider the control of a small part of a chemical plant. Temperature and pressure levels must be monitored for safety reasons. Sensors are installed to generate signals when either of these levels exceeds some predefined value. When one of the two signals is raised, a recovery action is automatically invoked (there is a “temperature action” and a “pressure action”.) If, after a while, the recovery action succeeds, the system is automatically reset to the “normal” state. Otherwise, the alarm signal must be raised and the plant must be shut off. The system must also be shut off if it is trying to recover from one kind of anomaly (temperature or pressure) and the other signal is raised. It is assumed that the two signals cannot occur simultaneously.

19 DFD Problem Use a DFD to specify the requirements for a “spell-checker” that takes as input a command issued by a user, and a document, and outputs a list of the words in that document that may be misspelled. The spell-checker has access to a system dictionary and a user-supplied dictionary. An example answer will be posted on the Class Handouts page, look for “Answer to Spell-Checker DFD problem.” 19


Download ppt "Structured Analysis and Dataflow Diagrams"

Similar presentations


Ads by Google