<s>
The	O
Stream	O
X-machine	B-Application
(	O
SXM	B-Application
)	O
is	O
a	O
model	O
of	O
computation	O
introduced	O
by	O
Gilbert	O
Laycock	O
in	O
his	O
1993	O
PhD	O
thesis	O
,	O
The	O
Theory	O
and	O
Practice	O
of	O
Specification	O
Based	O
Software	O
Testing	O
.	O
</s>
<s>
Based	O
on	O
Samuel	O
Eilenberg	O
's	O
X-machine	B-Application
,	O
an	O
extended	O
finite-state	B-Architecture
machine	I-Architecture
for	O
processing	O
data	O
of	O
the	O
type	O
X	O
,	O
the	O
Stream	O
X-Machine	B-Application
is	O
a	O
kind	O
of	O
X-machine	B-Application
for	O
processing	O
a	O
memory	O
data	O
type	O
Mem	O
with	O
associated	O
input	O
and	O
output	O
streams	O
In*	O
and	O
Out*	O
,	O
that	O
is	O
,	O
where	O
X	O
=	O
Out*	O
×	O
Mem	O
×	O
In*	O
.	O
</s>
<s>
The	O
transitions	O
of	O
a	O
Stream	O
X-Machine	B-Application
are	O
labelled	O
by	O
functions	O
of	O
the	O
form	O
φ	O
:	O
Mem	O
×	O
In	O
→	O
Out	O
×	O
Mem	O
,	O
that	O
is	O
,	O
which	O
compute	O
an	O
output	O
value	O
and	O
update	O
the	O
memory	O
,	O
from	O
the	O
current	O
memory	O
and	O
an	O
input	O
value	O
.	O
</s>
<s>
Although	O
the	O
general	O
X-machine	B-Application
had	O
been	O
identified	O
in	O
the	O
1980s	O
as	O
a	O
potentially	O
useful	O
formal	O
model	O
for	O
specifying	O
software	O
systems	O
,	O
it	O
was	O
not	O
until	O
the	O
emergence	O
of	O
the	O
Stream	O
X-Machine	B-Application
that	O
this	O
idea	O
could	O
be	O
fully	O
exploited	O
.	O
</s>
<s>
Berlin	O
:	O
Springer-Verlag.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1	O
in	O
which	O
complex	O
software	O
systems	O
with	O
hundreds	O
of	O
thousands	O
of	O
states	O
and	O
millions	O
of	O
transitions	O
could	O
be	O
decomposed	O
into	O
separate	O
SXMs	B-Application
that	O
could	O
be	O
tested	O
exhaustively	O
,	O
with	O
a	O
guaranteed	O
proof	O
of	O
correct	O
integration	O
.	O
</s>
<s>
Because	O
of	O
the	O
intuitive	O
interpretation	O
of	O
Stream	O
X-Machines	B-Application
as	O
"	O
processing	O
agents	O
with	O
inputs	O
and	O
outputs	O
"	O
,	O
they	O
have	O
attracted	O
increasing	O
interest	O
,	O
because	O
of	O
their	O
utility	O
in	O
modelling	O
real-world	O
phenomena	O
.	O
</s>
<s>
The	O
SXM	B-Application
model	O
has	O
important	O
applications	O
in	O
fields	O
as	O
diverse	O
as	O
computational	O
biology	O
,	O
software	O
testing	O
and	O
agent-based	O
computational	O
economics	O
.	O
</s>
<s>
A	O
Stream	O
X-Machine	B-Application
(	O
SXM	B-Application
)	O
is	O
an	O
extended	O
finite-state	B-Architecture
machine	I-Architecture
with	O
auxiliary	O
memory	O
,	O
inputs	O
and	O
outputs	O
.	O
</s>
<s>
It	O
is	O
a	O
variant	O
of	O
the	O
general	O
X-machine	B-Application
,	O
in	O
which	O
the	O
fundamental	O
data	O
type	O
X	O
=	O
Out*	O
×	O
Mem	O
×	O
In*	O
,	O
that	O
is	O
,	O
a	O
tuple	O
consisting	O
of	O
an	O
output	O
stream	O
,	O
the	O
memory	O
and	O
an	O
input	O
stream	O
.	O
</s>
<s>
A	O
SXM	B-Application
separates	O
the	O
control	O
flow	O
of	O
a	O
system	O
from	O
the	O
processing	O
carried	O
out	O
by	O
the	O
system	O
.	O
</s>
<s>
The	O
control	O
is	O
modelled	O
by	O
a	O
finite-state	B-Architecture
machine	I-Architecture
(	O
known	O
as	O
the	O
associated	O
automaton	O
)	O
whose	O
transitions	O
are	O
labelled	O
with	O
processing	O
functions	O
chosen	O
from	O
a	O
set	O
Φ	O
(	O
known	O
as	O
the	O
type	O
of	O
the	O
machine	O
)	O
,	O
which	O
act	O
upon	O
the	O
fundamental	O
data	O
type	O
.	O
</s>
<s>
Each	O
recognised	O
path	O
through	O
the	O
machine	O
therefore	O
generates	O
a	O
list	O
φ1	O
...	O
φn	O
of	O
functions	O
,	O
and	O
the	O
SXM	B-Application
composes	O
these	O
functions	O
together	O
to	O
generate	O
a	O
relation	O
on	O
the	O
fundamental	O
data	O
type	O
|φ1	O
...	O
φn|	O
:	O
X	O
→	O
X	O
.	O
</s>
<s>
The	O
Stream	O
X-Machine	B-Application
is	O
a	O
variant	O
of	O
X-machine	B-Application
in	O
which	O
the	O
fundamental	O
data	O
type	O
X	O
=	O
Out*	O
×	O
Mem	O
×	O
In*	O
.	O
</s>
<s>
In	O
the	O
original	O
X-machine	B-Application
,	O
the	O
φi	O
are	O
general	O
relations	O
on	O
X	O
.	O
</s>
<s>
In	O
the	O
Stream	O
X-Machine	B-Application
,	O
these	O
are	O
usually	O
restricted	O
to	O
functions	O
;	O
however	O
the	O
SXM	B-Application
is	O
still	O
only	O
deterministic	O
if	O
(	O
at	O
most	O
)	O
one	O
transition	O
is	O
enabled	O
in	O
each	O
state	O
.	O
</s>
<s>
A	O
general	O
X-machine	B-Application
handles	O
input	O
and	O
output	O
using	O
a	O
prior	O
encoding	O
function	O
α	O
:	O
Y	O
→	O
X	O
for	O
input	O
,	O
and	O
a	O
posterior	O
decoding	O
function	O
β	O
:	O
X	O
→	O
Z	O
for	O
output	O
,	O
where	O
Y	O
and	O
Z	O
are	O
respectively	O
the	O
input	O
and	O
output	O
types	O
.	O
</s>
<s>
In	O
a	O
Stream	O
X-Machine	B-Application
,	O
these	O
types	O
are	O
streams	O
:	O
</s>
<s>
Each	O
processing	O
function	O
in	O
a	O
SXM	B-Application
is	O
given	O
the	O
abbreviated	O
type	O
φSXM	O
:	O
Mem	O
×	O
In	O
→	O
Out	O
×	O
Mem	O
.	O
</s>
<s>
This	O
can	O
be	O
mapped	O
onto	O
a	O
general	O
X-machine	B-Application
relation	O
of	O
the	O
type	O
φ	O
:	O
X	O
→	O
X	O
if	O
we	O
treat	O
this	O
as	O
computing	O
:	O
</s>
<s>
Because	O
of	O
the	O
above	O
equivalence	O
,	O
attention	O
may	O
focus	O
on	O
the	O
way	O
a	O
Stream	O
X-Machine	B-Application
processes	O
inputs	O
into	O
outputs	O
,	O
using	O
an	O
auxiliary	O
memory	O
.	O
</s>
<s>
This	O
is	O
often	O
called	O
the	O
behaviour	O
of	O
the	O
Stream	O
X-Machine	B-Application
.	O
</s>
<s>
If	O
the	O
specification	O
and	O
implementation	O
are	O
both	O
assumed	O
to	O
be	O
Stream	O
X-Machines	B-Application
,	O
then	O
the	O
implementation	O
may	O
be	O
tested	O
for	O
conformance	O
to	O
the	O
specification	O
machine	O
,	O
by	O
observing	O
the	O
inputs	O
and	O
outputs	O
at	O
each	O
step	O
.	O
</s>
<s>
The	O
testing	O
method	O
is	O
described	O
in	O
a	O
separate	O
article	O
on	O
the	O
Stream	O
X-Machine	B-Application
testing	O
methodology	O
.	O
</s>
