Concurrency Theory: Lecture 21, 6 April 2017 --------------------------------------------- Message Sequence Graphs A directed graph in which each node is labelled by an MSC. If we designate an initial node and a set of final nodes, each accepting path from an initial node to one of the final nodes generates an MSC by concatenating the node labels. Call the resulting set of MSCs the language of the MSG. The language of an MSG can be non-regular --- for instance, the producer consumer system is a trivial one node MSG with a self loop and has unbounded buffers. Associate with MSC a communication graph: nodes are processes, there is a directed edge from i to j if there is a message from i to j in the MSC. An MSG is globally synchronized if for every loop in the MSG, the communication graph of the resulting MSG consists of disjoint strongly connected components (including possibly trivial sccs consisting of single nodes that do not participate in the MSC). Lemma: If an MSG is global synchronized, then there is a uniform upper bound on buffers for all MSCs in the language of the MSG. Unfortunately, this does not guarantee regularity. MSGs provide global control across the processes. Can set up a loop in which two disjoint pairs of processes {p,q} and {r,s} exchange messages an equal number of times. Resulting language is context free. An MSG is locally synchronized if for every loop in the MSG, the communication graph of the resulting MSG consists of a *single* strongly connected components, plus possibly trivial sccs consisting of single nodes that do not participate in the MSC. Lemma: If an MSG is locally synchronized, its MSC language is regular. This is sufficient, but not necessary. Theorem: It is undecidable if the language of an MSG is regular. This follows from a theorem of Sakarovitch from trace theory, that shows that it is undecidable whether the trace closure of a regular language remains regular. ======================================================================