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
, a protocol with
process(es) is a quadruple
with:
*
, a sequence of
disjoint finite sets. Each set is used to represent a process, and each element of
represents a possible state of the
-th process.
*
(with
), a sequence representing the initial state of each process.
*
, a finite sequence of
disjoint finite sets such that each set
represents the possible messages which may be sent from process
to process
. If
, then
is empty.
*
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
, the symbol