BRICS R S-01-8 F re ndrup & J ensen: Checking for O p en Bisimilarity in the π -Calculus
BRICS
Basic Research in Computer Science
Checking for Open Bisimilarity in the π -Calculus
Ulrik Frendrup
Jesper Nyholm Jensen
BRICS Report Series RS-01-8
Copyright c 2001, Ulrik Frendrup & Jesper Nyholm Jensen.
BRICS, Department of Computer Science University of Aarhus. All rights reserved.
Reproduction of all or part of this work is permitted for educational or research use on condition that this copyright notice is included in any copy.
See back inner page for a list of recent BRICS Report Series publications.
Copies may be obtained by contacting:
BRICS
Department of Computer Science University of Aarhus
Ny Munkegade, building 540 DK–8000 Aarhus C
Denmark
Telephone: +45 8942 3360 Telefax: +45 8942 3255 Internet: BRICS@brics.dk
BRICS publications are in general accessible through the World Wide Web and anonymous FTP through these URLs:
http://www.brics.dk ftp://ftp.brics.dk
This document in subdirectory RS/01/8/
Checking for Open Bisimilarity in the
π
-CalculusBRICS 1
UlrikFrendrup&JesperNyholm Jensen
AalborgUniversity,DepartmentofComputerScience
FredrikBajersVej 7E
9220AalborgØ,Denmark
Email: ulrikf@cs.auc.dk,nyholm@gaztricjuice.dk
Abstract
This paper deals with algorithmic checking of open bisimilarity in the
π
-calculus. Mostbisimulationcheckingalgorithmsarebasedonthepartitionrenementapproach. Unfortu-
nately thedenition ofopenbisimulationdoesnotpermit usto useapartition renement
approachforopenbisimulationcheckingdirectly, butin thepaperA PartitionRenement
Algorithmforthe
π
-CalculusMarcoPistoreandDavideSangiogipresentaniterativemethodthat makes itpossible to check for open bisimilarity using partition renement. Wehave
implemented the algorithm presented by Marco Pistore and Davide Sangiorgi. Further-
more, we haveoptimized this algorithm and implemented this optimized algorithm. The
time-complexityofthisalgorithmisthesameasthetime-complexityfortherstalgorithm,
but performance tests have shown that in many casesthe running time of the optimized
algorithmisshorterthantherunningtimeof therstalgorithm.
Ourimplementationoftheoptimizedopenbisimulationcheckeralgorithmandauserinter-
face havebeenintegrated in asystemcalled theOBC Workbench.The source code and a
manualforitisavailablefrom http://www.cs.auc.dk/research/FS/ny/PR-pi/.
1
BasicResearchinComputerScience(www.brics.dk),fundedbytheDanishNationalResearchFounda-
tion
1 Introduction 4
2 Checkingfor Bisimilarity UsingPartition Renement 5
2.1 TheGeneralizedPartitionRenementProblem . . . 5
2.2 BisimulationChecking . . . 6
3 The
π
-Calculus 8 3.1 Syntax . . . 83.2 Semantics . . . 10
3.3 Bisimulation. . . 10
4 AlgorithmforChecking Open Bisimilarityin the
π
-Calculus 13 4.1 Syntax . . . 134.2 Semantics . . . 14
4.3 OpenBisimulation . . . 16
4.4 ConstrainedProcesses . . . 17
4.5 Non-RedundantTransitions . . . 19
4.6 ActiveNames . . . 20
4.7 TheIterativeMethod . . . 22
4.8 TheAlgorithm . . . 23
4.9 Examples . . . 25
5 Implementationof Open BisimulationChecker 30 5.1 DataTypes . . . 30
5.2 Finding Transitions. . . 33
5.4 Step1-ConstructionoftheStateGraphs . . . 36
5.5 Step2-Initializing Partition
W
. . . . . . . . . . . . . . . . . . . . . . . . . 385.6 Step3-StabilizingPartition
W
. . . . . . . . . . . . . . . . . . . . . . . . . . 395.7 Step4-Result . . . 44
5.8 MainFunction . . . 44
6 Optimization 45 6.1 ReducingtheSizesoftheStateGraphs . . . 45
6.2 OptimizingtheComputationofNon-RedundantTransitions. . . 48
6.3 OptimizingtheComputationofActiveNames. . . 48
6.4 OptimizingtheComputationoftheNormalizedTransitions . . . 49
6.5 AFasterPartitionRenementAlgorithm . . . 50
6.6 Heuristics . . . 51
6.7 RemarksontheOptimizedAlgorithm . . . 51
7 Conclusion 52 A The Optimized Algorithm 55 B PerformanceTests 60 B.1
π
-ProcessesUsedinPerformanceTests . . . 60B.2 ResultsofPerformanceTests . . . 61
Introduction
This paperdealswithalgorithmiccheckingofopenbisimilarityin the
π
-calculus. Wehaveimplementedanalgorithmforopenbisimulationcheckinginthe
π
-calculus. Mostalgorithmsforbisimulationcheckingarebasedonpartitionrenement,butthedenitionofopenbisim-
ulation makes itdicult to use this strategyfor an openbisimulationchecking algorithm
directly sincethe statespaces of the processesbeingchecked for open bisimilarity cannot
beconstructedseparately. Wehaveimplementedtheopenbisimulationcheckingalgorithm
presentedin [10]. This algorithm was developed byintroducing the notionof constrained
processes,deningactivenamesbisimulationonconstrainedprocesses,showingthatthereis
ausefulconnectionbetweenopenbisimilarityandactivenamesbisimilarity,anddeveloping
aniterativemethodforcheckingactivenamesbisimilarity.
Wehaveoptimized thealgorithm foropenbisimulationchecking,implementedthis al-
gorithm, and carriedout someperformancetests of therst and theoptimized versionof
the implementation. Finally, the implementation of the optimized algorithm and a user
interfacehavebeenintegratedinasystemcalled theOBCWorkbench.
Thispapercontainssevenchaptersandtwoappendicesandisorganizedasfollows. Chap-
ter 2describes thegeneralized partition renementproblem and shows how an algorithm
for solvingthis problemcan beusedfor checkingbisimilarity. Inchapter 3wepresentthe
syntaxandsemanticsofasubsetofthe
π
-calculusanddenesometraditionalbisimilarities betweenπ
-processes. In chapter 4 we present another notion of bisimilarity called open bisimilaritydened by[10]. Chapter 4alsocontainssomeresultsfrom[10]thatshowsthatopenbisimilaritycan be checked algorithmically. Chapter 5containsadescription of our
rst implementation of the open bisimulationcheckingalgorithm and chapter 6 describes
howthe algorithm is optimizedwith respect to running time. Weconclude onthe imple-
mentation in chapter 7. Pseudo code for the optimized implementation can be found in
appendixA. Resultsofperformancetestsoftherstandtheoptimizedimplementationand
acomparisonofthesecanbefoundinappendixB.
Checking for Bisimilarity Using
Partition Renement
Thealgorithmforopenbisimulationcheckinginthe
π
-calculusdevelopedby[10]isasmanyother bisimulationequivalence checkingalgorithms based on partition renement. Inthis
chapterwedescribethegeneralizedproblemofpartitionrenement. Furthermore,weshow
howthis canbeusedforbisimulationchecking.
2.1 The Generalized Partition Renement Problem
Beforewecanpresentthegeneralized partition renement problem weneedtodene
thenotionsof partitions andblocks.
Denition 1 (Partitionsandblocks)
Let
U
beaset. ApartitionW
ofU
isaniteset ofpairwise disjointsubsetsB 1 , . . . B n
ofU
whereS
i ∈{1 ,...,n } B i = U
. ThesetsB i
ofW
arecalledblocks.Denition 2 (GeneralizedPartitionRenementProblem)
Givenaset
U
,apartitionW = {B 1 , . . . B n }
ofU
,andk
functionsf l : U → P (U )
,1 ≤ l ≤ k
,wewanttorene
W
intoanewpartitionW 0
ofU
,whereW 0 = {C 1 , . . . , C m }
isthecoarsestset (theset withfewestblocks)satisfying
(i) foreach
i ∈ { 1, . . . , m}
there existsaj ∈ { 1, . . . , n}
suchthatC i ⊆ B j
and(ii) forany
a, b ∈ C i
, anyblockC j
,1 ≤ i, j ≤ m
,and anyfunctionf l
,1 ≤ l ≤ k
itholdsthat
f l (a) ∩ C j 6 = ∅
ifandonlyiff l (b) ∩ C j 6 = ∅
.Thenewpartition
W 0
alwaysexists[3]andistheuniquegreatestxedpointofthefunctionψ W
thatmapspartitionsofU
topartitionsofU
andisdened byC ∈ ψ W ( W 0 )
ifandonlyif(i)
∃B ∈ W.(C ⊆ B)
and(ii) forany
a, b ∈ C
,anyblockC 0 ∈ W 0
,andanyfunctionf l
,1 ≤ l ≤ k
itholdsthatf l (a) ∩ C 0 6 = ∅
ifandonlyiff l (b) ∩ C 0 6 = ∅
.The partition
W 0
induces an equivalenceW ∼ 0
dened byW ∼ 0 def = { (a, b) | ∃B ∈ W.(a, b ∈ B) }
. Sothegeneralizedpartitionrenementproblemconsistsofcomputingtheequivalence classesofU
foranequivalencedened asagreatestxedpoint.Insection5.3wewillpresentanalgorithmtosolvethepartitionrenementproblemfor
a nite set
U
andk = 1
. This canbe used to solvethe generalized partition renement problem in an iterative process where the renement algorithm is applied once for eachfunction ineachiterationuntilthepartitionstabilizes.
Inthefollowingsection weshowhowapartition renementalgorithm canbeused for
bisimulationchecking.
2.2 Bisimulation Checking
Let
P
beasetof statesandA ct
aset oflabels. WeletP
andQ
rangeoverP
andα
overAct
. Foragivenlabeledtransitionsystem(P
,Act
,−→
)wedenebisimulationasfollows.Denition 3 (Bisimulation)
Arelation
R ⊆ P × P
isabisimulationif(P, Q) ∈ R
implies,(i) if
P −→ α P 0
thenforsomeQ 0 ∈ P
,Q −→ α Q 0
and(P 0 , Q 0 ) ∈ R
,and(ii) if
Q −→ α Q 0
thenforsomeP 0 ∈ P
,P −→ α P 0
and(P 0 , Q 0 ) ∈ R
.We will let
∼
denote the greatest bisimulation and say thatP
andQ
are equivalent orbisimilar if
P ∼ Q
. We will use the shorthand notationP −→ s P 0
ifs def = a 1 a 2 · · · a n
,a i ∈ A ct
andthere exists asequence ofstatesP 1 , P 2 , . . . , P n ∈ P
such thatP −→ a 1 P 1 −→ a 2
· · · −→ a n P n
andP 0 = P n
. Furthermore,wedene thelabelscontainedin astateasn(P ) = {α ∈ Act | ∃s 1 , s 2 ∈ Act ∗ .( ∃P 0 ∈ P.P s −→ 1 αs 2 P 0 ) }
.Nowweshowhowapartitionrenementalgorithmcanbeusedforbisimulationchecking.
Ifrene
(U, W, f 1 , . . . , f k )
isafunction which returnsasolutionofthegeneralizedpartition renement problem for the instanceU, W, f 1 , . . . , f k
then it canbe used for checking forbisimilaritybetweenthestates
P
andQ
asfollows. LetS P
denotethestatespaceofP
,i.e.S P = {P 0 | ∃s ∈ Act ∗ .P −→ s P 0 }
. LetU
be the setS P ∪ S Q
andW
the parti-tion of
U
containing only one block which is the setU
. Furthermore, let the functionsf α : U → P (U )
,α ∈
n(P ) ∪
n(Q)
bedened asf α (R) = {R 0 ∈ U | R −→ α R 0 }
.P
andQ
are bisimilarifandonlyiftheyarein thesameblockoftherened partition
W 0
returnedfrom rene
(U, W , { f α } ( α ∈
n( P )∪
n( Q )) )
. Thisis truesince∼
givesriseto apartitionW 00
ofU
wheretheblocksaretheequivalenceclassesof∼ ∩ (U × U )
.W 00
isclearlyaxed pointof
ψ W
. IfW 00
is notthe same asW 0
, i.e. the greatestxed point ofψ W
, there exists abisimulation
∼ ∪W ∼ 0
largerthan∼
,whichisacontradiction.The
π
-CalculusIn this chapter we presentthe notionof late andearly bisimulationfor asubsetof the
π
-calculus and describe some of the problems associated with algorithmic checking for late
andearlybisimilarity. First,wegivethesyntaxandsemanticsofasubsetofthe
π
-calculus.3.1 Syntax
Webeginbygivingthesyntaxforasubsetofthe
π
-calculus. Thesyntacticcategoriesfortheπ
-calculusare: aninnitesetofnames,N
,asetofactions,Act
,aninnitesetofprocessidentiers,
K
, and a set ofπ
-processes,Pr
. We will denote elements ofN
bya, b
,c
,d
,e
,v
,x
, andy
, elements ofAct
byα
andβ
, elements ofK
byK
, and elements ofPr
by
P
andQ
. Theset of processescanbeconstructedwith theconstructorsfor inaction, prex,matching, nondeterministic choice,parallel composition, restriction, andrecursion,andanactioncanbeasilentaction,input,free output,orboundoutput.
Thegrammarfor
Act
andPr
ispresentedbelow.α ::= τ | a(b) | ¯ ab | ¯ a(b)
P ::= 0 | α.P | [a = b]P | P + P | P | P | (ν a)P | K h ˜ a i
Each process identier
K
hasan associatedarityandadenition of theformK def = (˜ b)P
,where
˜ b
arethe freenamesofP
(seedenition 4). FortheprocessK h ˜ a i
thetuplea ˜
musthavethesamelengthas
˜ b
. Thefree,bound,extruded,object,andsubject namesofanaction
α
,writtenfn(α)
,bn(α)
,en(α)
,ob(α)
,andsub(α)
,respectively,aredenedasfollows.α
fn(α)
bn(α)
en(α)
ob(α)
sub(α)
τ ∅ ∅ ∅ ∅ ∅
a(b) {a} {b} ∅ {a} {b}
¯ ab {a, b} ∅ ∅ {a} {b}
¯
a(b) {a} {b} {b} {a} {b}
The names of an action
α
are thefree names andthe bound names ofα
, i.e. n(α) =
fn
(α) ∪
bn(α)
. Thefreeandboundnamesofaprocess aredened asfollows.Denition 4 (FreeNames)
Aname
a
isfreeintheprocessP
,writtena ∈
fn(P )
,ifitbelongstothesetfree(P )
,wherethefunction free
: Pr → P ( N )
isdened bythefollowing.free
( 0 ) = ∅
free
(α.P ) =
fn(α) ∪ (
free(P ) \
bn(α))
free
([a = b]P ) = {a, b} ∪
free(P)
free
(P 1 |P 2 ) =
free(P 1 ) ∪
free(P 2 )
free
(P 1 + P 2 ) =
free(P 1 ) ∪
free(P 2 )
free
((ν a)P) =
free(P ) \ {a}
free
(K h (a 1 , a 2 , . . . , a n ) i ) = { a 1 , a 2 , . . . , a n }
Denition 5 (BoundNames)
A name
a
isboundin theprocessP
,writtena ∈
bn(P)
,ifitbelongsto thesetbound(P )
,where thefunction bound
: P r → P ( N )
istheleastfunctionthatsatises thefollowing.bound
( 0 ) = ∅
bound
(α.P ) =
bn(α) ∪
bound(P )
bound
([a = b]P ) =
bound(P )
bound
(P 1 |P 2 ) =
bound(P 1 ) ∪
bound(P 2 )
bound
(P 1 + P 2 ) =
bound(P 1 ) ∪
bound(P 2 )
bound
((ν a)P ) = { a } ∪
bound(P )
bound
(Kh (˜ a) i ) =
bound(P )
whereK def = (˜ b)P
Thenames ofaprocess
P
,writtenn(P )
,consistsofthefreenamesandtheboundnamesof
P
,i.e. n(P ) =
fn(P ) ∪
bn(P )
. Wesometimeswritefn(P 1 , P 2 , . . . , P n )
forfn(P 1 ) ∪
fn(P 2 ) ∪
· · · ∪
fn(P n )
,andsimilarlyforbound namesandnames.Weidentifyprocessesuptorenamingofboundnames. Renamingofaboundnameina
processiscalled
α
-conversion. IftheprocessesP
andQ
canbeidentieduptorenamingofboundnamesthen
P
andQ
areα
-convertible,writtenP ≡ α Q
.Denition 6 (
α
-conversion)α
-conversionof anamea
to anameb
in aπ
-processP
, whereb / ∈
n(P )
, is the result ofrenamingallbound occurrencesof
a
inP
tob
.Substitutions are denoted by
σ
and are functions that map names to names, e.g.σ def = {y 1 /x 1 y 2 /x 2 · · · y n /x n }
denotes the simultaneous substitution that maps every freeoccurrenceofthenamex i
tothenamey i
foralli ∈ { 1, 2, . . . , n}
. Anamea
isneutralfor asubstitution
σ
if for allb ∈ N
,σ(b) = a
if and only ifb = a
. A set of names,V
,is neutral for asubstitution
σ
if all the names ofV
are neutral forσ
. Application of a substitutionσ
to aprocessP
iswrittenP σ
. If thereexists somebound namea
inP
suchthatthesubstitution
σ
mapssomenametoa
thena
isα
-convertedtosomeb
thatisneutralfor
σ
.3.2 Semantics
Theoperationalsemanticsforthesubsetofthe
π
-calculusisgivenbythelabeledtransitionsystem(
P r
,Act
,→
)where→
isthesmallestrelationclosedundertherulesintable3.1. Thesymmetricversionsofthe rulesSum,Par,Com,andClosehavebeenomitted. Transitions
havetheform
P −→ α P 0
.[
Alpha] P 0 −→ α P 00
P −→ α P 00 P ≡ α P 0 [
Pre]
α.P −→ α P
[
Con] P { ˜ a/ ˜ b } −→ α P 0
K h ˜ a i −→ α P 0 K def = (˜ b)P [
Sum] P −→ α P 0 P + Q −→ α P 0
[
Par] P −→ α P 0
P |Q −→ α P 0 |Q
bn(α) ∩
fn(Q) = ∅ [
Com] P −→ ¯ ay P 0 Q −→ a ( x ) Q 0 P |Q −→ τ P 0 |Q 0 {y/x}
[
Close] P a −→ ¯ ( x ) P 0 Q −→ a ( x ) Q 0
P |Q −→ τ (ν x)(P 0 |Q 0 ) [
Match] P −→ α P 0 [a = a]P −→ α P 0
[
Res] P −→ α P 0
(ν b)P −→ α (ν b)P 0 b / ∈
n(α) [
Open] P −→ ¯ ab P 0 (ν b)P −→ ¯ a ( b ) P 0
b 6 = a
Table3.1: Operationalsemanticsforthe
π
-calculus.3.3 Bisimulation
In this section wedene the notionof late bisimulation and early bisimulation rst
introducedby[5].
A symmetricbinaryrelation
R
onprocessesis alate bisimulationifP R Q
andP −→ α P 0
where bn
(α) ∩ (
fn(P ) ∪
fn(Q)) = ∅
implies(i) if
α = a(x)
then∃Q 0 .(Q −→ a ( x ) Q 0 ∧ ∀y.(P 0 {y/x} R Q 0 {y/x} ))
,and(ii) if
α 6 = a(x)
then∃Q 0 .(Q −→ α Q 0 ∧ P 0 R Q 0 )
.Fromthedenition oflatebisimulationthenotionof late bisimilarity isdened.
Denition 8 (LateBisimilarity)
Theprocesses
P
andQ
arelatebisimilar,writtenP ∼ ˙ Q
,ifthereexistsalatebisimulationR
suchthatP R Q
.Asanexampleoftwolatebisimilarprocessesconsider
a(x).0 | ¯ by.0
anda(x). ¯ by.0 +¯ by.a(x).0
.Itis easilyseenthat
a(x).0 | ¯ by.0 ∼ ˙ a(x). ¯ by.0 + ¯ by.a(x).0
.It turns out that with the operational semantics dened it is hard to give anecient
algorithmforcheckinglatebisimilaritybetweenprocesses.Supposeweneedtocheckwhether
the processes
P
andQ
are latebisimilar. IfP
hasthe transitionP −→ a ( x ) P 0
,that isP
canreceivesomethingonthechannel
a
andbecomeP 0
,wecanonlyexploretransitionsfromP 0
byexaminingallthepossiblesubstitutionsof
x
inP 0
andthereareinnitelymanyofthese.Similarproblemsariseforearly bisimilarity basedonthelatesemanticsgivenbythe
labeledtransition systemoftable3.1. Early bisimulation isdenedasfollows.
Denition 9 (EarlyBisimulation)
Asymmetricbinaryrelation
R
onprocessesisanearlybisimulationifP R Q
andP −→ α P 0
where bn
(α) ∩ (
fn(P ) ∪
fn(Q)) = ∅
implies(i) if
α = a(x)
then∀y.( ∃Q 0 .(Q −→ a ( x ) Q 0 ∧ P 0 {y/x} R Q 0 {y/x} ))
,and(ii) if
α 6 = a(x)
then∃ Q 0 .(Q −→ α Q 0 ∧ P 0 R Q 0 )
.Fromthedenition ofearlybisimulationthenotionofearlybisimilarityisdened.
Denition 10 (Early Bisimilarity)
Theprocesses
P
andQ
areearlybisimilar,writtenP ∼ ˙ E Q
,ifthereexists anearlybisim-ulation
R
suchthatP R Q
.constructorinputprex.
Inthenextsectionanalternativeoperationalsemanticsandthedenitionofopenbisimi-
larityisgiven. Thesemakeitpossibletodevelopamoreecientbisimulationcheckingalgo-
rithm. Themainreasonsforusingthedenitionofopenbisimilarityinourimplementation
of abisimulation checkeris that openbisimilarityisacongruenceand thatabisimulation
checkingalgorithmfor lateorearly bisimulationcanbeextractedfrom theopenbisimula-
tioncheckingalgorithm[10]. Furthermore,thedenitionofopenbisimilaritywasalsoused
in theMobilityWorkbenchandwehope[7]maybenetfromourimplementation.
Algorithm for Checking Open
Bisimilarity in the
π
-CalculusIn thischapter wepresent thenotionof openbisimulationfor the
π
-calculusand describesome of the problems associated with algorithmic checkingfor open bisimilarity. Finally,
we present some results from [10] that make algorithmic checking for open bisimilarity
possible. First,wepresentsomebasicnotionsneededforthesemanticsspecializedforopen
bisimulationandthedenitionofopenbisimulation. All lemmas,theorems,andcorollaries
presentedin thischapterareprovenin[10].
4.1 Syntax
We assumethesamesyntaxasin thepreviouschapter exceptfor thefact that weimpose
a strict ordering,
<
, on theset of names,N
, and that there exists a smallest name withrespectto
<
. Furthermore,weintroducethenotionsof conditionsanddistinctions.Welet
M
denote theset ofallconditions. Conditionsare rangedoverbyL
,M
, andN
andare niteconjunctionsofmatching, e.g.[a = b][c = d]
is theconditionthat equatesa
withb
andc
withd
. Thenames of a conditionM
,writtenn(M )
, arethenamesthatappearin
M
. Compositionof twoconditionsM
andN
is writtenM N
. Ifeverymatch ofacondition,
N
,isimpliedbyanothercondition,M
,wewriteM B N
. Ifitisalsothecasethat noteverymatchofthecondition
M
isimplied byN
wewriteM 6B N
. Thetriviallytrueconditionisdenoted by
∅
. Thesubstitutionσ M
inducedbyaconditionM
mapseachelementofeachequivalenceclassof
M
tothesmallestelementofthatequivalenceclass,i.e.σ M (a) =
min{b | M B [a = b] }
. Tofacilitatetheevaluation oftheexpressionM B N
, forsomeconditions
M
andN
,conditionsaretransformedtoacanonical form.Thecanonicalform ofacondition
M
is theconditionM c = [a 1 = b 1 ][a 2 = b 2 ] · · · [a n = b n ]
where
(i) forall
a ∈
n(M )
witha 6 = σ M (a)
itholdsthat[a = σ M (a)] ∈ M c
,(ii)
a i 6 = b i
andeitherb i < b i +1
orb i = b i +1
anda i < a i +1
,and(iii)
M . M c
.The canonical form is dened in such a way that if
M
andN
are conditions such thatM CB N
thenM c
is syntacticallyequaltoN c
, whereM c
andN c
arethecanonicalformsof
M
andN
.Welet
D is
denote thesetofalldistinctions. Distinctionsarenite binarysymmetric irreexiverelationson namesN
and are ranged overbyD
andE
. If(a, b) ∈ D
forsomedistinction
D
then thetwonamesa
andb
must bedistinct, i.e.a 6 = b
. Thenames ofD
,writtenn
(D)
,arethenamesthatappearinD
. Asubstitutionσ
respectsD
ifσ(a) 6 = σ(b)
for all
(a, b) ∈ D
. Likewise, aconditionM
respects thedistinctionD
if thesubstitution,σ M
,inducedbyM
respectsD
. LetF ⊆ N
thenD − F
denotesthedistinction{ (a, b) ∈ D | a, b / ∈ F }
andD ∩ F
denotes thedistinction{ (a, b) ∈ D | a, b ∈ F }
. Inthe denition ofadistinctionwewillnotalwaysgiveallsymmetricpairs,e.g. in
D def = { (a, b) }
thepair(b, a)
hasbeenleftout.
4.2 Semantics
Inthissectionwegiveasymbolicsemanticsspecializedforopenbisimulationforthesubset
of the
π
-calculus. A symbolicsemantics isused to avoidthe innitebranching that couldoccur with a traditional semantics when exploring the transitions of processes containing
input prexes. To see why an innite branching can occur consider the process
a(x).P
with the transition
a(x).P −→ a ( x ) P
. To explore the further transitions ofP
we have toexplorethebehaviorof
P {y/x}
forinnitelymanyy
s. Thenotionofsymbolicsemanticsforthe
π
-calculuswasrst introduced by [1]. The operationalsemantics specialized for open bisimulationis givenby thesymboliclabeledtransition system(Pr
,M × Act
, ),whereisthesmallestrelationclosedundertherulesintable4.1. Thesymmetricversionsofthe
rulesSum, Par,Com,andClose havebeenomitted. Transitionshavetheform
P ( M,α ) P 0
,where
M
representstheminimalconditionrequiredforP
to perform theactionα
. Weletµ
rangeoverM × Act
.[
Alpha] P 0 µ P 00
P µ P 00 P ≡ α P 0 [
Pre]
α.P (∅ ,α ) P [
Con] P{ ˜ a/ ˜ b} µ P 0
Kh ˜ ai µ P 0 K def = (˜ b)P
[
Sum] P µ P 0
P + Q µ P 0 [
Par] P µ P 0
P|Q µ P 0 |Q
bn(µ) ∩
fn(Q) = ∅
[
Com] P ( M, ¯ ay ) P 0 Q ( N,b ( x )) Q 0 P |Q ( L,τ ) P 0 |Q 0 {y/x}
where
L def = M N[a = b]
[
Close] P ( M, ¯ a ( x )) P 0 Q ( N,b ( x )) Q 0 P |Q ( L,τ ) (ν x)(P 0 |Q 0 )
where
L def = M N [a = b]
[
Match] P ( M,α ) P 0 [a = b]P ( N,α ) P 0
where
N def = M [a = b]
[
Res] P µ P 0
(ν b)P µ (ν b)P 0 b / ∈
n(µ)
[
Open] P ( M, ¯ ab ) P 0 (ν b)P ( M, ¯ a ( b )) P 0
b / ∈
n(M ) ∪ {a}
Table4.1: Thespecializedoperationalsemanticsforthe
π
-calculus.From the transition system given by the rules in table 4.1 we dene another transition
system,
( P r, M × A ct, −→ )
, such that the conditionM
of a transitionP ( M,α −→ ) P 0
is incanonical form and
α
andP 0
are closed under the substitutionσ M
, i.e.α = ασ M
andP 0 = P 0 σ M
. Therelation−→
isthesmallestrelationclosedunder thefollowingrule.[
Canon] P ( N,α ) P 0 P ( M,ασ −→ M ) P 0 σ M
bn
(α) ∩
fn(P ) = ∅
andM
isthecanonicalform ofN
4.3 Open Bisimulation
In this section wegivethe denition of open bisimulation. Firstweneed to dene the
notionof distinction-indexed relation.
Denition 12 (Distinction-Indexed Relation)
Adistinction-indexedrelation
R
isaset{R D } D
ofrelationsR D
overπ
-processes,whereD
rangesoveralldistinctionsin
D is
.Denition 13 (OpenBisimulation)
Adistinction-indexed relation
R
isanopenbisimulationifP R D Q
implies(i) forall
M
,α
,andP 0
suchthatP ( −→ M,α ) P 0
,withbn(α) ∩
fn(Q, D) = ∅
andM
respectsD
, thereexistsomeN
,β
,andQ 0
suchthatQ ( −→ N,β ) Q 0
and
M B N
,
α = βσ M
,and
P 0 R D 0 Q 0 σ M
forD 0 def = (D ∪ (
en(α) ×
fn(P, Q)))σ M
,and(ii) theconverse,withtheroleof
P
andQ
exchanged.Fromthedenition ofopenbisimulationwedenethenotionof open bisimilarity.
Denition 14 (Openbisimilarity)
Theprocesses
P
andQ
areopenbisimilarwithrespect todistinctionD
, writtenP ∼ D Q
,if
P R D Q
forsomeopenbisimulationR
.Asitisseenindenition13thedistinction
D 0
isD
updatedwiththefactthattheextrudednamesof theaction
α
mustbedierentfrom allfreenamesin theprocessesP
andQ
andafterwardsupdated byapplying
σ M
to it. Since this kind ofupdating of distinctionswill oftenbeused inthefollowing,wewilluseashorternotationdenedasfollows.Let
D
be a distinction,P 1 , . . . , P n
processes,M
a condition, andα
an action. Then wedene
D M ( P 1 ,...,P n ) ,α
asD M ( P 1 ,...,P n ) ,α def = (D ∪ (
en(α) ×
fn(P 1 , . . . , P n )))σ M
With thisdenition
D 0
in denition13couldbewritten asD ( M P,Q ) ,α
.Touse themethod described in chapter 2to check whether
P ∼ D Q
it is necessarytogenerate thestate spacesof
P
andQ
separately. This cannotbedone sincethe following dependenciesbetweenP
andQ
aectthetransitionsandthederivatives.Dependency1 Thenameemittedby
P
maynotoccurfreeinQ
.Dependency2 Thesubstitution
σ M
determinedbytheconditionM
in atransition ofP
mustbeappliedto thederivativeof
Q
.Dependency3 There isaglobaldistinction,whichisupdatedusingthefreenamesfrom
bothprocesses.
To see a discussion of the problems the dierent dependencies introduce we refer to the
introductionof[10].
Inthefollowingthree sectionsalternativecharacterizationsof
∼
, proposedby [10], aregiven, which avoid the mentioned dependencies and make it possible to use a partition
renementstrategytocheckforopenbisimilarity.
4.4 Constrained Processes
To make the indexing distinctions of open bisimulation local to processes, and thereby
avoidingdependency3describedintheprevioussection,[10]introducedthenotionof con-
strained processes, dened a bisimilarity on these, and showed that there is a useful
connectionbetweenconstrainedprocessbisimilarityand
π
-processopenbisimilarity.Denition 16 (ConstrainedProcess)
A constrainedprocess isapair
hP, Di
, whereP
is aπ
-processandD
is adistinction suchthat n
(D) ⊆
fn(P )
.Welet
CP
denotethesetofallconstrainedprocesses.CP
is rangedoverbyA
andB
.Denition 17 (Free andBoundNamesofConstrainedProcesses)
Let
A def = h P, D i ∈ CP
. Then the free names ofA
, written fn(A)
, are dened asfn
(A) =
fn(P )
andthebound namesofA
,writtenbn(A)
,aredenedasbn(A) =
bn(P )
.Application of a substitution
σ
to a constrained processA def = hP, Di
is writtenAσ
andabbreviates
hP σ, Dσi
.Thetransitionsof aconstrainedprocess
hP, Di
aredened from those oftheπ
-processP
asP ( −→ M,α ) P 0
hP, Di ( −→ hP M,α ) 0 , D M P,α ∩
fn(P 0 ) i M
respectsD
Asitisseen
hP, Di
canmakethesametransitionsasP
exceptthosewheretheconditionM
ofthetransitionconicts withthedistinctionD
.For two constrained processesto bebisimilar they must fulll two requirements. The
rst oneis that they are compatible, e.i. their distinctions must agree on the common
names.
Denition 18 (Compatibility)
The constrained processes
hP, Di
andhQ, Ei
are compatible, writtenhP, Di ⇓ hQ, Ei
, ifD ∩
fn(Q) = E ∩
fn(P )
. A relationE
onconstrained processesis compatible ifA ⇓ B
foreachpair
(A, B) ∈ E
.Thesecondrequirementfortwoconstrainedprocesses
A
andB
tobebisimilaristhat(A, B)
iscontainedin a
_
-bisimulation.Denition 19 (
_
-bisimulation)Arelation
E
onconstrainedprocessesisa_
-bisimulationifhP, Di E hQ, Ei
implies(i) for all
M
,α
, andh P 0 , D 0 i
such thath P, D i ( −→ h M,α ) P 0 , D 0 i
, with bn(α) ∩
fn(Q) = ∅
,thereexistsome
N
,β
,andhQ 0 , E 0 i
suchthathQ, Ei ( −→ hQ N,β ) 0 , E 0 i
and
M . N
,
α = βσ M
,and
h P 0 , D 0 iEh Q 0 σ M , (D ∪ E) M ( P,Q ) ,α ∩
fn(Q 0 σ M ) i
,and(ii) theconverse,withtheroleof
hP, Di
andhQ, Ei
exchanged.Fromthedenitionofconstrainedbisimulationwedenethenotionofconstrainedbisim-
ilarity.
Denition 20 (ConstrainedBisimilarity)
Theconstrainedprocesses
A
andB
areconstrainedbisimilar,writtenA _ B
,ifA ⇓ B
andthere existsa
_
-bisimulationE
suchthatA E B
.The followingtheorem shows the connection between
π
-process open bisimilarity,∼
, andconstrainedbisimilarity,
_
.Theorem1 (Characterizationof
∼
intermsof_
)P ∼ D Q
ifandonlyifhP, D ∩
fn(P ) i _ hQ, D ∩
fn(Q) i
4.5 Non-Redundant Transitions
Asitisseenfromthedenitionof
_
-bisimulation,itsuersfromsomeofthesameproblems asthe denition of open bisimulationwith respect to constructing analgorithm based onpartition renement. A name emitted by
hP, Di
may not occur free inhQ, Ei
and thesubstitution
σ M
determined by theconditionM
in atransition ofhP, Di
mustbeappliedtothederivativeof
hQ, Ei
. Toremovethelatteroftheseproblems,dependency2describedin section4.3,[10]introducedthenotionof non-redundant transitions ofaconstrained
process.
Intuitively a transition
A ( M,α −→ ) A 0
is non-redundant if there does not exist another transitionA ( −→ N,β ) A 00
whereM
impliesN
,α = βσ M
, andA 0
andA 00
arebisimilar.Denition 21 (Non-RedundantTransitions)
Let
D
bearelationonconstrainedprocesses. Atransitionh P, D i ( −→ h M,α ) P 0 , D 0 i
isredundantfor
D
ifthereexistsatransitionhP, Di ( −→ hP N,β ) 00 , D 00 i
suchthat(i)
M 6B N
,(ii)
α = βσ M
,and(iii)
hP 0 , D 0 i D hP 00 σ M , D M P,α ∩
fn(P 00 σ M ) i
.A transition
A ( M,α −→ ) A 0
is non-redundant forD
, writtenA ( M,α −→ ) A 0 ∈
nr( D )
, if it is notredundantfor
D
.Computing the non-redundant transitions of a process is as dicult as checking for
bisimilarity[10].
The following lemma showsthat when we havetwo bisimilarconstrained processes
A
and
B
then, ifA
has a non-redundant transition,B
canmatch it with a non-redundant transitionwiththesameconditionandaction.Lemma1
If
A _ B
andA ( −→ M,α ) A 0 ∈
nr(_)
withbn(α) ∩
fn(B) = ∅
thenthereexistsaB 0
suchthatB ( M,α −→ ) B 0 ∈
nr(_)
andA 0 _ B 0
.Thisisstatedin thefollowinglemma.
Lemma2
If
D ⊆ E
thennr( E ) ⊆
nr( D )
.4.6 Active Names
Toavoiddependency1describedin section 4.3, the choice ofbound names of theactions
of matching transitions for bisimilar constrained processes should be made local to the
processes. Since thefree names of two bisimilarconstrained processes arenot necessarily
thesame,thechoicecannotbebasedonthese. [10]hasshownthatthechoicecanbebased
onactive names sincethese arethesameforbisimilarconstrainedprocesses. Intuitively
the activenamesofaconstrained processarethesubset ofthefreenameswhichinuence
thebehavioroftheprocess.
Denition 22 (ActiveNames)
Let
D
be a relation on constrained processes and let anD
be the least xed point of thefunction
ψ : ( CP → P ( N )) → ( CP → P ( N ))
denedasψ(f )(A) = [
{ M,α,A 0 | A (M,α) −→ A 0 ∈
nr(D)}
fn
(M, α) ∪ (f (A 0 ) \
bn(α))
Thename
n
isactiveinA
withrespecttoD
ifn ∈
anD (A)
andotherwisen
isinactiveinA
withrespectto
D
.Computingtheactivenamesofaprocessisasdicultascheckingforbisimilarity[10].
An activename in aconstrained process with respect to arelation is also active with
respecttoasubsetofthisrelation. Thisisstatedinthefollowinglemma.
Lemma3
If
D ⊆ E
thenanE ⊆
anD
.The following lemma shows that twobisimilarconstrained processeshave thesameset of
activenameswithrespectto
_
.Lemma4
If
A _ B
thenan_ (A) =
an_ (B)
.This lemmaimplies thatiffor each transition
A ( M,α −→ ) A 0
thepossiblyboundname inα
isconverted to the least not active name of
A
then the actions onmatching transitions are equal.Non-redundanttransitionswiththeiractionsconvertedasdescribedarecallednormal-
ized transitions.