<s>
Jackson	B-Application
structured	I-Application
programming	I-Application
(	O
JSP	O
)	O
is	O
a	O
method	O
for	O
structured	B-Language
programming	I-Language
developed	O
by	O
British	O
software	O
consultant	O
Michael	O
A	O
.	O
Jackson	O
and	O
described	O
in	O
his	O
1975	O
book	O
Principles	O
of	O
Program	O
Design	O
.	O
</s>
<s>
These	O
structures	O
are	O
diagrammed	O
as	O
(	O
in	O
effect	O
)	O
a	O
visual	O
representation	O
of	O
a	O
regular	B-Language
expression	I-Language
.	O
</s>
<s>
Jackson	O
's	O
aim	O
was	O
to	O
make	O
COBOL	B-Application
batch	O
file	O
processing	O
programs	O
easier	O
to	O
modify	O
and	O
maintain	O
,	O
but	O
the	O
method	O
can	O
be	O
used	O
to	O
design	O
programs	O
for	O
any	O
programming	O
language	O
that	O
has	O
structured	O
control	O
constructs	O
sequence	O
,	O
iteration	O
,	O
and	O
selection	O
(	O
"	O
if/then/else	O
"	O
)	O
.	O
</s>
<s>
Jackson	B-Application
Structured	I-Application
Programming	I-Application
was	O
similar	O
to	O
Warnier/Orr	B-Application
structured	I-Application
programming	I-Application
although	O
JSP	O
considered	O
both	O
input	O
and	O
output	O
data	O
structures	O
while	O
the	O
Warnier/Orr	B-Application
method	O
focused	O
almost	O
exclusively	O
on	O
the	O
structure	O
of	O
the	O
output	O
stream	O
.	O
</s>
<s>
At	O
the	O
time	O
that	O
JSP	O
was	O
developed	O
,	O
most	O
programs	O
were	O
batch	O
COBOL	B-Application
programs	O
that	O
processed	O
sequential	O
files	O
stored	O
on	O
tape	O
.	O
</s>
<s>
Jackson	O
asserted	O
that	O
this	O
program	B-Language
structure	I-Language
was	O
almost	O
always	O
wrong	O
,	O
and	O
encouraged	O
programmers	O
to	O
look	O
for	O
more	O
complex	O
data	O
structures	O
.	O
</s>
<s>
Here	O
is	O
his	O
example	O
,	O
translated	O
from	O
COBOL	B-Application
into	O
Java	O
.	O
</s>
<s>
Each	O
input	O
and	O
output	O
is	O
modelled	O
as	O
a	O
separate	O
Data	B-Application
Structure	I-Application
Diagram	I-Application
(	O
DSD	O
)	O
.	O
</s>
<s>
The	O
input	O
and	O
output	O
structures	O
are	O
then	O
unified	O
or	O
merged	O
into	O
a	O
final	O
program	B-Language
structure	I-Language
,	O
known	O
as	O
a	O
Program	B-Language
Structure	I-Language
Diagram	O
(	O
PSD	O
)	O
.	O
</s>
<s>
As	O
an	O
example	O
,	O
here	O
is	O
how	O
a	O
JSP	O
programmer	O
would	O
design	O
and	O
code	O
a	O
run	B-Algorithm
length	I-Algorithm
encoder	I-Algorithm
.	O
</s>
<s>
A	O
run	B-Algorithm
length	I-Algorithm
encoder	I-Algorithm
is	O
a	O
program	O
whose	O
input	O
is	O
a	O
stream	O
of	O
bytes	O
which	O
can	O
be	O
viewed	O
as	O
occurring	O
in	O
runs	O
,	O
where	O
a	O
run	O
consists	O
of	O
one	O
or	O
more	O
occurrences	O
of	O
bytes	O
of	O
the	O
same	O
value	O
.	O
</s>
<s>
Run	B-Algorithm
length	I-Algorithm
encoders	O
are	O
often	O
used	O
for	O
crudely	O
compressing	O
bitmaps	O
.	O
</s>
<s>
Here	O
is	O
the	O
JSP	O
data	B-Application
structure	I-Application
diagram	I-Application
for	O
the	O
input	O
stream	O
.	O
</s>
<s>
The	O
next	O
step	O
is	O
to	O
use	O
the	O
correspondences	O
between	O
the	O
two	O
data	O
structures	O
to	O
create	O
a	O
program	B-Language
structure	I-Language
that	O
is	O
capable	O
of	O
processing	O
the	O
input	O
data	O
structure	O
and	O
producing	O
the	O
output	O
data	O
structure	O
.	O
</s>
<s>
See	O
the	O
discussion	O
of	O
structure	B-Application
clashes	I-Application
,	O
below	O
.	O
)	O
</s>
<s>
Once	O
the	O
program	B-Language
structure	I-Language
is	O
finished	O
,	O
the	O
programmer	O
creates	O
a	O
list	O
of	O
the	O
computational	O
operations	O
that	O
the	O
program	O
must	O
perform	O
,	O
and	O
the	O
program	B-Language
structure	I-Language
diagram	O
is	O
fleshed	O
out	O
by	O
hanging	O
those	O
operations	O
off	O
of	O
the	O
appropriate	O
structural	O
components	O
.	O
</s>
<s>
Also	O
,	O
at	O
this	O
stage	O
conditions	O
on	O
iterations	O
(	O
loops	O
)	O
and	O
selections	O
(	O
if-then-else	O
or	O
case	O
statements	O
)	O
are	O
listed	O
and	O
added	O
to	O
the	O
program	B-Language
structure	I-Language
diagram	O
.	O
</s>
<s>
JSP	O
also	O
recognized	O
three	O
situations	O
that	O
are	O
called	O
"	O
structure	B-Application
clashes	I-Application
"	O
a	O
boundary	O
clash	O
,	O
an	O
ordering	O
clash	O
,	O
and	O
an	O
interleaving	O
clash	O
and	O
provided	O
techniques	O
for	O
dealing	O
with	O
them	O
.	O
</s>
<s>
In	O
structure	B-Application
clash	I-Application
situations	O
the	O
input	O
and	O
output	O
data	O
structures	O
are	O
so	O
incompatible	O
that	O
it	O
is	O
not	O
possible	O
to	O
produce	O
the	O
output	O
file	O
from	O
the	O
input	O
file	O
.	O
</s>
<s>
Instead	O
,	O
following	O
the	O
work	O
of	O
C	O
A	O
R	O
Hoare	O
,	O
JSP	O
and	O
JSD	O
describe	O
software	O
objects	O
as	O
co-routines	B-Architecture
.	O
</s>
