Jackson Structured Programming and Jackson System Design
Jackson Structured Programming and Jackson System Design
process
output
proceed as follows:
1.
Derive the structure diagrams for the input and output streams.
2.
3.
transactions
sort by
part
number
transactions
(ordered by
part number)
inventory data
generate
report
net movement
report
manager
input stream
part group
heading
movement
record
issue
body
net
movement line
receipt
input stream
part group
heading
movement
record
issue
body
net
movement line
receipt
process
heading
process
body
process part
group and line
process part
group body
process
line
process
record
process
issue
process
receipt
3.
4.
Terminate program.
Read a [PartNumber, CreditDebit, Amount] transaction.
5.
6.
7.
8.
9.
process
heading
process
body
process part
group and line
process part
group body
process
record
process
issue
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.
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
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
generate
report
process
SV
1
consumer
process
producer
process 2