Concurrency Theory: Lecture 5, 30 January 2018 ---------------------------------------------- Place invariants: ----------------- - Weighted sum is the same for all reachable markings - A marking that does not satisfy the invariant is unreachable - Non-negative invariants and bounded places. Petri Net Languages ------------------- - A bounded net generates a regular language over T - Prefix closed, no final markings - Can add a labelling function l: T -> Sigma - Petri net language is now a language over Sigma - Again bounded nets generate regular languages - Converse? - From DFA/NFA to labelled net is trivial: for each edge s-a->s', add a transition labelled a between places s and s' - What if we interpret DFA/NFA as the language of an unlabelled net? Not so simple! A single word language is trivially regular. If L = {w}, then the DFA for L is a straight line and the corresponding net will have reachable markings with the same structure. This amounts to asking a stronger question: whether there is a net whose reachable markings are isomorphic to a straight line DFA. There is a well-developed theory of "regions" that characterizes whena a given transition system can be isomorphic to the reachable markings of a net. Using the theory of regions, it can be shown that the word "abbaa" cannot be the language of any unlabelled net. Such a word is called "Petri net unsolvable". Recently (2015 and later) there has been some work on characterizing solvable and unsolvable words. However, it still seems to be open to characterize when a non-trivial regular language is "solvable". - Petri nets can recognize some context-free languages - Producer-consumer language = { w | every prefix of w has more send actions than receive actions} - This language is a variant of a^n b^n - Can use labels to actually program a^n b^n - Petri nets cannot recognize all context-free languages - The language of palindromes is not PN recognizable - Requires a combinatorial argument about number of reachable markings - Petri nets can recognize some context-sensitive languages - Add a third component to producer-consumer: consumer passes a message to third component - Language is a variant of a^n b^n c^n, which is not context-free but is context-sensitive. - Petri net languages are orthogonal to normal Chomsky hierarchy of regular, CFL, CSL, ... Alphabets with independence --------------------------- - Sequential languages do not accurately capture concurrent behaviour - Cannot distinguish independent a,b from ab+ba (both a and b are enabled but sequentialized by a shared place connected by self-loop) - Augment alphabet with an independence relation Mazurkiewicz trace theory - (Sigma,I) - I is an independence relation on Sigma: binary relation that is symmetric and irreflexive - Two adjacent independent letters can be permuted without affecting the computation - If (a,b) in I, uabv is equivalent to ubav (write uabv <-> ubav) - In general, two words are trace-equivalent if they can be obtained from one another through a sequence of swaps. (a,b) in I: aabb is equivalent to bbaa aabb <-> abab <-> baab <-> baba <-> bbaa Write aabb <=> bbaa - A trace is an equivalence class of equivalent words