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 . Based on Samuel Eilenberg 's X-machine , an extended finite-state machine for processing data of the type X , the Stream X-Machine is a kind of X-machine for processing a memory data type Mem with associated input and output streams In * and Out *, that is, where X = Out * × Mem × In *. The transitions of a Stream X-Machine are labelled by functions of the form φ: Mem × In → Out × Mem , that is, which compute an output value and update the memory, from the current memory and an input value.
50-639: SXM may refer to: SXM (computational model) , model for a Stream X-Machine SXM (transactional memory) , a software under development at Microsoft Research SXM (socket) , a physical computer interface used by Nvidia computational GPU modules SXM inc , a digital studio producing online entertainment for brands Sint Maarten 's ISO 3166-1 alpha-3 code Princess Juliana International Airport 's IATA code Sint Maarten national football team 's FIFA code Sirius XM Radio 's NYSE symbol Servicios Aéreos Especializados Mexicanos 's ICAO code Starbury SXM,
100-506: A Mealy machine state may have different output labels on its incoming transitions (edges). Every such state needs to be split in multiple Moore machine states, one for every incident output symbol. Optimizing an FSM means finding a machine with the minimum number of states that performs the same function. The fastest known algorithm doing this is the Hopcroft minimization algorithm . Other techniques include using an implication table , or
150-426: A basketball shoe produced by Starbury SxM , a 1994 album by Sangue Misto SxM, formats of scanning microscope image handled by Image SXM sxm , file extension for math files from StarOffice's StarMath (version 1–7) sxm , file extension for math files from OpenOffice.org XML (version 1) Topics referred to by the same term [REDACTED] This disambiguation page lists articles associated with
200-531: A class of automata studied in automata theory and the theory of computation . In computer science, finite-state machines are widely used in modeling of application behavior ( control theory ), design of hardware digital systems , software engineering , compilers , network protocols , and computational linguistics . Finite-state machines can be subdivided into acceptors, classifiers, transducers and sequencers. Acceptors (also called detectors or recognizers ) produce binary output, indicating whether or not
250-413: A deterministic automaton, every state has exactly one transition for each possible input. In a non-deterministic automaton, an input can lead to one, more than one, or no transition for a given state. The powerset construction algorithm can transform any nondeterministic automaton into a (usually more complex) deterministic automaton with identical functionality. A finite-state machine with only one state
300-607: A different formalism and set of semantics. These charts, like Harel's original state machines, support hierarchically nested states, orthogonal regions , state actions, and transition actions. In accordance with the general classification, the following formal definitions are found. A deterministic finite-state machine or deterministic finite-state acceptor is a quintuple ( Σ , S , s 0 , δ , F ) {\displaystyle (\Sigma ,S,s_{0},\delta ,F)} , where: For both deterministic and non-deterministic FSMs, it
350-409: A gate with three rotating arms at waist height, one across the entryway. Initially the arms are locked, blocking the entry, preventing patrons from passing through. Depositing a coin or token in a slot on the turnstile unlocks the arms, allowing a single customer to push through. After the customer passes through, the arms are locked again until another coin is inserted. Considered as a state machine,
400-435: A guaranteed proof of correct integration. 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 . A Stream X-Machine (SXM)
450-429: A language that would contain every string accepted by the acceptor but none of the rejected ones; that language is accepted by the acceptor. By definition, the languages accepted by acceptors are the regular languages . The problem of determining the language accepted by a given acceptor is an instance of the algebraic path problem —itself a generalization of the shortest path problem to graphs with edges weighted by
500-400: A predetermined sequence of actions depending on a sequence of events with which they are presented. Simple examples are: vending machines , which dispense products when the proper combination of coins is deposited; elevators , whose sequence of stops is determined by the floors requested by riders; traffic lights , which change sequence when cars are waiting; combination locks , which require
550-589: A second block of combinational logic that determines the output of an FSM. One of the classic hardware implementations is the Richards controller . In a Medvedev machine , the output is directly connected to the state flip-flops minimizing the time delay between flip-flops and output. Through state encoding for low power state machines may be optimized to minimize power consumption. The following concepts are commonly used to build software applications with finite-state machines: Finite automata are often used in
SECTION 10
#1732793721283600-431: A sequence. In other words, the relation extracts the head of the input stream, modifies memory and appends a value to the tail of the output stream. Because of the above equivalence, attention may focus on the way a Stream X-Machine processes inputs into outputs, using an auxiliary memory. Given an initial memory state mem 0 and an input stream ins , the machine executes in a step-wise fashion, consuming one input at
650-401: A time, and generating one output at a time. Provided that (at least) one recognised path path = φ 1 ... φ n exists leading to a state in which the input has been consumed, the machine yields a final memory state mem n and an output stream outs . In general, we can think of this as the relation computed by all recognised paths: | path | : In * → Out *. This is often called
700-414: A transition is enabled if the domain of the associated function φ i includes the next input value and the current memory state. If (at most) one transition is enabled in a given state, the machine is deterministic . Crossing a transition is equivalent to applying the associated function φ i , which consumes one input, possibly modifies the memory and produces one output. Each recognised path through
750-467: Is a sextuple ( Σ , Γ , S , s 0 , δ , ω ) {\displaystyle (\Sigma ,\Gamma ,S,s_{0},\delta ,\omega )} , where: If the output function depends on the state and input symbol ( ω : S × Σ → Γ {\displaystyle \omega :S\times \Sigma \rightarrow \Gamma } ) that definition corresponds to
800-670: Is an abstract machine that can be in exactly one of a finite number of states at any given time. The FSM can change from one state to another in response to some inputs ; the change from one state to another is called a transition . An FSM is defined by a list of its states, its initial state, and the inputs that trigger each transition. Finite-state machines are of two types— deterministic finite-state machines and non-deterministic finite-state machines . For any non-deterministic finite-state machine, an equivalent deterministic one can be constructed. The behavior of state machines can be observed in many devices in modern society that perform
850-431: Is an extended finite-state machine with auxiliary memory, inputs and outputs. It is a variant of the general X-machine , in which the fundamental data type X = Out * × Mem × In *, that is, a tuple consisting of an output stream, the memory and an input stream. A SXM separates the control flow of a system from the processing carried out by the system. The control is modelled by a finite-state machine (known as
900-621: Is called a "combinatorial FSM". It only allows actions upon transition into a state. This concept is useful in cases where a number of finite-state machines are required to work together, and when it is convenient to consider a purely combinatorial part as a form of FSM to suit the design tools. There are other sets of semantics available to represent state machines. For example, there are tools for modeling and designing logic for embedded controllers. They combine hierarchical state machines (which usually have more than one current state), flow graphs, and truth tables into one language, resulting in
950-512: Is conventional to allow δ {\displaystyle \delta } to be a partial function , i.e. δ ( s , x ) {\displaystyle \delta (s,x)} does not have to be defined for every combination of s ∈ S {\displaystyle s\in S} and x ∈ Σ {\displaystyle x\in \Sigma } . If an FSM M {\displaystyle M}
1000-424: Is in a state s {\displaystyle s} , the next symbol is x {\displaystyle x} and δ ( s , x ) {\displaystyle \delta (s,x)} is not defined, then M {\displaystyle M} can announce an error (i.e. reject the input). This is useful in definitions of general state machines, but less useful when transforming
1050-464: Is shown below: the combination of current state (e.g. B) and input (e.g. Y) shows the next state (e.g. C). The complete action's information is not directly described in the table and can only be added using footnotes. An FSM definition including the full action's information is possible using state tables (see also virtual finite-state machine ). The Unified Modeling Language has a notation for describing state machines. UML state machines overcome
SECTION 20
#17327937212831100-548: The Mealy model , and can be modelled as a Mealy machine . If the output function depends only on the state ( ω : S → Γ {\displaystyle \omega :S\rightarrow \Gamma } ) that definition corresponds to the Moore model , and can be modelled as a Moore machine . A finite-state machine with no output function at all is known as a semiautomaton or transition system . If we disregard
1150-542: The Unlocked state) is represented by a circular arrow returning to the original state. The arrow into the Locked node from the black dot indicates it is the initial state. A state is a description of the status of a system that is waiting to execute a transition . A transition is a set of actions to be executed when a condition is fulfilled or when an event is received. For example, when using an audio system to listen to
1200-428: The associated automaton ) whose transitions are labelled with processing functions chosen from a set Φ (known as the type of the machine), which act upon the fundamental data type. Each processing function in Φ is a partial function, and can be considered to have the type φ: Mem × In → Out × Mem , where Mem is the memory type, and In and Out are respectively the input and output types. In any given state,
1250-474: The behaviour of the Stream X-Machine. The behaviour is deterministic, if (at most) one transition is enabled in each state. This property, and the ability to control how the machine behaves in a step-wise fashion in response to inputs and memory, makes it an ideal model for the specification of software systems. If the specification and implementation are both assumed to be Stream X-Machines, then
1300-435: The frontend of programming language compilers. Such a frontend may comprise several finite-state machines that implement a lexical analyzer and a parser. Starting from a sequence of characters, the lexical analyzer builds a sequence of language tokens (such as reserved words, literals, and identifiers) from which the parser builds a syntax tree. The lexical analyzer and the parser handle the regular and context-free parts of
1350-476: The Moore reduction procedure. Additionally, acyclic FSAs can be minimized in linear time . In a digital circuit , an FSM may be built using a programmable logic device , a programmable logic controller , logic gates and flip flops or relays . More specifically, a hardware implementation requires a register to store state variables, a block of combinational logic that determines the state transition, and
1400-545: The SXM is still only deterministic if (at most) one transition is enabled in each state. A general X-machine handles input and output using a prior encoding function α: Y → X for input, and a posterior decoding function β: X → Z for output, where Y and Z are respectively the input and output types. In a Stream X-Machine, these types are streams: and the encoding and decoding functions are defined as: where ins: In *, outs: Out * and mem i : Mem . In other words,
1450-461: The binary string contains an even number of 0s (including any binary string containing no 0s). Examples of strings accepted by this acceptor are ε (the empty string ), 1, 11, 11..., 00, 010, 1010, 10110, etc. Classifiers are a generalization of acceptors that produce n -ary output where n is strictly greater than two. Transducers produce output based on a given input and/or a state using actions. They are used for control applications and in
1500-465: The elements of an (arbitrary) semiring . An example of an accepting state appears in Fig. 5: a deterministic finite automaton (DFA) that detects whether the binary input string contains an even number of 0s. S 1 (which is also the start state) indicates the state at which an even number of 0s has been input. S 1 is therefore an accepting state. This acceptor will finish in an accept state, if
1550-445: The field of computational linguistics . In control applications, two types are distinguished: Sequencers (also called generators ) are a subclass of acceptors and transducers that have a single-letter input alphabet. They produce only one sequence, which can be seen as an output sequence of acceptor or transducer outputs. A further distinction is between deterministic ( DFA ) and non-deterministic ( NFA , GNFA ) automata. In
SXM - Misplaced Pages Continue
1600-436: The finite-state machine executable. There are a large number of variants to represent an FSM such as the one in figure 3. In addition to their use in modeling reactive systems presented here, finite-state machines are significant in many different areas, including electrical engineering , linguistics , computer science , philosophy , biology , mathematics , video game programming , and logic . Finite-state machines are
1650-415: The first output symbol of a Moore machine, ω ( s 0 ) {\displaystyle \omega (s_{0})} , then it can be readily converted to an output-equivalent Mealy machine by setting the output function of every Mealy transition (i.e. labeling every edge) with the output symbol given of the destination Moore state. The converse transformation is less straightforward because
1700-553: The general X-machine had been identified in the 1980s as a potentially useful formal model for specifying software systems, 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 functional testing , 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
1750-515: The implementation may be tested for conformance to the specification machine, by observing the inputs and outputs at each step. Laycock first highlighted the utility of single-step processing with observations for testing purposes. Holcombe and Ipate developed this into a practical theory of software testing which was fully compositional, scaling up to very large systems. A proof of correct integration guarantees that testing each component and each integration layer separately corresponds to testing
1800-456: The input of a sequence of numbers in the proper order. The finite-state machine has less computational power than some other models of computation such as the Turing machine . The computational power distinction means there are computational tasks that a Turing machine can do but an FSM cannot. This is because an FSM's memory is limited by the number of states it has. A finite-state machine has
1850-399: The limitations of traditional finite-state machines while retaining their main benefits. UML state machines introduce the new concepts of hierarchically nested states and orthogonal regions , while extending the notion of actions . UML state machines have the characteristics of both Mealy machines and Moore machines . They support actions that depend on both the state of the system and
1900-475: The machine is initialized with the whole of the input stream; and the decoded result is the whole of the output stream, provided the input stream is eventually consumed (otherwise the result is undefined). Each processing function in a SXM is given the abbreviated type φ SXM : Mem × In → Out × Mem . This can be mapped onto a general X-machine relation of the type φ: X → X if we treat this as computing: where :: denotes concatenation of an element and
1950-468: The machine therefore generates a list φ 1 ... φ n of functions, and the SXM composes these functions together to generate a relation on the fundamental data type |φ 1 ... φ n |: X → X . The Stream X-Machine is a variant of X-machine in which the fundamental data type X = Out * × Mem × In *. In the original X-machine , the φ i are general relations on X . In the Stream X-Machine, these are usually restricted to functions ; however
2000-445: The machine. Some algorithms in their default form may require total functions. A finite-state machine has the same computational power as a Turing machine that is restricted such that its head may only perform "read" operations, and always has to move from left to right. That is, each formal language accepted by a finite-state machine is accepted by such a kind of restricted Turing machine, and vice versa. A finite-state transducer
2050-406: The outputs resulting from each input: The turnstile state machine can also be represented by a directed graph called a state diagram (above) . Each state is represented by a node ( circle ). Edges ( arrows ) show the transitions from one state to another. Each arrow is labeled with the input that triggers that transition. An input that doesn't cause a change of state (such as a coin input in
SXM - Misplaced Pages Continue
2100-470: The radio (the system is in the "radio" state), receiving a "next" stimulus results in moving to the next station. When the system is in the "CD" state, the "next" stimulus results in moving to the next track. Identical stimuli trigger different actions depending on the current state. In some finite-state machine representations, it is also possible to associate actions with a state: Several state-transition table types are used. The most common representation
2150-462: The received input is accepted. Each state of an acceptor is either accepting or non accepting . Once all input has been received, if the current state is an accepting state, the input is accepted; otherwise it is rejected. As a rule, input is a sequence of symbols (characters); actions are not used. The start state can also be an accepting state, in which case the acceptor accepts the empty string. The example in figure 4 shows an acceptor that accepts
2200-400: The same computational power as a Turing machine that is restricted such that its head may only perform "read" operations, and always has to move from left to right. FSMs are studied in the more general field of automata theory . An example of a simple mechanism that can be modeled by a state machine is a turnstile . A turnstile, used to control access to subways and amusement park rides, is
2250-458: The string "nice". In this acceptor, the only accepting state is state 7. A (possibly infinite) set of symbol sequences, called a formal language , is a regular language if there is some acceptor that accepts exactly that set. For example, the set of binary strings with an even number of zeroes is a regular language (cf. Fig. 5), while the set of all strings whose length is a prime number is not. An acceptor could also be described as defining
2300-459: The title SXM . If an internal link led you here, you may wish to change the link to point directly to the intended article. Retrieved from " https://en.wikipedia.org/w/index.php?title=SXM&oldid=1077531637 " Category : Disambiguation pages Hidden categories: Short description is different from Wikidata All article disambiguation pages All disambiguation pages SXM (computational model) Although
2350-481: The triggering event , as in Mealy machines, as well as entry and exit actions , which are associated with states rather than transitions, as in Moore machines. The Specification and Description Language is a standard from ITU that includes graphical symbols to describe actions in the transition: SDL embeds basic data types called "Abstract Data Types", an action language, and an execution semantic in order to make
2400-434: The turnstile has two possible states: Locked and Unlocked . There are two possible inputs that affect its state: putting a coin in the slot ( coin ) and pushing the arm ( push ). In the locked state, pushing on the arm has no effect; no matter how many times the input push is given, it stays in the locked state. Putting a coin in – that is, giving the machine a coin input – shifts the state from Locked to Unlocked . In
2450-412: The unlocked state, putting additional coins in has no effect; that is, giving additional coin inputs does not change the state. A customer pushing through the arms gives a push input and resets the state to Locked . The turnstile state machine can be represented by a state-transition table , showing for each possible state, the transitions between them (based upon the inputs given to the machine) and
2500-494: The whole system. This divide-and-conquer approach makes exhaustive testing feasible for large systems. The testing method is described in a separate article on the Stream X-Machine testing methodology . Finite-state machine A finite-state machine ( FSM ) or finite-state automaton ( FSA , plural: automata ), finite automaton , or simply a state machine , is a mathematical model of computation . It
#282717