Functional Modeling - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

Functional Modeling

Description:

Title: Software Engineering Requirements Engineering Author: agates Last modified by: sroach Created Date: 10/3/2000 2:29:48 PM Document presentation format – PowerPoint PPT presentation

Number of Views:48
Avg rating:3.0/5.0
Slides: 33
Provided by: agat68
Category:

less

Transcript and Presenter's Notes

Title: Functional Modeling


1
Functional Modeling
  • 0810

2
Question
  • How do you know if you have enough information to
    compute the necessary output values?

3
Functional Models
  • What is a function?

4
Steps in constructing Functional Model
  • Identify data (e.g. input and output values)
  • Identify transformations (e.g., functions)
  • Identify sources and sinks for data
  • Draw Diagram
  • Identify the constraints.

5
Data Flow Diagramshttp//www.yourdon.com/strucan
alysis/wiki/index.php?titleChapter_9
  • Four things in diagrams
  • Processes (ellipses)
  • Data flows (arrows)
  • Actors (boxes)
  • Data stores (open boxes, parallel lines)

Data store
6
Simple Example DFD
Exam Grades
Grade Book
Compute Average
Student Names
Grades
Exam Grades
Compute Grades
exam average
Grades Names
Output Grades
7
Processes
  • Transforms data values
  • Drawn as ellipses with fixed number of in-arrows
    and out-arrows
  • Example

dividend
quotient
Integer division
remainder
divisor
8
Levels of detail
  • Level 1 Shows system inputs, outputs, and
    processes
  • Level 2 Shows inputs, outputs, and processes for
    some Level 1 process
  • Level 3 Shows inputs, outputs, and processes for
    some Level 2 process

outputs
inputs
program
9
Data Flows
  • Connect processes
  • Represent intermediate data
  • Values are not changed by data flow
  • Arrow with name or type of data

city
city
a
address
address
zip
integer
zip
street
Aggregation split
copy
simple
Aggregation join
10
Actors
  • Producers or consumers of data
  • aka terminators, source and sink
  • Drawn as rectangle

Customer
11
Data Store
  • Stores data for later use
  • Has exactly two operations
  • Store
  • Retrieve
  • Not an actor must have both store and retrieve
  • Drawn as

Data store
12
Example
Initialize table
Atomic weights
Periodic Table
Atomic weights
Atomic weight
Find weight
element
13
Example
Item name
Price List
Cost
Cost
Find cost
Item name
14
Level 1
Employee Records
Paychecks
Process Payroll
TimeCards
Accounting Report
15
Level 2 Payroll Process
Format paycheck
Employee Records
Formatted Paycheck.
Paycheck Info
Emp. Info.
Paychecks
Calculate Withholding
Acct. Inf.
Calculate GrossPay
Format Accounting
Gross Pay
Formatted Acct. Inf.
Valid Timecard Info
Validate TimeCard
Accounting Report
TimeCards
Timecard Info.
16
Level 2 Calculate Withholding
Emp. Info.
Compute Withholding Rate
Rate
Paycheck Info
Gross Pay
Compute Net
Acct. Inf.
17
Notes
  • Show all possible computation paths for values.
  • Do not show what paths are executed in what order
    (thats the job of the dynamic model).
  • There may be many Level N1 diagrams for each
    Level N diagram. Level N1 expands a single node
    of a Level N diagram.

18
Things to check in DFDs
  1. Is each requirements function represented by a
    transform in the DFDs?
  2. Is each system input and output represented in
    the DFDs?

19
Things to check in DFDs (contd)
  1. Are all labels of information flows in the data
    dictionary?
  2. Do all data dictionary entries appear in the DFDs?

20
UML Activity Diagrams
  • Capture Actions and their results
  • Similar to state diagrams
  • Actions and results show in terms of state
    changes
  • Transitions occur when actions are complete (no
    events)

21
Purposes of Activity Diagrams
  • Capture work (actions) to be performed when an
    operation executes
  • Capture the internal work in an object
  • Show how related actions can be performed
  • Show how an instance of a use case can be
    performed in terms of actions and objects
  • Show how a business works in terms of actors,
    workflows, and objects

22
Activity Diagrams
  • Actions
  • Something performed to produce a result
  • An operation may consist of a set of actions
  • Drawn as rounded-edged rectangles
  • Edges
  • Do not have events (except for first edge)
  • May have guard conditions, send-clause, or action
    expression
  • Usually have nothing (transition occurs when
    action is complete)

23
Activity Diagram Elements
Show Printing in MessageBox
Create pdf file
Customer.Print()
Send pdf to printer
Remove MessageBox
24
Activity Diagram Elements
Show Printing in MessageBox
Create pdf file
Customer.Print()
Printer.Print(file)
Remove MessageBox
25
Activity Diagram Elements
Show Disk Full msg
full
Customer.Print()
free space
Show Printing in MessageBox
Create pdf file
Remove MessageBox
Printer.Print(file)
26
Style Points
  • Each edge leaving a decision point should have a
    guard
  • Guards on edges leaving decision points must not
    overlap (deterministic)
  • Guards on edges leaving decision points form a
    complete set (must be possible to leave the
    guard)
  • otherwise can be used as a fall through case
  • Model guards only if they add value
  • Simplify Guards (see following)

27
Three examples of guards
account.balance gt withdraw.amount
account.balance lt withdraw.amount
true
false
true
false
28
More style points
  • Include start and end points
  • Question black hole (no output edge) and
    miracle (no input edge) activities
  • Use connectors to avoid hard to follow edges, but
    make sure they match
  • Use numbers on connectors

29
Parallel Actions
Initiate
Measure
Update Display
30
Using Objects to Represent Datastore
Initiate
Measure
Update Display
Measured value
31
Specifying Operations in Greater Detail
  • Need a signature
  • Name
  • Arguments (number, order, types)
  • Values returned (number, order, types)
  • Need transformations
  • Functions and equations
  • Tables of values
  • Pre and post conditions
  • Decision tables
  • Pseudo code
  • Natural language

32
Operations
  • Trivial
  • Access read or write attributes. May not be
    necessary to show all of these.
  • Non-trivial
  • Queries no side effects
  • Actions instantaneous (atomic)
  • Activities duration over time
Write a Comment
User Comments (0)
About PowerShow.com