0% found this document useful (0 votes)
31 views69 pages

Research Design Techniques

The document discusses various research design techniques for specifying software requirements and design, including natural language, mathematical specifications, flowcharts, structure charts, pseudocode, programming design languages, finite state automata, data flow diagrams, Petri nets, Warnier-Orr notation, and state charts. It provides examples and discusses the advantages and disadvantages of each technique.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views69 pages

Research Design Techniques

The document discusses various research design techniques for specifying software requirements and design, including natural language, mathematical specifications, flowcharts, structure charts, pseudocode, programming design languages, finite state automata, data flow diagrams, Petri nets, Warnier-Orr notation, and state charts. It provides examples and discusses the advantages and disadvantages of each technique.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 69

Research Methodology

Research Design Techniques

1
Introduction
How do we specify what this system does?
How do we specify the software?
Why is this important?
 To generate Software Requirements
Document and Design Document
Choosing an I/O Method
We will look at I/O methods of
specifying how a system should work
None of the following I/O methods is
the best for ALL situations
 Use what is suited to the project
 Use what makes sense to you
But be familiar with multiple methods
I/O Techniques
Natural Languages
Mathematical
Flowcharts
Structure Charts Finite State Automata
Pseudocode Dataflow Diagrams
PDL’s Petri Nets
Warnier-Orr Notation
State Charts
Natural Language

Use a natural language to specify the


system
 English
Disadvantages
 Ambiguous
 Tedious
Always used to support descriptions
that are already fully specified in other
ways
Mathematical Specification
Use mathematical equations to specify
software
Advantages
 Mathematical model is precise/unambiguous
 At lease some mathematical modeling is
typically used in software specs
Disadvantages
 Math models can be cryptic & difficult to
understand
 Hard to use
 Proof of correctness may be error-prone
Flowcharts
Advantages
 Oldest and most understood method
 Okay for small, simple systems
Disadvantages
 Flowcharts have difficulty showing
interaction between simultaneous tasks
 Encourages GOTO statements
Structure Charts
Rectangles represent processes
Left to Right movement represents
increasing sequence in execution
Top to Bottom movement shows increasing
detail
 the sub-processes within a process
Advantages Disadvantages
 Widely used, simple  Doesn’t show
 Encourages top- conditional branch
down design  Doesn’t show
 Easily identifies concurrent process
sub-processes interaction
Structure Charts Example
Pseudocode & Programming
Design Languages (PDL’s)
High-order languages
 often even more abstract than C, Pascal…
Detached from underlying HW architecture
 it cannot directly be compiled & executed
Can often be compiled into normal high-
level language, then compiled for machine
Difference between pseudocode & PDL’s
 pseudocode usually has no compiler
 intended for specification only
Pseudocode & PDL’s
Example I

Difference between pseudocode & PDL’s


 pseudocode usually has no compiler
 intended for specification only
Pseudocode & PDL’s
Example II-a

PIN Check

Transaction Type

Query

Withdrawl
Pseudocode & PDL’s
Example II-b

Withdrawal

Deposit

Illegal
Example of Good PDL

14
Pseudocode & PDL’s
Advantages
 Close to programming language
 leads itself to automatic code generation
 Can model concurrency
 if language supports it
 Formal methods apply
 similar to mathematical specs
Disadvantages
 User must learn the programming language
 More error-prone than more visual techniques
Finite State Automata
Automata --> Machines
Represents systems by a fixed # of
states
System changes states based on
certain events
Three ways of representation
 Set theoretical (i.e. using set theory)
 Diagrammatic - State Diagram
 Matrix Representation - State Transition
Table
Finite State Automata
Moore VS Mealy
Moore:
 Outputs are a function of the current state
only
Mealy
 Outputs are a function of both the current
state and the inputs
State Diagram
 Each state is a “Bubble” w/ state names
 Each bubble must show the next state for
every possible input condition
Finite State Automata
Example - Moore Machine
Finite State Automata
Example - Moore Machine Table
Finite State Automata
Example - Mealy Machine
Finite State Automata
Example - Mealy Machine Table
Finite State Automata
Example - Mealy Machine for ATM
Finite State Automata
Example - Mealy Machine - Transition Table
Finite State Automata
Advantages
 Widely used
 Fairly Easy
 Structured
 Auto code generation possible if enough detail
 Can optimize code with standard state
machine reduction techniques
Disadvantages
 Can’t see what’s inside of the states
 Difficult to show concurrent processes and
their communication (each process is a FSM)
Data Flow Diagrams
Shows major functions of systems
Shows how data flows between them
Shows concurrency between processes as
well as dependencies between processes
Data Flow Diagrams
DeMarco’s Rules

Identify all inputs & outputs - place these


blocks around edges of diagram
Define processes & data flows
 Inputs --> Outputs
 Outputs --> Inputs
 Middle --> Out
 select any of these
