Concurrency Theory: Lecture 13, 13 March 2018 --------------------------------------------- Zielonka's theorem Given a regular trace language L over (A,I) and a distributrion (A_1,A_2,...,A_n) of A, construct a deterministic asynchronous automaton for L. - Can assume L is presented as a sequential automaton Aut. More precisely, it is presented as a minimum DFA. Recall that minimum DFA for a trace language has diamond properties. - We want to do a distributed simulation of Aut. On an input w, each component keeps track of the "effect" of w as a function f_w: Q -> Q. - Each process i only sees the i-view of w. These views overlap. - Can update f_w incrementally. - f_a for a in A is the transition function for letter a. - f_wa(q) = f_a(f_w(q)). - In general, f_uv(q) = f_v(f_u(q). - Diamond property ensures that if w ~ w', f_w = f_w'. ---------------------------------------------------------------------- Notation: - w is a word, t_w = (E_w, <=_w, lab_w) is the associated trace. Drop subscript _w and refer to t = (E,<=,lab) henceforth. - For X subset of E, w[X] is the subsequence of w corresponding to the events X - I subset of E is an ideal if I is downward closed Lemma: For any ideal I, w is trace equivalent to w[I]w[E \ I] Proof: Many ways to prove this. One proof goes through the observation that two words are trace equivalent if their projections onto every dependent pair of letters {a,b} is the same. ---------------------------------------------------------------------- Suppose we have two processes, {1,2}. - We want to compute what state Aut reaches after w. Process 1 can keep track of w[1-view(E)] as a function from Q to Q. Process 2 should be able to tell us the corresponding function for w[E \ 1-view(E)]. - 1-view(E) is an ideal, so w is trace equivalent to w[1-view(E)] w[E \ 1-view(E)]. - Aut is min DFA, so state after trace equivalent words is the same. In general, if we have n processes, {1,2,...,n}, we need to factorize w as follows: - w1 = w[1-view(E)] - w2 = w[2-view(E) \ {1}-view(E)] - w3 = w[3-view(E) \ {1,2}-view(E)] ... - wn = wn-view(E) \ {1,2,...,n-1}-view(E)] Then w ~ w1 w2 ... wn. At the end of w, we look up f_w1, f_w2, ..., f_wn from local states of components 1,2,...,n and accept if the composite function takes q_in to a final state of Aut ---------------------------------------------------------------------- - For process i and J subset of {1,2,...,n} \ {i}, J-residue of i is w[i-view(E) \ J-view(E)]. - At most 2^{n-1} such residues. - J = emptyset corresponds to w[i-view(E)] - Each process should maintain f_w[i-view(E) \ J-view(E)] for each J. Problem: Process residue at i can change through an action not invoving i. This action cannot update the local state of i. Cannot directly maintain process residues! ---------------------------------------------------------------------- Primary residues - Given {i,j}, the {j}-residue at i is the same as i-view(E) \ intersection of i-view(E) and j-view(E). - So sufficient for i to maintain view with respect to this intersection. - Max events in intersection are always in primary events of i. - Hence, maintain a residue with respect to every subset of primary events. This is stable: changes only when the process makes a move. - Every process residue corresponds to some primary residue, but this has to be computed at "run-time". ---------------------------------------------------------------------- An informal algorithm Suppose {i,j} synchronize to perform a - i and j compare primary information to determine common primary events. Let Xj be j's primary events in this set. - i contributes its full view (the primary residue wrt emptyset) - j contributes its residue wrt Xj - This give a function f_w for the word jointly seen by i and j. Compose this with f_a to get the function for the extension by a. - Label new event, update primary and secondary information as usual. - Update primary residues: this is not obvious. After the synchronization, i and j have unified their primary information. Suppose e is a primary event contributed by i and f is primary event contributed by j. How do we compute the residue wrt {e,f}? This would not be available with either i or j individually. If more than 2 processes synchronize, we follow the same protocol as above, pairwise. ======================================================================