The Joys of Bisimulation
Total Page:16
File Type:pdf, Size:1020Kb
The Joys of Bisimulation Colin Stirling Department of Computer Science University of Edinburgh Edinburgh EH JZ UK email cpsdcsedacuk Intro duction Bisimulation is a rich concept which app ears in various areas of theoretical com puter science Its origins lie in concurrency theory for instance see Milner and in mo dal logic see for example van Benthem In this pap er we review results ab out bisimulation from b oth the p oint of view of automata and from a logical p oint of view We also consider how bisimulation has a role in nite mo del theory and we oer a new undenability result Basics Lab elled transition systems are commonly encountered in op erational semantics of programs and systems They are just lab elled graphs A transition system a is a pair T S f a Ag where S is a nonempty set of states A is a a nonempty set of lab els and for each a L is a binary relation on S a a We write s s instead of s s Sometimes there is extra structure in a transition system a set of atomic colours Q such that each colour q S the subset of states with colour q Bisimulations were intro duced by Park as a small renement of the b e havioural equivalence dened by Hennessy and Milner in b etween basic CCS pro cesses whose b ehaviour is a transition system Denition A binary relation R b etween states of a transition system is a bisimulation just in case whenever s t R and a A a a if s s then t t for some t such that s t R and a a if t t then s s for some s such that s t R In the case of an enriched transition system with colours there is an extra clause in the denition of a bisimulation that it preserves colours if s t R then for all colours q s q i t q Simple examples of bisimulations are the identity relation and the empty rela tion Two states of a transition system s and t are bisimulation equivalent or bisimilar written s t if there is a bisimulation relation R with s t R One can also present bisimulation equivalence as a game G s t see for 0 0 example which is played by two participants players I and I I A play of G s t is a nite or innite length sequence of the form s t s t 0 0 0 0 i i Player I attempts to show that the initial states are dierent whereas player II wishes to establish that they are equivalent Supp ose an initial part of a play is s t s t The next pair s t is determined by one of the 0 0 j j j +1 j +1 following two moves a s and then player II cho oses a trans Player I cho oses a transition s j +1 j a t ition with the same lab el t j +1 j a t and then player II cho oses a trans Player I cho oses a transition t j +1 j a s ition with the same lab el s j +1 j The play continues with further moves Player I always cho oses rst and then player I I with full knowledge of player Is selection must cho ose a corresp onding transition of the other state A play of a game continues until one of the players wins In a p osition s t if one of these states has an a transition and the other do esnt then s and t are clearly distinguishable and in the case of an enriched transition systems if one of these states has a colour which the other do esnt have then again they are distinguishable Consequently any p osition s t where s and t are n n n n distinguishable counts as a win for player I and are called Iwins A play is won by player I if the play reaches a Iwin p osition Any play that fails to reach such a p osition counts as a win for player I I Consequently player II wins if the play is innite or if the play reaches the p osition s t and neither state has an n n available transition Dierent plays of a game can have dierent winners Nevertheless for each game one of the players is able to win any play irresp ective of what moves her opp onent makes To make this precise the notion of strategy is essential A strategy for a player is a family of rules which tell the player how to move However it turns out that we only need to consider historyfree strategies whose rules do not dep end on what happ ened previously in the play For player I a rule is therefore of the form at p osition s t cho ose transition x where x is a a s s or t t for some a A rule for player II is at p osition s t when a a player I has chosen x cho ose y where x is either s s or t t and y is a corresp onding transition of the other state A player uses the strategy in a play if all her moves ob ey the rules in The strategy is a winning strategy if the player wins every play in which she uses Prop osition For any game G s t either player I or player II has a history free winning strategy Prop osition Player II has a winning strategy for G s t i s t Transition systems are mo dels for basic pro cess calculi such as CCS and CSP Mo dels for richer calculi capturing value passing mobility causality time probability and lo cations have b een develop ed The basic notion of bisimulation has b een generalised often in a variety of dierent ways to cover these extra features Bisimulation also has a nice categorical representation via coalgebras due to Aczel see for example which allows a very general denition It is an interesting question whether all the dierent brands of bisimulation are instances of this categorical account In this pap er we shall continue to examine only the very concrete notion of bisimulation on transition systems Bisimulation closure and invariance It is common to identify a ro ot of a transition system as some sp ecial start state Ab ove we dened a bisimulation on states of the same transition graph Equally we could have dened it b etween states of dierent transition systems When transition systems are ro oted we can then say that two systems are bisimilar if their ro ots are A family of ro oted transition graphs is said to b e closed under bisimulation equivalence when the following holds if T and T T then T Given a ro oted transition system there is a smallest transition system which is bisimilar to it this is its canonical transition graph which is the result of rst removing any states which are not reachable from the ro ot and then identifying bisimilar states using quotienting An alternative p ersp ective on bisimulation closure is from the viewp oint of prop erties of transition systems Prop erties whose transition systems are bisim ulation closed are said to b e bisimulation invariant Over ro oted transition graphs prop erty is bisimulation invariant provided that if T j and T T then T j By T j we mean that is true of the transition graph T On the whole counting prop erties are not bisimulation invariant for example has states or has an even numb er of states In contrast temp oral prop erties are bisimula tion invariant for instance will eventually do an atransition or is never able to do a btransition Other prop erties such as has an Hamiltonian circuit or is colourable are also not bisimulation invariant Later we shall b e interested in parameterised prop erties that is prop erties of arbitrary arity We say that an nary prop erty x x on transition systems is bisimulation invariant 1 n provided that if T j s s and t t are states of T and 1 n 1 n t s for all i i n then T j t t i i 1 n By T j s s we mean that is true of the states s s of T 1 n 1 n An example of a prop erty which is not bisimulation invariant is x x is a 1 n cycle and an example of a bisimulation invariant prop erty is x is language 1 equivalent to x 2 The notions of bismulation closure and invariance have app eared indep end ently in a variety of contexts see for instance Caucals hierarchy Bisimulation equivalence is a very ne equivalence b etween states An interest ing line of enquiry is to reconsider classical results in automata theory replacing language equivalence with bismulation equivalence These results concern den ability closure prop erties and decidabilityundecidability Grammars can b e viewed as generators of transition systems Let b e a nite family of nonterminals and assume that A is a nite set of terminals A a basic transition has the form where and a A A state is then any memb er of and the transition relations on states are dened as the least relations closed under basic transitions and the following prex rule a a PRE if then Given a state we can dene its ro oted transition system whose states are just the ones reachable from In the table b elow is a Caucal hierarchy of transition graph descriptions according to how the family of basic transitions is sp ecied In each case we assume a nite family of rules Typ e captures nitestate graphs Typ e cap 1 in fact tures contextfree grammars in Greibach normal form and Typ e 2 captures pushdown automata For Typ e and b elow this means that in each case there are nitely many basic transitions In the other cases R and R are 1 2 a regular expressions over the alphab et The idea is that each rule R 1 a stands for the p ossibly innite family of basic transitions f R g 1 a a R stands for the family f R and R g For and R 2 1 2 1 a instance a Typ e rule of the form X Y Y includes for each n the a n basic transition X Y Y Basic Transitions a R Typ e R 2 1 a Typ e R 1 a Typ e a 1 Typ e where jj and j j 2 a Typ e X a a Typ e X Y or X This hierarchy is implicit in Caucals work on understanding contextfree graphs and understanding when the monadic secondorder theory of graphs is decidable With resp ect to language equivalence the hierarchy collapses to just two levels the regular and the context