Data Flow Diagrams
DeMarco’s Rules

Label data flows


Label processes in terms of their I/O
Ignore system init or term
Omit details of trivial error paths (initially)
Don’t show flow of control or control info
Be prepared to start over ;)

Then, go into each process & iterate


showing more detail
Data Flow Diagrams
Example I
Data Flow Diagrams
Example I
Data Flow Diagrams
Example II
Data Flow Diagrams
Example II
Data Flow Diagrams
Example III
Data Flow Diagrams
Summary
Not complete for RT systems
 Doesn’t clearly show flow of control (like FSM)
 Doesn’t show change of states well
 Doesn’t show response time specs
Can be used w/
 Control Flow Diagrams
 Control Specs (FSM rep)
 Response Time Specs
 for Real Time systems
Data Flow Diagrams

Advantages
 Widely used
 Show concurrency
 May be helpful in partitioning systems
Disadvantages
 Must be used w/ other methods for RT systems
 Difficult to show signaling/synch between
processes
Petri Nets
Mathematical Model (Precise)
Also, a graphical model
Good for multitasking representations
Similar to dataflow, except this shows
states.
Petri Nets
Example I
Petri Nets
Example I - Firing Table
Petri Nets
Terminology
Circles
 “Places” (Data stores or processes)
 Marked as P1, P2…
 Places are marked with the number of data
items they contain at each point in time
 Graph structure doesn’t change
 Markings change as data flows through
system
 Each marking of the graph is a snapshot of
the system in time (state)
Petri Nets
Terminology
Rectangles
 Represent transitions or operations
 Labeled w/ mathematical transition function
Firing
 Transition of system from one state to
another
Firing Table
 Matrix showing the marking of the system
for each state
Petri Nets
Example II
Petri Nets
Example III - Sequence
Petri Nets
Example III - Conditional Branch
Petri Nets
Example III - While Loop
Petri Nets
Example IV
Petri Nets
Example IV
Petri Nets
Example IV
Petri Nets
Advantages
Mathematical lends itself to optimization
& formal methods
Good visual picture (similar to
flowcharts)
Shows concurrency & inter-process
communication
 even shows when a process is waiting on
another
Petri Nets
Disadvantages
Overkill if used on simple systems
Timing can be obscure for highly
complex systems
Petri Nets
Example V
Petri Nets
Example V
Warnier-Orr Notation
Similar to structure charts with several
improvements
 Can be used to show both data structures &
processes
 Structure charts just used for processes
 Uses more rigorous “Set Theory” notation
Left --> Right - Increasing Detail
Top --> Bottom - Order of execution
Warnier-Orr Notation
Example I

Accept
Coins
Dispense
Accept Coins Cup Cream
Dispense Cream?
Coffee Coffee Sugar
Sugar?
Choice? Decaf Dispense Cream? Cream
Decaf Sugar? Sugar
Tea Dispense Cream? Cream
Tea Sugar? Sugar
Warnier-Orr Notation
Can also show conditionals & branching
 Not possible w/ structure charts
If-Then
 label { condition? { steps
If-Then-Else
 label { condition { true action
{ condition false { false action
Warnier-Orr Notation
While
 label (condition, W) { statement
Repeat Until
 label (condition, U) { statement
Warnier-Orr Notation
Example II - Indexed Loop
Warnier-Orr Notation
Example III - ATM
Warnier-Orr Notation
Example IV - High-Level Data Structure
Warnier-Orr Notation
Pros & Cons
Advantages
 Structure charts plus branching & ability to
model data structures
Disadvantages
 Diagrams can get very large & complex
 Synch of concurrent processes using only
conditionals is restrictive
 Not well known or widely used
State Chart
Combine FSM w/ dataflow diagrams
Has broadcast communication feature
 communication between separate processes
Can show concurrent processes
 orthogonal processes
Can show increasing levels of detail
 depth
State Chart
Basic Method
FSM
 Label states w/ capital letters (or phrases)
Depth
 Represented by putting states inside of
states
Orthogonality
 Independent, concurrent Processes
 Represented by dashed lines btwn states
State Chart
Basic Method
State Transitions
 Use symbols a, b, …z to represent Events that
trigger transitions
 Small letters in parentheses to show conditions for
transitions
Broadcast Communications
 A method of allowing multiple orthogonal
processes to react to the same event
 Shown by labeled arrows
State Chart
Example I - Broadcast Comm. - Chain Reaction
State Chart
Example II
State Chart
Example II
State Chart
Example III

State J contains orthogonal processes


A,B & C
Even h causes 3 simultaneous state
transitions
State Chart
Example III
State Chart
Example IV
State Chart
Pros & Cons
Advantages
 Structure of FSM
 enabling auto-code generation
 Shows depth, concurrent processes & inter-
process communication
Disadvantages
 ????
State Chart
A Summary of Modeling Techniques

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy