Design methods: JSP and JSD
Stands for: Jackson Structured Programming and Jackson System
Development.
Primary applicable notations:
System specification diagrams (SSDs), correspond roughly to
DFDs.
Entity-structure diagrams (ESDs), process interpretation of
structure diagrams.
Pseudo-code.
Overall objective: Derive complete detailed design from requirements
specification in the case of JSD; derive pseudo-code for an individual
process in an SSD, in the case of JSP.
________________
Material from text by Budgen and from Software Engineering Concepts, by Richard
Fairley.
CS646: Software Design and Architectures
JSP: Overall process
Starting with
input
process
output
proceed as follows:
1.
Derive the structure diagrams for the input and output streams.
2.
The input-output structure diagrams are converted to a sequential
processing diagram by identifying points of correspondence
between nodes in the input and output structure diagrams.
3.
The sequential processing diagram is expanded into a detailed
design model with pseudo-code that contains the operations needed
to solve the problem.
CS646: Software Design and Architectures
Example: an inventory reporting application
Inventory data contains a collection of transactions, each of which has a part
number and number of units of that item issued or received in the transaction.
An output report is to be produced that contains a heading and a net movement
line for each part number that occurs in the collection.
transactions
sort by
part
number
transactions
(ordered by
part number)
inventory data
CS646: Software Design and Architectures
generate
report
net movement
report
manager
The input and output structure diagrams
output
report
input stream
part group
heading
movement
record
issue
body
net
movement line
receipt
CS646: Software Design and Architectures
Identifying points of correspondence
output
report
input stream
part group
heading
movement
record
issue
body
net
movement line
receipt
CS646: Software Design and Architectures
Derive sequential processing diagram
program
process
heading
process
body
process part
group and line
process part
group body
process
line
process
record
process
issue
CS646: Software Design and Architectures
process
receipt
Derive additional operations
1.
2.
Open sort stream.
Close sort stream.
3.
4.
Terminate program.
Read a [PartNumber, CreditDebit, Amount] transaction.
5.
Write report heading.
6.
7.
Write a net movement line.
Set NetMovement to zero.
8.
Add Amount to NetMovement.
9.
Subtract Amount from NetMovement
CS646: Software Design and Architectures
Add operations to sequential processing diagram
program
process
heading
process
body
process part
group and line
process part
group body
process
record
process
issue
CS646: Software Design and Architectures
process
line
process
receipt
Derivation of pseudo-code
begin
open sort stream;
read a [PartNumber, CreditDebit, Amount] transaction;
write heading;
loop while not end-of-sort-stream
set NetMovement to zero;
loop while same-part-number
if (CreditDebit = debit) then
Subtract Amount from NetMovement
else
Add Amount to NetMovemen;
read a [PartNumber, CreditDebit, Amount] transaction;
end loop;
write a net movement line;
end loop;
close sort stream;
terminate program;
end
CS646: Software Design and Architectures
Complications
Structure clashes: occur when points of commonality between input
and output structure diagrams cannot be determined. A suggested
solution is termed program inversion, and is essentially the
decomposition of the process into two processes.
The need for lookahead. E.g., processing any element of a sequence
of items depends on all items being error free. Solution is to employ
backtracking.
CS646: Software Design and Architectures
JSD: Overall process
A process model for both analysis and design. Overall process can be
described by an ESD (i.e., entity structure diagram).
JSD
procedure
modeling
stage
entity
analysis
network
stage
initial model
phase
adding
interaction
functions
CS646: Software Design and Architectures
implementation
stage
elaboration
phase
adding
information
functions
process
timing and
synchronization
JSD: Overall process (contd)
Results of each stage and phase:
Entity analysis: a collection of ESDs.
Initial model phase: an SSD and additional ESDs.
Adding interactive functions: a modified SSD and additional ESDs.
Adding information functions: a modified SSD and additional ESDs.
Process timing and synchronization: a modified SSD, additional ESDs
and timing constraints.
Implementation stage: pseudo-code for ESDs, process packaging, etc.
CS646: Software Design and Architectures
JSD: SSDs versus DFDs
transactions
sort by
part
number
transactions
(ordered by
part number)
generate
report
net movement
report
manager
inventory data
inventory
data manager
SV
sort by
part number
CS646: Software Design and Architectures
generate
report
JSD: SSDs versus DFDs (contd)
State vectors are owned by a single process.
process
SV
A rough merge can be specified for input streams.
producer
process 1
1
consumer
process
producer
process 2
CS646: Software Design and Architectures