词条 | X-machine |
释义 |
The X-machine (XM) is a theoretical model of computation introduced by Samuel Eilenberg in 1974. The X in "X-machine" represents the fundamental data type on which the machine operates; for example, a machine that operates on databases (objects of type database) would be a database-machine. The X-machine model is structurally the same as the finite state machine, except that the symbols used to label the machine's transitions denote relations of type X→X. Crossing a transition is equivalent to applying the relation that labels it (computing a set of changes to the data type X), and traversing a path in the machine corresponds to applying all the associated relations, one after the other. Original theoryEilenberg's original X-machine was a completely general theoretical model of computation (subsuming the Turing machine, for example), which admitted deterministic, non-deterministic and non-terminating computations. His seminal work published many variants of the basic X-machine model, each of which generalized the finite state machine in a slightly different way. In the most general model, an X-machine is essentially a "machine for manipulating objects of type X". Suppose that X is some datatype, called the fundamental datatype, and that Φ is a set of (partial) relations φ: X → X. An X-machine is a finite state machine whose arrows are labelled by relations in Φ. In any given state, one or more transitions may be enabled if the domain of the associated relation φi accepts (a subset of) the current values stored in X. In each cycle, all enabled transitions are assumed to be taken. Each recognised path through the machine generates a list φ1 ... φn of relations. We call the composition φ1 o ... o φn of these relations the path relation corresponding to that path. The behaviour of the X-machine is defined to be the union of all the behaviours computed by its path relations. In general, this is non-deterministic, since applying any relation computes a set of outcomes on X. In the formal model, all possible outcomes are considered together, in parallel. For practical purposes, an X-machine should describe some finite computation. An encoding function α: Y → X converts from some input data type Y into the initial state of X, and a decoding function β: X → Z, converts back from the final state(s) of X into some output data type Z. Once the initial state of X is populated, the X-machine runs to completion, and the outputs are then observed. In general, a machine may deadlock (be blocked), or livelock (never halt), or perform one or more complete computations. For this reason, more recent research has focused on deterministic X-machines, whose behaviour can be controlled and observed more precisely. ExampleA compiler with a peep-hole optimizer can be thought of as a machine for optimizing program structure. In this Optimizer-machine, the encoding function α takes source code from the input-type Y (the program source) and loads it into the memory-type X (a parse tree). Suppose that the machine has several states, called FindIncrements, FindSubExprs and Completed. The machine starts in the initial state FindIncrements, which is linked to other states via the transitions: '''FindIncrements''' →'''DoIncrement''' '''FindIncrements''' '''FindIncrements''' →'''SkipIncrement''' '''FindSubExprs''' '''FindSubExprs''' →'''DoSubExpr''' '''FindSubExprs''' '''FindSubExprs''' →'''SkipSubExpr''' '''Completed''' The relation DoIncrement maps a parsed subtree corresponding to "x := x + 1" into the optimized subtree "++x". The relation DoSubExpr maps a parse tree containing multiple occurrences of the same expression "x + y ... x + y" into an optimized version with a local variable to store the repeated computation "z := x + y; ... z ... z". These relations are only enabled if X contains the domain values (subtrees) on which they operate. The remaining relations SkipIncrement and SkipSubExpr are nullops (identity relations) enabled in the complementary cases. So, the Optimizer-machine will run to completion, first converting trivial additions into in-place increments (while in the FindIncrements state), then it will move on to the FindSubExprs state and perform a series of common sub-expression removals, after which it will move to the final state Completed. The decoding function β will then map from the memory-type X (the optimized parse-tree) into the output-type Z (optimized machine code). ConventionWhen referring to Eilenberg's original model, "X-machine" is typically written with a lower-case "m", because the sense is "any machine for processing X". When referring to later specific models, the convention is to use a capital "M" as part of the proper name of that variant. 1980sInterest in the X-machine was revived in the late 1980s by Mike Holcombe, his modelling of processes in cell biochemistry, and Stannett's modelling of decision-making in military command systems. 1990sX-machines have received renewed attention since the mid-1990s, when Gilbert Laycock's deterministic Stream X-Machine[1] was found to serve as the basis for specifying large software systems that are completely testable. the Communicating Stream X-Machine offers a useful testable model for biological processes[2] and future swarm-based satellite systems. 2000sX-machines have been applied to lexical semantics by Andras Kornai, who models word meaning by `pointed' machines that have one member of the base set X distinguished.[3] Application to other branches of linguistics, in particular to a contemporary reformulation of Pāṇini were pioneered by Gerard Huet and his co-workers[4][5] Major variantsThe X-machine is rarely encountered in its original form, but underpins several subsequent models of computation. The most influential model on theories of software testing has been the Stream X-Machine. NASA has recently discussed using a combination of Communicating Stream X-Machines and the process calculus WSCSS in the design and testing of swarm satellite systems. Analog X Machine (AXM)The earliest variant, the continuous-time Analog X-Machine (AXM), was introduced by Mike Stannett in 1990 as a potentially "super-Turing" model of computation; it is consequently related to work in hypercomputation theory. Stream X-Machine (SXM){{main|Stream X-Machine}}The most commonly encountered X-machine variant is Gilbert Laycock's 1993 Stream X-Machine (SXM) model,[1] which forms the basis for Mike Holcombe and Florentin Ipate's theory of complete software testing, which guarantees known correctness properties, once testing is over.[6] The Stream X-Machine differs from Eilenberg's original model, in that the fundamental data type X is of the form Out* × Mem × In*, where In* is an input sequence, Out* is an output sequence, and Mem is the (rest of the) memory. The advantage of this model is that it allows a system to be driven, one step at a time, through its states and transitions, while observing the outputs at each step. These are witness values, that guarantee that particular functions were executed on each step. As a result, complex software systems may be decomposed into a hierarchy of Stream X-Machines, designed in a top-down way and tested in a bottom-up way. This divide-and-conquer approach to design and testing is backed by Florentin Ipate's proof of correct integration,[7] which proves how testing the layered machines independently is equivalent to testing the composed system. Communicating X-Machine (CXM){{Redirect|CXM|the Angolan airport with that IATA code|Camaxilo Airport}}The earliest proposal for connecting several X-machines in parallel is Judith Barnard's 1995 Communicating X-machine (CXM or COMX) model, in which machines are connected via named communication channels (known as ports); this model exists in both discrete- and real-timed variants. A similar Communicating X-Machine approach using buffered channels was developed by Petros Kefalas.[8][9] The focus of this work was on expressiveness in the composition of components. The ability to reassign channels meant that some of the testing theorems from Stream X-Machines did not carry over. These variants are discussed in more detail on a separate page. Communicating Stream X-Machine (CSXM)The first fully formal model of concurrent X-machine composition was proposed in 1999 by Cristina Vertan and Horia Georgescu,[10] based on earlier work on communicating automatata by Philip Bird and Anthony Cowling. Abstract Bălănescu, Cowling, Georgescu, Vertan and others have studied the formal properties of this CSXM model in some detail. Full input/output relations can be shown. The communication matrix establishes a protocol for synchronous communication. The advantage of this is that it decouples each machine's processing from their communication, allowing the separate testing of each behaviour. This compositional model was proven equivalent to a standard Stream X-Machine,[11] so leveraging the earlier testing theory developed by Holcombe and Ipate. This X-machine variant is discussed in more detail on a separate page. Object X-Machine (OXM)Kirill Bogdanov and Anthony Simons developed several variants of the X-machine to model the behaviour of objects in object-oriented systems.[12] This model differs from the Stream X-Machine approach, in that the monolithic data type X is distributed over, and encapsulated by, several objects, which are serially composed; and systems are driven by method invocations and returns, rather than by inputs and outputs. Further work in this area concerned adapting the formal testing theory in the context of inheritance, which partitions the state-space of the superclass in extended subclass objects.[13] A "CCS-augmented X-machine" (CCSXM) model was later developed by Simons and Stannett in 2002 to support complete behavioural testing of object-oriented systems, in the presence of asynchronous communication See also
Downloadable technical reports
External links
References1. ^1 Gilbert Laycock (1993) The Theory and Practice of Specification Based Software Testing. PhD Thesis, University of Sheffield. Abstract {{webarchive |url=https://web.archive.org/web/20071105145328/http://www.mcs.le.ac.uk/people/gtl1/PhDabstract.html |date=November 5, 2007 }} {{DEFAULTSORT:X-Machine}}2. ^A. Bell and M. Holcombe (1996) 'Computational models of cellular processing', in Computation in Cellular and Molecular Biological Systems, eds. M. Holcombe, R. Paton and R. Cuthbertson, Singapore, World Scientific Press. 3. ^A. Kornai (2009) The Algebra of Lexical Semantics. Paper presented at the 2009 Meeting of the Assiciation for Mathematics of Language. In In C. Ebert, G. Jäger, J. Michaelis (eds) Proc. 11th Mathematics of Language workshop (MOL11) Springer LNCS 6149 174-199 4. ^G. Huet and B. Razet (2008) "Computing with Relational Machines" Tutorial presented at ICON, Dec 2008, Poona {{cite web |url=http://yquem.inria.fr/~huet/PUBLIC/Landin6.pdf |title=Archived copy |accessdate=August 7, 2013 |deadurl=yes |archiveurl=https://web.archive.org/web/20150219205720/http://yquem.inria.fr/~huet/PUBLIC/Landin6.pdf |archivedate=February 19, 2015 }} 5. ^P. Goyal, G. Huet, A. Kulkarni, P. Scharf, R. Bunker (2012) "A Distributed Platform for Sanskrit Processing" In Proc. COLING 2012, pp 1011–1028 [https://www.aclweb.org/anthology/C/C12/C12-1062.pdf] 6. ^F. Ipate and M. Holcombe (1998) 'A method for refining and testing generalised machine specifications'. Int. J. Comp. Math. 68, pp. 197-219. 7. ^F. Ipate and M. Holcombe (1997) 'An integration testing method that is proved to find all faults', International Journal of Computer Mathematics 63, pp. 159-178. 8. ^E. Kehris, G. Eleftherakis and P. Kefalas (2000) 'Using X-machines to model and test discrete event simulation programs', Proc. 4th World Multiconference on Circuits, Systems, Communications and Computers, Athens. 9. ^P. Kefalas, G. Eleftherakis and E. Kehris (2000) 'Communicating X-machines: a practical approach for modular specification of large systems', Technical Report CS-09/00, Department of Computer Science, City College, Thessaloniki. 10. ^H. Georgescu and C. Vertan (2000) 'A new approach to communicating stream X-machines', Journal of Universal Computer Science 6 (5), pp. 490-502. 11. ^T.Balanescu, A. J. Cowling, H. Georgescu, M. Gheorghe, M. Holcombe and C. Vertan (1999) 'Communicating X-machines systems are no more than X-machines', Journal of Universal Computer Science, 5 (9), pp. 494-507. 12. ^A. J. H. Simons, K. E. Bogdanov and W. M. L. Holcombe (2001) 'Complete functional testing using object machines', Technical Report CS-01-18, Department of Computer Science, University of Sheffield 13. ^A. J. H. Simons (2006) 'A theory of regression testing for behaviourally compatible object types', Software Testing, Verification and Reliability, 16 (3), John Wiley, pp. 133-156. 2 : Theory of computation|Models of computation |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。