Jackson Structured Programming and Jackson System Design
Transcript of Jackson Structured Programming and Jackson System Design
-
8/20/2019 Jackson Structured Programming and Jackson System Design
1/14
CS646: Software Design and Architectures
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 ofstructure 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.
-
8/20/2019 Jackson Structured Programming and Jackson System Design
2/14
CS646: Software Design and Architectures
JSP: Overall process
Starting with
proceed as follows:
processinput output
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.
-
8/20/2019 Jackson Structured Programming and Jackson System Design
3/14
CS646: Software Design and Architectures
Example: an inventory reporting application
Inventory data contains a collection of transactions, each of which has a partnumber 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.
sort by
part
number
inventory data
generate
reportmanager
transactions
transactions
(ordered by
part number)
net movement
report
-
8/20/2019 Jackson Structured Programming and Jackson System Design
4/14
CS646: Software Design and Architectures
The input and output structure diagrams
input stream
part group
movement
record
receiptissue
net
movement line
heading body
output
report
-
8/20/2019 Jackson Structured Programming and Jackson System Design
5/14
CS646: Software Design and Architectures
Identifying points of correspondence
input stream
part group
movement
record
receiptissue
net
movement line
heading body
output
report
-
8/20/2019 Jackson Structured Programming and Jackson System Design
6/14
CS646: Software Design and Architectures
Derive sequential processing diagram
process part
group and line
process part
group body
processrecord
process
receipt
process
issue
process
line
process
heading
process
body
program
-
8/20/2019 Jackson Structured Programming and Jackson System Design
7/14
CS646: Software Design and Architectures
Derive additional operations
1. Open sort stream.2. Close sort stream.
3. Terminate program.
4. Read a [PartNumber, CreditDebit, Amount] transaction.
5. Write report heading.
6. Write a net movement line.
7. Set NetMovement to zero.
8. Add Amount to NetMovement.
9. Subtract Amount from NetMovement
-
8/20/2019 Jackson Structured Programming and Jackson System Design
8/14
CS646: Software Design and Architectures
Add operations to sequential processing diagram
process part
group and line
process part
group body
processrecord
process
receipt
process
issue
process
line
process
heading
process
body
program
321 4 5
7 6
4
89
-
8/20/2019 Jackson Structured Programming and Jackson System Design
9/14
CS646: Software Design and Architectures
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’) thenSubtract 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
-
8/20/2019 Jackson Structured Programming and Jackson System Design
10/14
CS646: Software Design and Architectures
Complications
Structure clashes: occur when points of commonality between input
and output structure diagrams cannot be determined. A suggestedsolution 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 sequenceof items depends on all items being error free. Solution is to employ
backtracking .
-
8/20/2019 Jackson Structured Programming and Jackson System Design
11/14
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
network stage
initial model
phase
adding
information
functions
adding
interaction
functions
modelingstage
implementationstage
elaboration
phase
entity
analysis
process
timing and
synchronization
-
8/20/2019 Jackson Structured Programming and Jackson System Design
12/14
CS646: Software Design and Architectures
JSD: Overall process (cont’d)
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 ESDsand timing constraints.
Implementation stage: pseudo-code for ESDs, process packaging, etc.
-
8/20/2019 Jackson Structured Programming and Jackson System Design
13/14
CS646: Software Design and Architectures
JSD: SSDs versus DFDs
sort by part
number
inventory data
generatereport
manager transactions
transactions
(ordered by
part number)
net movement
report
inventory
data manager SV
generate
report
sort by
part number 1 2
-
8/20/2019 Jackson Structured Programming and Jackson System Design
14/14
CS646: Software Design and Architectures
JSD: SSDs versus DFDs (cont’d)
process SV
State vectors are “owned” by a single process.
A “rough merge” can be specified for input streams.
consumer process
producer
process 11
producer
process 22