Introduction to Trace Theory 1 Introduction
Total Page:16
File Type:pdf, Size:1020Kb
Intro duction to Trace Theory tutorial Antoni Mazurkiewicz Institute of Computer Science Polish Academy of Sciences ul Ordona Warszawa and Institute of Informatics Jagiellonian University ul Nawo jki Krakow Poland amazwarsipipanwawpl Novemb er Abstract The concept of traces has b een intro duced for describing nonsequential b e haviour of concurrent systems via its sequential observations Traces represent con current pro cesses in the same way as strings represent sequential ones The theory of traces is used as a to ol for reasoning ab out nonsequential pro cesses as a matter of fact using this theory one can get a calculus of concurrent pro cesses analogous to the ones available for sequential systems In this intro ductory tutorial we discuss a numb er of issues that are at the foundations of trace theory Among the discussed topics are algebraic prop erties of traces dep endence graphs histories xedp oint calculus for nding the b ehaviour of nets comp ositionality and mo dularity Key words concurrency traces pro cesses partial ordering nonsequential systems Intro duction The theory of traces has b een motivated by the theory of Petri Nets and the theory of formal languages and automata Already in s Carl Adam Petri has develop ed the foundations for the theory of concurrent systems In his seminal work he has presented a mo del which is based on the communication of interconnected sequential systems He has also presented an entirely Mazurkiewicz Intro duction to Trace Theory new set of notions and problems that arise when dealing with concurrent systems His mo del or actually a family of netbased mo dels that has b een since generically referred to as Petri Nets has provided b oth an intuitive informal framework for representing basic situations of concurrent systems and a formal framework for the mathematical analysis of concurrent systems The intuitive informal framework has b een based on a very convenient graphical representation of netbased systems while the formal framework has b een based on the token game resulting from this graphical representation The notion of a nite automaton seen as a restricted typ e of Turing Machine has by then b ecome a classical mo del of a sequential system The strength of automata theory is based on the simple elegance of the underlying mo del which admits p owerful mathematical to ols in the investigation of b oth the structural prop erties expressed by the underlying graphlike mo del and the b ehavioural prop erties based on the notion of the language of a system The notion of language has provided a valuable link with the theory of free monoids The original attempt of the theory of traces was to use the well develop ed to ols of formal language theory for the analysis of concurrent systems where the notion of concurrent system is understo o d in very much the same way as it is done in the theory of Petri Nets The idea was that in this way one will get a framework for reasoning ab out concurrent systems which for a numb er of imp ortant problems would b e mathematically more convenient that some approaches based on formalizations of the token game In s when the basic theory of traces has b een formulated the most p opular approach to deal with concurrency was interleaving In this approach concurrency is replaced by nondeterminism where concurrent execution of actions is treated as non deterministic choice of the order of executions of those actions Although the interleaving approach is quite adequate for many problems it has a numb er of serious pitfalls We will briey discuss here some of them b ecause those were imp ortant drawbacks that we wanted to avoid in trace theory By reducing concurrency to nondeterminism one assigns two dierent meanings to the term nondeterministic choice the choice b etween two or more p ossible actions that exclude each other and the lack of information ab out the order of two or more actions that are executed indep endently of each other Since in the theory of concurrent systems we are interested not only in the question what is computed but also in the question how it is computed this identication may b e very misleading This disadvantage of the interleaving approach is wellvisible in the treatment of renement see eg It is widely recognized that renement is one of the basic trans formations of any calculus of concurrent systems from theoretical metho dological and practical p oint of view This transformation must preserve the basic relationship b etween a system and its b ehaviour the b ehaviour of the rened system is the rened b ehaviour of the original system This requirement is not resp ected if the b ehaviour of the system is represented by interleaving Mazurkiewicz Intro duction to Trace Theory Also in considerations concerning inevitability see the interleaving approach leads to serious problems In nondeterministic systems where a choice b etween two partners may b e rep eated innite numb er of times a run discriminating against one of the partners is p ossible an action of an apriori chosen partner is not inevitable On the other hand if the two partners rep eat their actions independently of each other an action of any of them is inevitable However in the interleaving approach one do es not distinguish b etween these two situations b oth are describ ed in the same way Then as a remedy against this confusion a sp ecial notion of fairness has to b e intro duced where in fact this notion is outside of the usual algebraic means for the description of system b ehaviour Finally the identication of nondeterministic choice and concurrency b ecomes a real drawback when considering serializability of transactions To keep consistency of a database to which a numb er of users have concurrent access the database manager has to allow concurrent execution of those transactions that do not interfere with each other To this end it is necessary to distinguish transactions that are in conict from those which are indep endent of each other the identication of the nondeterministic choice in the case of conicting transactions with the choice of the execution order in case of indep endent transactions leads to serious diculties in the design of database managing systems Ab ove we have sketched some of the original motivations that led to the formulation of the theory of traces in Since then this theory has b een develop ed b oth in breadth and in depth and this volume presents the state of the art of the theory of traces Some of the developments have followed the initial motivation coming from concurrent systems while other fall within the areas such as formal language theory theory of partially commutative monoids graph grammars combinatorics of words etc In our pap er we discuss a numb er of notions and results that have played a crucial role in the initial development of the theory of traces and which in our opinion are still quite relevant Preliminary notions Let X b e a set and R b e a binary relation in X R is an ordering relation in X or X is ordered by R if R is reexive xR x for all x X transitive xR y R z implies xR z and antisymmetric xR y and y R x implies x y if moreover R is connected for any x y X either xR y or y R x then R is said to b e a linear or total ordering A set together with an ordering relation is an ordered set Let X b e a set ordered by relation R Any subset Y of X is then ordered by the restriction of R to Y ie by R Y Y The set f n g will b e denoted by By an alphabet we shall understand a nite set of symbols letters alphab ets will b e denoted by greek capital letters eg etc Let b e an alphab et the set of all nite sequences of elements of willl Mazurkiewicz Intro duction to Trace Theory b e denoted by such sequences will b e referred to as strings over Small initial letters a b with p ossible sub or sup erscripts will denote strings small nal latin letters w u v etc will denote strings If u a a a is a string n is called 1 2 n the length of u and is denoted by juj For any strings a a a b b b the 1 2 n 1 2 m concatenation a a a b b b is the string a a a b b b 1 2 n 1 2 m 1 2 n 1 2 m Usually sequences a a a are written as a a a Consequently a will denote 1 2 n 1 2 n symb ol a as well as the string consisting of single symb ol a the prop er meaning will b e always understo o d by a context String of length containing no symb ols is denoted by The set of strings over an alphab et together with the concatenation op eration and the empty string as the neutral element will b e referred to as the monoid of strings over or the free monoid generated by Symb ol is used to denote the monoid of strings over as well the set itself We say that symb ol a occurs in string w if w w aw for some strings w w For 1 2 1 2 each string w dene Alph w the alphabet of w as the set of all symb ols o ccurring in w By w a we shall understand the numb er of o ccurrences of symb ol a in string w Let b e an alphab et and w b e a string over an arbitrary alphab et then w denotes the string projection of w onto dened as follows if w u if w ua a w ua if w ua a Roughly sp eaking pro jection onto deletes from strings all symb ols not in The subscript in is omitted if is understo o d by a context The right cancel lation of symb ol a in string w is the string w a dened as follows a w if a b w b a w ab otherwise for all strings w and symb ols a b It is easy to prove that pro jection and cancellation