HOME

TheInfoList



OR:

In
computer science Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to Applied science, practical discipli ...
, a communicating finite-state machine is a finite state machine labeled with "receive" and "send" operations over some alphabet of channels. They were introduced by Brand and Zafiropulo,D. Brand and P. Zafiropulo. On communicating finite-state machines. Journal of the ACM, 30(2):323-342, 1983. and can be used as a model of
concurrent Concurrent means happening at the same time. Concurrency, concurrent, or concurrence may refer to: Law * Concurrence, in jurisprudence, the need to prove both ''actus reus'' and ''mens rea'' * Concurring opinion (also called a "concurrence"), a ...
processes like Petri nets. Communicating finite state machines are used frequently for modeling a communication protocol since they make it possible to detect major protocol design errors, including boundedness, deadlocks, and unspecified receptions.Rosier, Louis E; Gouda, Mohamed G. Deciding Progress for a Class of Communicating Finite State Machines. Austin: University of Texas at Austin, 1983. The advantage of communicating finite state machines is that they make it possible to decide many properties in communication protocols, beyond the level of just detecting such properties. This advantage rules out the need for human assistance or restriction in generality. Communicating finite state machines can be more powerful than finite state machines in situations where the propagation delay is not negligible (so that several messages can be in transit at one time) and in situations where it is natural to describe the protocol parties and the communication medium as separate entities.


Communicating Hierarchical State Machine

Hierarchical state machines are finite state machines whose states themselves can be other machines. Since a communicating finite state machine is characterized by concurrency, the most notable trait in a communicating hierarchical state machine is the coexistence of hierarchy and concurrency. This has been considered highly suitable as it signifies stronger interaction inside the machine. However, it was proved that the coexistence of hierarchy and concurrency intrinsically costs language inclusion, language equivalence, and all of universality.


Definition


Protocol

For an arbitrary positive integer N, a protocol with N process(es) is a quadruple \ with: * (S_i)_^N, a sequence of N disjoint finite sets. Each set is used to represent a process, and each element of S_i represents a possible state of the i-th process. * (o_i)_^N (with o_i\in S_i), a sequence representing the initial state of each process. * (M_)_^N, a finite sequence of N^2 disjoint finite sets such that each set M_ represents the possible messages which may be sent from process i to process j. If i=j, then M_ is empty. * (\mathtt)_^N : S_i \times \bigcup_^N \left( M_^ \cup M_^ \right) \mapsto S_i is a sequence of transition functions. Each function modelizes the transition which can be taken by emitting or receiving any message. With respect to process i, the symbol /math> is used to note a message that can be received and /math> a message that can be sent.


Global state

A global state is a pair \langle S,C\rangle where * S = (s_1, ..., s_N) is an ordered collection of states such that each s_i represents a state of the i-th process. * C is an N \times N matrix such that each c_ \in C is a subsequence of M_. The initial global state is a pair \langle O, \Epsilon \rangle where * O = (o_1, ..., o_N) * \Epsilon is defined to be an N \times N matrix such that for all i,j \in \, E_ equals the empty word, \epsilon.


Step

There are two kinds of steps, steps in which message are received and steps in which messages are sent. A step in which the j process receive a message previously sent by the i-th process is a pair of the form \left\langle(s_1,\dots,s_j,\dots,s_n),\left(\beginc_&\dots&c_\\\dots&\dots&\dots\\\dots&m_c_&\dots\\\dots&\dots&\dots\\c_&\dots& c_\end\right)\right\rangle \vdash \left\langle(s_1,\dots,s'_j,\dots,s_n),\left(\beginc_&\dots&c_\\\dots&\dots&\dots\\\dots&c_&\dots\\\dots&\dots&\dots\\c_&\dots& c_\end\right)\right\rangle when \mathtt_(s_j,+m_)=s'_j, with m'_\in M_. Similarly, a pair in which a message is sent by the i-th process to the j-th one is a pair of the form \left\langle(s_1,\dots,s_i,\dots,s_n),\left(\beginc_&\dots&c_\\\dots&\dots&\dots\\\dots&c_&\dots\\\dots&\dots&\dots\\c_&\dots& c_\end\right)\right\rangle \vdash \left\langle(s_1,\dots,s'_i,\dots,s_n),\left(\beginc_&\dots&c_\\\dots&\dots&\dots\\\dots&m_c_&\dots\\\dots&\dots&\dots\\c_&\dots& c_\end\right)\right\rangle when \mathtt_(s_i,-m_)=s'_i


Run

A run is a sequence of global states such that a step relate a state to the next one, and such that the first state is initial. It is said that a global state \langle S,C\rangle is reachable if there exists a run passing through this state.


Problems

It has been proved with the introduction of the concept itself that when two finite state machines communicate with only one type of messages, boundedness, deadlocks, and unspecified reception state can be decided and identified while such is not the case when the machines communicate with two or more types of messages. Later, it has been further proved that when only one finite state machine communicates with single type of message while the communication of its partner is unconstrained, we can still decide and identify boundedness, deadlocks, and unspecified reception state. It has been further proved that when the message priority relation is empty, boundedness, deadlocks and unspecified reception state can be decided even under the condition in which there are two or more types of messages in the communication between finite state machines.Gouda, Mohamed G; Rosier, Louis E. "Communicating finite state machines with priority channels," Automata, Languages and Programming. Antwerp: ICALP, 1984 Boundedness, deadlocks, and unspecified reception state are all decidable in polynomial time (which means that a particular problem can be solved in tractable, not infinite, amount of time) since the decision problems regarding them are nondeterministic logspace complete.


Extensions

Some extensions considered are: * having a notation to state that some states may not receive any message, * messages are received in different orders, such as FILO, * some messages may get lost,


Channel system

A channel system is essentially a version of communicating finite-state machine in which the machine is not divided into distinct process. Thus, there is a single state of state, and there is no restriction relating which system can read/write on any channel. Formally, given a protocol \langle (S_)_^n, (o_)_^n, (M_)_^n,(\mathtt)_i\rangle, its associated channel system is \langle \prod(S_)_^n, (o_)_^n, \bigcup_^n(M_),\Delta\rangle, where \Delta is the set of ((s_1,\dots,s_j,\dots,s_n),?m_,(s_1,\dots,\mathtt_j(s_j,+m_),\dots,s_n) and of ((s_1,\dots,s_i,\dots,s_n),!m_,(s_1,\dots,\mathtt_i(s_i,-m_{i,j}),\dots,s_n).


References

Concurrency (computer science) Models of computation