Jump to content

Stream X-Machine

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by AJHSimons (talk | contribs) at 14:16, 31 March 2008 (Introduction, lower-case 'c' in computational biology.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The Stream X-machine (SXM) is a model of computation introduced by Gilbert Laycock in his 1993 PhD thesis, The Theory and Practice of Specification Based Software Testing.[1] Based on Samuel Eilenberg's 1974 X-machine model, a general machine for processing data of the type X,[2], the Stream X-Machine is a particular variant for processing a data type with associated input and output streams, that is, where X = Out* × Mem × In*. A Stream X-Machine is an extended finite state machine with an auxiliary memory, Mem, whose transitions are labelled by functions of the form φ: Mem × InOut × Mem, that is, which compute an output value and update the memory, from the current memory and an input value.

Although the general X-machine had been identified in the 1980s as a potentially useful formal model for specifying software systems,[3] it was not until the emergence of the Stream X-Machine that this idea could be fully exploited. Florentin Ipate and Mike Holcombe went on to develop a theory of complete software testing,[4], in which complex software systems with hundreds of thousands of states and millions of transitions could be decomposed into separate SXMs that could be tested exhaustively, with a guaranteed proof of correct integration.[5]

Because of the intuitive interpretation of Stream X-Machines as "processing agents with inputs and outputs", they have attracted increasing interest, because of their utility in modelling real-world phenomena. The SXM model has important applications in fields as diverse as computational biology, software testing and agent-based computational economics.

The SXM model

An SXM is a "machine for converting inputs into outputs using an auxiliary memory". Suppose that Mem is some datatype, called the memory type, and that Φ is a set of relations φ: In × MemMem × Out, where In and Out are the relevant input and output alphabets. An SXM is a finite state machine whose arrows are labelled by relations in Φ. Each recognised path through the machine generates a list φ1 ... φn of relations, and the SXM chains these relations together to generate a relation |φ1 ... φn|: XX, where X = Out* × Mem × In*.

We will use standard Haskell list notation to represent strings, so that the string hello is written [h, e, l, l, o]. The notation x:xs means "add the symbol x to the front of the string xs," and the notation xs++ys means "append the string ys to the end of the string xs." The empty list [] represents the empty string. For example, (t:[h, e, r, e]) and ([t, h, e, r ] ++ [e]) both represent the string there, as do (there++[]) and ([]++there).

For each φ, the relation |φ| is defined by



and the path relation1 ... φn| is formed by composition, viz. |φ1 ... φn| = |φ1| o ... o |φn|.


Running an SXM

In order to run an SXM, the user should specify the initial memory state, m0, and supply the input stream ins upon which the machine is to operate. The output string is initially assumed to be empty. An output string outs is deemed to be computed by the machine provided there is some recognised path p and some memory state mp such that (outs, mp, []) is related to the initial configuration ([], m0, ins) by |p|.

Seen in this way - provided the initial memory state m0 has been specified - each SXM M computes a relation |M| : In*Out*. This relation is often called the behaviour of the SXM.

Applications

See the following articles:

  • The SXM Testing (SXMT) Methodology, a complete functional testing technique. Using this methodology, it is possible to identify a finite set of tests that exhaustively determine whether an implementation matches its specification. The technique overcomes formal undecidability limitations by insisting that users apply carefully specified design for test principles during implementation.

See Also

  • X-machines, a general description of the X-machine model, including a simple example.

References

  1. ^ Gilbert Laycock (1993) The Theory and Practice of Specification Based Software Testing. PhD Thesis, University of Sheffield, Dept of Computer Science. Abstract
  2. ^ Samuel Eilenberg (1974) Automata, Languages and Machines, Vol. A. London: Academic Press.
  3. ^ M. Holcombe (1988), "X-machines as a basis for dynamic system specification", Software Engineering Journal 3(2), 69-76.
  4. ^ Mike Holcombe and Florentin Ipate (1998) Correct systems - building a business process solution. Applied Computing Series. Berlin: Springer-Verlag.
  5. ^ F. Ipate and W. M. L. Holcombe (1997), "An integration testing method which is proved to find all faults", Int. J. Comp. Math., 63, 159-178.