Jackson structured programming

[1] In a 2001 conference talk,[2] he provided a retrospective analysis of the original driving forces behind the method, and related it to subsequent software engineering developments.

Jackson criticises the traditional single-loop version for failing to process the structure of the input file (repeating groups of records containing repeating individual records) in a natural way.

One sign of its unnatural design is that, in order to work properly, it is forced to include special code for handling the first and last record of the file.

Jackson's major insight was that requirement changes are usually minor tweaks to the existing structures.

Each input and output is modelled as a separate Data Structure Diagram (DSD).

To make JSP work for compute-intensive applications, such as digital signal processing (DSP) it is also necessary to draw algorithm structure diagrams, which focus on internal data structures rather than input and output ones.

This step may involve the addition of a small amount of high level control structure to marry up the inputs and outputs.

JSP is geared towards programming at the level of control structures, so the implemented designs use just primitive operations, sequences, iterations and selections.

Selection is similar to a sequence, but with a circle drawn in the top right hand corner of each optional operation.

With JSP, the first step is to describe the data structure(s) of a program's input stream(s).

The second step is to describe the output data structure, which in this case consists of zero or more iterations of byte pairs.

The next step is to describe the correspondences between the components of the input and output structures.

Also, at this stage conditions on iterations (loops) and selections (if-then-else or case statements) are listed and added to the program structure diagram.

(For example, at night a bank would run a batch program that would update the balances in its customers' accounts based on records of the deposits and withdrawals that they had made that day.)

Instead, following the work of C. A. R. Hoare, JSP and JSD describe software objects as co-routines.

Example of a JSP diagram.