Abstract 1 Introduction 2 Related Work 3 Preliminary definitions 4 History-indexed formulations of bisimilarity 5 A compositional open bisimilarity with mismatch 6 Alternative definitions of open bisimilarity with mismatch 7 Conclusion and future work References 8 Appendix

Open Bisimilarity for the π-Calculus with Mismatch

Tiange Liu ORCID School of Computing, The Australian National University, Canberra, Australia Alwen Tiu ORCID School of Computing, The Australian National University, Canberra, Australia Ross Horne ORCID University of Strathclyde, Glasgow, UK
Abstract

Open bisimilarity is an equivalence relation for the π-calculus that is also congruence, making it suitable to use in compositional reasoning for mobile processes and communication protocols. The original definition of open bisimilarity, due to Sangiorgi, does not account for the mismatch operator, that is crucial in modelling real-world protocols. When mismatch is present, the congruence property no longer holds for open bisimilarity. In a LICS 2018 paper, Horne et al. proposed an extension of open bisimilarity, using a history-indexed class of relations, to address this problem. That definition, however, turns out to be non-compositional as we shall demonstrate in this paper. This paper presents a new definition of open bisimilarity in the π-calculus that incorporates mismatch. This is achieved by augmenting the transition semantics of the π-calculus with an explicit assumption about name distinctions, and by requiring that open bisimulation to be closed under an arbitary extension of the name distinctions assumption. We then prove that the resulting open bisimilarity is both an equivalence relation and a congruence.

Keywords and phrases:
mismatch, open bisimilarity, pi calculus
Copyright and License:
[Uncaptioned image] © Tiange Liu, Alwen Tiu, and Ross Horne; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Process calculi
Editors:
Patricia Bouyer and Jaco van de Pol

1 Introduction

The π-calculus is a mathematical model developed for studying and describing concurrent systems, particularly focusing on how these systems can communicate and change their structures dynamically. It was introduced by Milner, Parrow, and Walker in the late 1980s and early 1990s [18, 19]. Within this framework, equivalence relations, known as bisimilarities, were developed to compare the behaviors of processes. Milner, Parrow and Walker initially defined the late and early bisimilarity [19], which provide foundational approaches for reasoning about process equivalence. Later, Sangiorgi and Walker extended these notions by introducing open bisimilarity [22] and quasi-open bisimilarity [23], which allow for a more flexible treatment of free and bound names. These extensions address limitations in the original definitions, particularly with respect to handling name instantiation and substitution.

An important property for an equivalence relation in the π-calculus is that it is a congruence. A congruence relation ensures that if two processes are bisimilar, they remain bisimilar in any context. While late and early bisimilarities fail to satisfy congruence, as they are not preserved by the input prefix operator, both open and quasi-open bisimilarities are congruence relations. This property guarantees that if two processes are shown to be open or quasi-open bisimilar, they will exhibit identical behavior under any contextual composition.

However, Sangiorgi’s definition does not account for the mismatch operator [xy]P, which is crucial for modeling protocols that require explicit distinctions between names. The mismatch operator, denoted as [xy]P, enables a process P to proceed only if the names x and y are distinct. If x and y are the same, the process cannot proceed and essentially behaves like the deadlock process 0.

We are particularly interested in congruence relations (open and quasi-open bisimilarity). With congruence, one can prove equivalence for individual components of a system and infer equivalence for the entire system without re-evaluating interactions in every context. This greatly simplifies reasoning about correctness and facilitates the modular design of mobile systems, where processes often operate in dynamic and evolving environments. While quasi-open bisimilarity with mismatch has been explored and formalised in previous work [13], open bisimilarity with mismatch remains an open topic. In this paper, we fill this gap by extending Sangiorgi’s original definition of open bisimilarity to include mismatch.

Our interests in (quasi-)open bisimulation stem from its operational nature that brings it closer to implementation. In particular, it gets rid of one source of infinity – the quantification over all input when reasoning about processes that are parameteric on the input they receive. The lazy treatment of input values in open bisimulation is similar to that of symbolic bisimulation [12, 7], but with the additional advantage of being a congruence. The former allows for practical implementations of bisimulation checkers for the π-calculus and its extensions (see e.g., [5, 27, 26]), while the latter has been shown to be crucial in reasoning about privacy properties of security protocols formalised in the applied-pi calculus, a cryptographic extension of the π-calculus [15]. The addition of mismatch enables processes to make decisions based on name inequalities. This capability allows one to, for example, encode a typical if-then-else construct in programming languages and protocols, with the else branch corresponds to the mismatch prefix. This use of the mismatch operator is important in modeling real-world protocols, as such protocols typically incorporate various error conditions (that are typically captured in the else-branch of a decision point) that could potentially lead to privacy leakage, as shown in cryptographic extensions of the π-calculus, e.g., [4, 9]. By studying mismatch in a minimal setting in the π-calculus, we hope to gain insights into its uses in (cryptographic) extensions of the π-calculus.

In most presentations of the π-calculus including the original syntax, the mismatch operator is absent for several reasons. Firstly, introducing mismatch can violate the monotonicity property of substitutions in the π-calculus. Substitutions typically should not reduce the capability of a process for action [24, Chapter 1.1]. Formally, if P𝛼P, then we want PσασPσ for all possible σ [20]. However, mismatch can lead to situations where two originally distinct names become identical after substitution, resulting in a process being less capable of performing actions due to name equality. For example, [xy]τ can perform a τ-transition, but when we apply the substitution {y/x}, the process transforms into [yy]τ which equals 0. Secondly, a naive extension of open bisimilarity with mismatch would result in a non-compositional open bisimilarity, breaking the congruence property that ensures the open bisimilarity is preserved under all contexts. We will use counterexamples to illustrate this point in the next section.

To maintain the monotonicity property, one crucial measure is to impose some restrictions on the substitution of names. We stipulate that, without any further assumptions, [xy]P can only execute if it is guaranteed that x and y can never become equal under an arbitrary context that can potentially modify x or y, e.g., if the process is nested inside an input prefix binding x or y. To account for the interactions between input names and restricted names (induced by scope extrusion in the π-calculus), a notion of name distinctions [22] is introduced in both the operational semantics of the π-calculus and our new definition of open bisimulation. Under this definition, these two processes [xy]τ and τ can be distinguished using open bisimilarity because the former can perform a τ-transition only if the inequality between x and y is ensured, i.e., x and y cannot be equal under any possible substitutions, while the latter can perform the τ-transition unconditionally.

Horne et al. [13] introduced an extended definition of quasi-open bisimilarity that incorporates mismatch. In the same work, they also explored open bisimilarity with mismatch, proposing an extended definition based on a history-indexed syntax that allows histories to be prepended. An alternative extension of open bisimilarity was proposed in [17], also utilizing history-indexed syntax, but leveraging on a certain rigidisation relation. However, as we will demonstrate in Section 3, these definitions are fundamentally unsound in a strong sense, i.e., they are not preserved by parallel composition. We propose here a new definition of open bisimilarity that extends only slightly Sangiorgi’s original definition, by essentially requiring open bisimilarity to be preserved by additions of name distinctions. We then prove that this new open bisimilarity is both an equivalence relation and a congruence.

Outline.

In Section 2 we review related work on process calculi featuring mismatch. In Section 3, we revisit the original syntax and operational semantics of the π-calculus (excluding mismatch) and review Sangiorgi’s foundational definitions of distinction and open strong bisimilarity. As all the bisimulation relations we discuss in this paper are strong bisimulation relations (where the silent transitions are taken into account in the bisimulation game), we shall simply refer to these relations as bisimulation rather than strong bisimulation. Our results should extend to weak bisimulation as well, as the issue of name distinctions is orthogonal to the strong vs weak semantics of bisimulation. In Section 4, we discuss prior attempts to incorporate mismatch into open bisimilarity and illustrate their issues through counterexamples. In Section 5, we add mismatch to the syntax and operational semantics, subsequently defining open bisimilarity with mismatch. We present a slightly revised operational semantics indexed by distinction D. Then this new definition of open bisimilarity is proven to be a equivalence relation and a congruence relation. In Section 6, we show that our open bisimilarity cannot be represented using the previously history-indexed semantics. Finally, Section 7 provides conclusions and outlines future work.

2 Related Work

We touch on some related work on process calculi featuring mismatch and work on open bisimilarity.

Parrow and Victor introduced the fusion calculus [21], which is a unified communication model where name equivalence and name fusion replace name-passing and scope extrusion, simplifying the core concepts of mobility. The Fu and Yang provided complete axiomatizations for fusion calculus both with and without the mismatch operator. The paper discusses how mismatch can complicate the semantics but is essential for certain types of behavioral equivalences and conditions. In [11], the authors investigated weak bisimulation congruences for finite π-calculus processes, focusing on challenges posed by the mismatch operator. The paper demonstrates that the standard definition of weak open congruence leads to problematic equivalence relations when mismatch is included, and proposes two alternatives: late open congruence and early open congruence.

Open bisimulation shares many similarities with symbolic bisimulation, in particular in its “lazy” treatment of name instantiations. Symbolic bisimulation has been extensively studied for different calculi: For value-passing CCS, Hennessy and Lin [12] generalised the standard notion of labelled transition graphs to symbolic transition graphs, allowing the operational semantics of value-passing processes to be represented in finite terms even when the underlying transition graph is infinite. This work introduces algorithms applicable to early and late bisimulation equivalences, extending the scope of standard bisimulation techniques. Symbolic bisimulation for the π-calculus was addressed in [7], where symbolic transition systems are tailored to handle mobility and dynamic process communication, culminating in a sound and complete proof system for symbolic bisimulation. Delaune et al. proposed a symbolic semantics for the finite applied π-calculus [10], adapting symbolic bisimulation for modeling cryptographic protocols. While this approach is sound, it is not complete, primarily automating observational equivalence under constraints from external inputs. A more comprehensive framework was proposed in [16], which achieved both soundness and completeness for symbolic bisimulation in the full applied π-calculus. This framework also supports replication and other complex constructs, making it suitable for equivalence checking in dynamic and security-critical systems.

The original semantics provided for the applied π-calculus is sound and complete with respect to observational equivalence [1]. However, as we know, observational equivalence is not closed under input prefix, as per its definition in the context of protocol verification. This distinguishes it fundamentally from open bisimulation. Early work on symbolic bisimulation for CCS and its subsequent extension to the π-calculus can be characterised as “classical”. In these approaches, labelled transition semantics are indexed by constraints – arising from name equality or inequality in the π-calculus, and more complex terms in the applied π-calculus. Different solutions to these constraints correspond to different continuations of a given symbolic process. The constraint languages employed are based on classical logic, inherently incorporating the principle of the excluded middle for names (x=yxy). As demonstrated in [3], open bisimulation, in contrast, is inherently intuitionistic. Consequently, symbolic bisimulations are distinct from open bisimulation at that fundamental level.

Horne and Mauw have explored open bisimilarity in the applied π-calculus that features mismatch. In [14], they introduced a generalisation of the distinction relation to sets of inequalities between terms, where inequalities act as constraints that exclude unifying messages under an equational theory. Their framework was developed to support a chain of techniques for verifying privacy properties in a real-world ePassport case study, highlighting the practical relevance of open bisimilarity in applied security protocols. While their work demonstrates the applicability of the concept in a more expressive calculus, it does not establish a congruence result for the proposed bisimilarity. In contrast, this paper addresses this theoretical gap in the simpler setting of the π-calculus with mismatch, where many of the core challenges of compositional reasoning arise.

3 Preliminary definitions

In this section we review the syntax and operational semantics of the finite fragment (i.e., the fragment without replication or recursion) of the π-calculus and open bisimilarity.

3.1 𝝅 calculus

We assume a countably infinite set of names, whose members are ranged over by lower-case letters such as x,y and z. Figure 1 shows the original syntax and operational semantics of the π-calculus. We denote with 𝒫 the set of processes.

π::=τ(silent)x¯y(free output)x(y)(input) P::=0(deadlock)νx.P(new)π.P(action)[x=y]P(match)P|P(par)P+P(choice)

Figure 1: The original syntax and late transitional semantics of the π-calculus. Their symmetric variants are omitted.

There are three kinds of prefixes for processes, i.e., the silent prefix, the output prefix, and the input prefix, indicating the capabilities of actions. The silent prefix represents an internal action that is not visible to the outside environment. It is used to model internal computation or synchronization that does not involve any communication with the external environment. The output prefixes represent an action where the process sends the name y along channel x. In free output x¯y, the name y is not bound by the action, meaning it is a freely chosen name. The input prefix represents an action where the process waits to receive a name on channel x, and the received name is bound within the scope of the input action. The processes can be of the form defined in Figure 1. Besides the action prefixes that we just introduced, νx.P represents the creation of a new, private channel x within the process P. The scope of the name x is restricted to the process P, meaning x is not visible outside P. Match represents a conditional process that behaves like P can evolve if and only if x is equal to y. Parallel composition represents two processes running in parallel. Both processes can proceed independently or interact with each other through communication. Choice represents a process that can choose to behave either like process P or Q. The choice is nondeterministic, meaning the process can proceed with either option.

3.2 Distinction and open bisimilarity

As previously mentioned, names in the π-calculus are not inherently distinguished by how they can be instantiated. However, there are situations where we need to impose additional requirements on certain names, such as ensuring that some specific names remain distinct. Therefore, distinctions [22] are used to manage and track name inequalities explicitly. They help to maintain and enforce the conditions under which two processes can be considered behaviorally equivalent, taking into account the different ways names can be treated (bound or free) and ensuring that comparisons are meaningful even when names are abstracted or bound within processes.

A substitution is a mapping from names to names that is the identity everywhere except for a finite set of names, called its domain. Substitutions are ranged over by σ, θ, ρ, possibly with subscripts. We use the notation {y1/x1,,yn/xn} to enumerate a substitution mapping xi to yi, for i{1,,n}. Given a substitution σ and names x and y, the substitution σ[y/x] is defined as follows: (σ[y/x])(z)=σ(z) if zx, and σ(x)=y. Applications of a substitution to a syntactic expression (terms, processes, etc) are written in a postfix notation, e.g., Pσ denotes the result of applying σ to P. This notational convention is extended homomorphically to sets and relations. We require that the application of a substitution to an expression containing binders are capture-avoiding.

Definition 1 (Distinction).

A distinction D is a finite symmetric and irreflexive relation on names. A substitution σ respects D if (x,y)D implies xσyσ. We denote with 𝒟 the set of all distinctions. Given sets of names A and B, the distinction AB is defined as:

AB={(a,b),(b,a)aA,bB,ab}

This means that AB contains all ordered pairs (a,b) and (b,a) such that a is an element of A, b is an element of B, and ab.

Sangiorgi defined the open bisimilarity as a family of equivalence relations indexed by distinctions. Given two family of relations ={RD}D𝒟 and 𝕊={SD}D𝒟, we say is subsumed by 𝕊, written 𝕊, if for every D𝒟, we have RDSD.

Definition 2 (Sangiorgi’s open bisimilarity).

A family of relations ={RD}D𝒟 is an open bisimulation if for every D𝒟 , whenever PRDQ:

  • For all σ respecting D, (Pσ)RDσ(Qσ);

  • If P𝛼P and α is not a bound output, then Q s.t. Q𝛼Q and PRDQ;

  • If Px¯(z)P and z is fresh, then Q s.t. Qx¯(z)Q and PRDQ, where D=D({z}fn(P,Q)).

We refer to oD as open D-bisimilarity iff there exists an open bisimulation and an RD such that PRDQ. Open bisimilarity refers to a special case of open D-bisimilarity where D=.

However, as we mentioned in the introduction, directly adding mismatch to Sangiorgi’s open bisimilarity would break the monotonicity property. The mismatch operator typically behaves as "if xy then P[20], formally,

(1)

This definition is obviously not closed under substitution. As we illustrated in the introduction, [xy]P can execute as P, but when we apply {y/x} to the process, [yy]P cannot perform any transitions.

4 History-indexed formulations of bisimilarity

As mentioned in the introduction, maintaining the monotonicity property requires imposing certain restrictions on name substitution. Several works have attempted to address this challenge. In this section, we review existing approaches to incorporating mismatch into open bisimilarity and discuss the shortcomings of each approach.

Horne at al. [13] presented an extended open bisimilarity using the notion of history h, which is a list of names annotated with either i (denoting an input name) or o (denoting an output name). A history h captures the sequence of names that a process sends and receives during its transitions. It is essentially a (partial) trace of a process. The use history-indexed open bisimulation was first proposed in [25] for the spi-calculus [2], a cryptographic extension of the π-calculus, although the idea dates back to the encoding of the π-calculus in a logical framework [27], where the quantifier alternation used in statements surrounding bisimilarity captures the notion of histories we use here. A history or a quantifier alternation gives rise to an implicit encoding of distinction, and is very natural from both the logical and an implementation perspective. The latter, for example, could build on existing logical frameworks (such as [5]) to provide a simple implementation of open bisimulation. It is thus a natural question to ask whether one could reformulate open bisimulation using histories to encode distinctions. The answer for the case without mismatch is in the affirmative; in the presence of mismatch, this turns out to be not true. We shall come back to this in Section 6.

We simplify the notion of histories from [25] to include only names, rather than general terms. Names annotated with o (written as zo) represent the output names that a process emits in its bound output transitions. Conversely, names annotated with i (written as zi) signify the symbolic inputs (i.e., variables) received by the process. The difference between these two types of annotations is formalised in the following definition of respectful substitutions.

Definition 3 (Substitutions with respect to a history).

A substitution σ respects h if, for all h,h′′ and x such that h=hxoh′′, we have xσ=x and yσx for all yh.

In this context, the o-annotated names act like constants, while i-annotated names act like scoped variables, with their scoping determined by their relative positions in the history. Viewing a history as a trace of names that a process inputs and outputs, this scoping ensures that a name received earlier in the trace cannot be identified with a fresh name outputted later. Tiu and Miller have discussed in [27, Corollary 22] that open bisimulation indexed by histories does not affect the resulting notion of bisimilarity compared to Sangiorgi’s original definition.

Given a history h, it is easy to generate a distinction that can functionally replace h. Let P and Q be two processes, h be a history. Define a distinction Dh from h such that

Dh={(xi,xj)ij and xi,xjho, or i<j and xihi,xjho} (2)

The converse does not hold, as not all possible distinctions can be represented as histories. However, the open bisimilarity relation (i.e., the largest open bisimulation), defined via the history-indexed style, coincides with Sangiorgi’s original definition (Definition 2), as one can show that open-bisimilarity between two processes (under the empty distinction) can be witnessed by a bisimulation relation indexed only by distinctions that are representable as histories [27].

With the history-indexed semantics, the operational semantics of mismatch can be adapted as follows.

where hxyiffxσyσ for all σ respecting h. Other operational semantics can be indexed by history similarly.

This semantics successfully preserves the monotonicity rule mentioned in the introduction. The history-indexed monotonicity rule can be stated as: Suppose h:P𝜋Q. Then hσ:PσπσQσ for all σ that respect h and satisfy for all xbn(π), yσ=x iff x=y. The proof that monotonicity holds with the history-indexed mismatch rule is provided in [17].

While the monotonicity issue has been resolved, the congruence problem remains challenging. Let us look at a history-indexed open bisimilarity defined in [17].

Definition 4 (History-indexed open bisimilarity [17]).

An open bisimulation is a history-indexed collection {ohh} of symmetric relations on processes such that whenever PohQ:

  • For all substitutions σ respecting h, we have PσohσQσ.

  • If h:P𝛼P then Q s.t. h:Q𝛼Q and PohQ, where α is of the form τ or x¯y;

  • If h:Px¯(z)P and z is fresh, then Q s.t. h:Qx¯(z)Q and PohzoQ;

  • If h:Px(z)P and z is fresh, then Q s.t. h:Qx(z)Q and PohziQ.

The pointwise union of all open bisimulations is denoted by {ohh}. We refer to oh as open h-bisimilarity. We write PohQ if there exists an open bisimulation {ohh} and a history h with only i-annotated names such that PohQ and fn(P,Q)h. We call P and Q open bisimilar.

This definition aligns with Sangiorgi’s open bisimilarity (Def. 2). In the third clause with bound output transitions, the history (environment) is updated with a fresh private name, which serves the same function as adding the fresh name to the distinction set.

This definition is not congruent in the presence of the mismatch operator. The process [xy]τ under the history h=xiyi is open bisimilar to 0, as there exists a respectful substitution {x/y} that invalidates xy, thereby preventing the τ-transition from [xy]τ. However, this open bisimilarity does not extend to a¯(x).[xy]τ and a¯(x).0 under the history h=yixo, since [xy] always holds under the history h.

To address this limitation, a few studies have been conducted. Horne et. al. [13] provided an extended version of the history-indexed open bisimilarity that allows to extend histories in the past, which gives rise to a strictly coarser semantics. Their definition can be stated as follows.

Definition 5 (Extended open bisimilarity [13]).

A symmetric relation R indexed by an environment is an open bisimulation whenever, if PRhQ the following hold:

  • For all σ respecting h, PσRhσQσ;

  • For any history h, we have PRhhQ;

  • If h:P𝛼P and α is of the form τ or x¯y, then Q s.t. h:Q𝛼Q and PRhQ;

  • If h:Px¯(z)P and z is fresh, then Q s.t. h:Qx¯(z)Q and PRhxoQ.

  • If h:Px(z)P and z is fresh, then Q s.t. h:Qx(z)Q and PRhxiQ.

Open bisimilarity o is defined such that PoQ holds whenever there exists an open bisimulation R such that PRx1ix2ixniQ holds, where fn(P)fn(Q){x1,x2,,xn}.

The above definition extends the original open bisimilarity by the second clause allowing for the prepending of history, enabling the incorporation of additional environmental information.

As it turns out, however, this semantics is not compositional.

Example 6.

We look at the following two processes:

P=νk,.a¯k.a¯.a(z).([k=z]τ+[kz]τ)v.s.νk,.a¯k.a¯.a(z).([=z]τ+[z]τ)=Q

Under Definition 5, P and Q are open bisimilar (so we are treating a as an i-annotated name). After three transitions, we compare

P=[k=z]τ+[kz]τv.s.[=z]τ+[z]τ=Q

under the history aikoozi We cannot distinguish the two processes because the history does not indicate the equality either between k and z or between and z. However the above processes can be distinguished when placed in the following context.

a(w)[]

A possible partial trace for a(w)P is as follows:

a(w)Pa¯(k)a(w)ν.a¯.a(z).([k=z]τ+[kz]τ)a(w)ν.a¯.a(z).([k=z]τ+[kz]τ)a¯()a(z).([k=z]τ+[kz]τ)a(z)([k=z]τ+[kz]τ)

These transitions would have to be matched by a(w)Q for the two processes to be bisimilar, so proving their bisimilarity reduces to proving bisimilarity of P and Q under the history h=ai.kowiozi. So let us suppose that P and Q are bisimilar under h. Since bisimilarity must be closed under respectful substitution, and since {w/z} respects h, it follows that

P{w/z}=[k=w]τ+[kw]τ must be bisimilar to Q{w/z}=[=w]τ+[w]τ

under h=h{w/z}=aikowilo. According to the definition of respectful substitutions in Definition 3, w holds, yet neither k=w nor kw hold. Thus Q{w/z} can perform a τ transition while P{w/z} cannot, contradicting their supposed bisimilarity.

In another attempt to address the issue [17], the authors resolved the monotonicity problem leveraging history-indexed operational semantics. Then to address the congruence property, they introduced the concept of rigidisation to refine open bisimilarity. The rigidisation of names allows us transforming an i-annotated name into an o-annotated name.

Definition 7 (Rigidisation relation).

The relation ro is the smallest relation on histories such that:

  • hroh iff h=h1xih2 and h=h1xoh2.

  • hroh.

  • ro is transitively closed.

Then open bisimilarity is extended by adding the second clause using the rigidisarion relation.

Definition 8 (Rigid open bisimilarity).

An open bisimulation is a history-indexed collection {ohh} of symmetric relations on processes such that whenever PohQ:

  • For all substitutions σ respecting h, we have PσohσQσ.

  • For any hroh, we have PohQ.

  • If h:P𝛼P then Q s.t. h:Q𝛼Q and PohQ, where α is of the form τ or x¯y;

  • If h:Px¯(z)P and z is fresh, then Q s.t. h:Qx¯(z)Q and PohzoQ;

  • If h:Px(z)P and z is fresh, then Q s.t. h:Qx(z)Q and PohziQ.

The pointwise union of all open bisimulations is denoted by {ohh}. We refer to oh as open h-bisimilarity. We write PohQ if there exists an open bisimulation {ohh} and a history h with only i-annotated names such that PohQ and fn(P,Q)h. We call P and Q open bisimilar.

This definition is also not compositional, as the following counterexample shows.

Example 9.

Consider the following processes:

P=a(z).a(y).a(x).([xy]τ.([x=z]τ+[xz]τ))v.s.a(z).a(y).a(x).([xy]τ.τ)=Q

These two processes are rigid open bisimilar according to Definition 8. To see this, observe after three inputs we get to

([xy]τ.([x=z]τ+[xz]τ)ozi.yi.xi[xy]τ.τ

There are two minimal ways to pass that guard, using the rigidisation. One approach is to directly rigidise xi to xo, which enables the condition [xz]. Alternatively, we can first set x=z, and then rigidise x, in which case [x=z] is enabled. However, when these processes are placed in the following context, they are no longer rigid open bisimilar.

C[]=νy.b(x).b¯(y).b(z).νa.(a¯(z).a¯(y).a¯(x)|[])

Placing the above processes in the given context and executing for 6 steps we get:

[xy]τ.([x=z]τ+[xz]τ)obi.xi.yo.zi[xy]τ.τ

Now, since x appears before y is output in the history, we have xy, so we reach the following after another τ-transition.

[x=z]τ+[xz]τobi.xi.yo.ziτ

Trivially process τ on the right hand side can make a τ-transition, however, since neither x=z nor xz are decided yet in this history, that τ-transition cannot be matched on the left hand side. This gives us a distinguishing strategy.

Therefore we violate the fundamental property of open bisimilarity – that it is a congruence. That is we have PohQ, but not C[P]ohC[Q].

5 A compositional open bisimilarity with mismatch

We now present our approach to incorporating mismatch in open bisimulation in a way that ensures the resulting bisimilarity is a congruence.

5.1 Syntax and operational semantics

This section introduces a variant of the π-calculus that incorporates mismatch. The labelled operational semantics are indexed by distinction D to address mismatch in open terms, where names are treated as variables instead of distinct constants. The syntax of processes is as in Figure 1, extended with the mismatch operator [xy]P.

Intuitively, the mismatch operator [xy]P is interpreted as saying that that process behaves like P if “x and y can never be equal”, that is, x and y can be proven distinct. This interpretation obviously depends on the context of name distinction under which this process is executed, so the transition judgment in our operational semantics includes an explicit reference to a distinction. The rest of the operators are interpreted in the same way as introduced in Section 3.1.

Figure 2: The late transition semantics with mismatch of the π-calculus indexed by distinction D. Their symmetric variants are omitted. For any transition D:PQ that z is a bound name in P, we require z to be fresh from D.

In the context of open bisimulation, names within a process can be substituted throughout execution. Consequently, the operational semantics for mismatch must account for all possible instantiations. To address this, we present the operational semantics of the π-calculus with mismatch in Figure 2. Our formulation introduces a slight variation from the standard late operational semantics by incorporating a distinction index for each transition. This index is crucial for including the mismatch operator. Another key point to observe is that the distinctions are extended with a fresh name in the Open and Res rules when the ν-binder appears in process expressions. This notation ensures that such names remain unchanged by respectful substitutions. This is crucial for dealing with mismatch when a variable is bound by a ν-binder, e.g., to conclude that νx.[xy]τ can perform a τ-transition:

Lemma 10.

Let D be a distinction and suppose σ,θ are substitutions such that σ respects D. Then θ respects Dσ if and only if σθ respects D.

The following monotonicity property of processes ensures that any substitution does not diminish the process’s capability for action. We show that our extended operational semantics with mismatch preserves the monotonicity property.

Lemma 11 (Monotonicity).

Suppose D:P𝜋Q. Then Dσ:PσπσQσ for all σ that respect D and satisfy for all xbn(π), yσ=x iff x=y.

Proof.

We prove the lemma by induction on the transition rules. We show here an inductive case involving the Mismatch rule.

D:P𝜋Q(x,y)DD:[xy]P𝜋Q.

We want to prove that if D:[xy]P𝜋Q then Dσ:[xσyσ]PσπσQσ for all σ respecting D. From the Mismatch rule we have D:P𝜋Q and (x,y)D. By induction hypothesis, Dσ:PσπσQσ for all σ respecting D. Also from Lemma 10, (xσ,yσ)Dσ. Then following the Mismatch rule, we have

Dσ:PσπσQσ(xσ,yσ)DσDσ:[xσyσ]PσπσQσ

5.2 Open bisimilarity with mismatch

Indexing the transition rule by the distinction D resolves the monotonicity problem. However, this does not address all the issues. The congruence property of open bisimilarity is still not guaranteed. We look at a simple example.

Example 12.

Consider the following two processes: P=[xy]τ and Q=0. They are bisimilar (PoDQ) under Sangiorgi’s definition (Def. 2), because x and y are free names so that D=. Yet if we place the above processes in the context a¯(x).{},

a¯(x).([xy]τ)≁oDa¯(x).0 where D={(x,y),(y,x),(x,a),(a,x)}.

Then after the first bound output transition, the resulting processes are no longer bisimilar according to the same definition. The former process can make a τ-transition because (x,y)D, which implies that x and y cannot be equal under all respectful substitutions. In contrast, the latter process cannot make such a transition.

We then need to revise the definition of open bisimilarity to address the congruence problem. The below definition slightly extends Definition 2 by adding the second clause, imposing the closure of open bisimulation under arbitrary extensions of distinctions. For clarity and convenience in subsequent proofs, for the rest of the paper, we denote open bisimilarity as a ternary relation, relating triplets of two processes and a distinction.

Definition 13 (Open bisimilarity).

An open bisimulation is a ternary relation R𝒫×𝒫×𝒟 such that R is symmetric (i.e., (P,Q,D)R iff (Q,P,D)R) and for all (P,Q,D)R:

  • For all σ respecting D, (Pσ,Qσ,Dσ)R

  • For all DD, (P,Q,D)R

  • If D:P𝛼P and α is not a bound output, then Q such that D:Q𝛼Q and (P,Q,D)R

  • If D:Px¯(z)P and z is fresh, then Q such that D:Qx¯(z)Q and (P,Q,D)R, where D=D({z}fn(P,Q))

Open D-bisimilarity D is such that PDQ whenever there exists an open bisimulation R such that (P,Q,D)R. We write PQ to denote PQ, i.e., they are open bisimilar under the empty distinction.

Consider again Example 12. We have shown that [xy]τoD0, for D=, under Definition 2. However, according to the second clause in our new definition, we can add {(x,y),(y,x)} to D and then D:[xy]τ𝜏0 while 0 cannot make such transition. Therefore [xy]τ and 0 are not open bisimilar by our extended definition.

Similarly, we look at Example 6:

P=νk,.a¯k.a¯.a(z).([k=z]τ+[kz]τ)v.s.νk,.a¯k.a¯.a(z).([=z]τ+[z]τ)=Q

We have shown that P and Q are open bisimilar under the history-indexed open bisimilarity (Def. 5). The history is koozi, which corresponds to a distinction D={(k,),(,k)}. By our new definition, however, we could define DD such that D={(k,),(,k),(,z),(z,)}.

The names and z can never be equal under distinction D while neither k=z nor kz is decided yet. Thus there is a distinguishing strategy where the latter process plays a τ but the former cannot match the transition. Hence, under our new definition, P and Q are not open bisimilar, which avoids the non-congruence problem.

Problems with Example 9 can be resolved in a similar manner:

P=a(z).a(y).a(x).([xy]τ.([x=z]τ+[xz]τ))v.s.Q=a(z).a(y).a(x).([xy]τ.τ)

Initially, the distinction D=, as there are no bound-output names in the processes. Under our new Definition 13, if we extend D to D={(x,y),(y,x)}, these processes are no longer open bisimilar. This is because xy is guaranteed, while the equality between x and z remains undecided. This extension avoids the non-congruence issue.

A well-formulated definition of open bisimilarity should be an equivalence relation, satisfying the properties of reflexivity, symmetry, and transitivity.

Theorem 14.

The open D-bisimilarity is an equivalence relation.

  • Reflexivity: For all P and D, PDP.

  • Symmetry: For all P,Q,D, if PDQ, then QDP.

  • Transitivity: For all P,Q,V and D, if PDQ and QDV, then PDV.

Proof.

The proof is provided in Appendix 8.1.

To prove that our open bisimilarity (Def. 13) is a congruence, we must demonstrate that if two processes are open bisimilar, they remain open bisimilar under all possible contexts.

First, since the behavior of distinctions within contexts depends on the structure of the context, we define a formal mechanism to update a distinction D when it is placed within a context C[]. Specifically, if the context includes a restriction operator νz, which binds the name z, the distinction is updated by removing all references to z from D (as z becomes local to the context). For all other contexts, the distinction D remains unchanged.

This mechanism ensures that distinctions accurately reflect the constraints on free names in the process, while adhering to the scoping rules imposed by restrictions.

Given a distinction D and a name z, we denote with Dz the distinction obtained from D by removing all pairs of names in D containing z, i.e., Dz={(x,y)xz and yz}.

Definition 15 (Distinction update under context).

Let C[] be an arbitrary context, and D𝒟 be a distinction. We define the distinction C[D] as follows:

C[D] ={C[D]zif C[]=νz.C[]Dotherwise

Then the congruence of open bisimilarity can be formally stated as follows:

Theorem 16.

Open bisimilarity is a D-congruence. Specifically:

  • If PDQ, then C[P]C[D]C[Q] for any context C.

The core goal of the proof is to show that the relation (C[P],C[Q],C[D]) is included in bisimilarity. The most direct and intuitive approach would be to construct a bisimulation that relates them explicitly and verify that it satisfies the required properties of a bisimulation. However, finding such a bisimulation relation directly can be challenging and computationally expensive, especially when dealing with complex contexts, distinctions, and substitutions.

To address this, we adapt the up-to technique, a powerful method introduced by Milner and later developed extensively by Sangiorgi and others [24, Chapter 2.3], which simplifies the task of proving bisimilarity by reducing the complexity of direct comparisons. Instead of checking whether P and Q are directly bisimilar, this technique defines a function F, called a safe function, which transforms or approximates the bisimilarity relation. By verifying that F is safe – that is, F behaves consistently under various transformations such as substitutions, context embeddings, and name restrictions – the proof can be carried out more abstractly and modularly.

The key idea is that instead of requiring a bisimulation to explicitly relate every process pair at every step, we demonstrate that the function F preserves the necessary properties of bisimulation when applied to the transformed processes. In this way, the proof burden shifts from directly constructing and verifying a bisimulation to ensuring that F satisfies certain progression and closure properties. This abstraction makes the up-to technique more flexible and easier to apply in practice.

Before delving into the proof, we first define strong open progression, which is the foundation for defining the safe function F.

Definition 17 (Strong open progression).

Let R and S be ternary relations such that R,S𝒫×𝒫×𝒟. We say R strongly open progresses to S, written RS, if whenever (P,Q,D)R:

  • For all σ respecting D, (Pσ,Qσ,Dσ)S

  • For all DD, (P,Q,D)S

  • If D:P𝛼P and α is not a bound output, then Q such that D:Q𝛼Q and (P,Q,D)S

  • If D:Px¯(z)P and z is fresh, then Q such that D:Qx¯(z)Q and (P,Q,D)S, where D=D({z}fn(P,Q))

Now we can introduce the safe function. The safe function F operates on relations and preserves the progression structure, ensuring that the bisimilarity relation is not broken during transformations. This property is formalised by the notion of strong safety, which guarantees that F behaves consistently with respect to progression.

Definition 18 (Strongly safe function).

A function F is strongly safe if RS and RS implies F(R)F(S) and F(R)F(S).

We now formally define a strongly safe function and present two key lemmas that describe its properties. These can be proved similarly to the analogous lemmas in [24, Chapter 2.3].

Lemma 19.

If F is strongly safe and RF(R), then R and F(R) are included in .

Lemma 20.

If F is strongly safe and F(), then F()=.

To apply the up-to technique, we define the function F that maps a relation R to a new relation capturing all possible transformations of R under arbitrary contexts C. The following lemma establishes that the function F is strongly safe.

Lemma 21.

Let F be the function

F(R)={(C[P],C[Q],C[D]) C is an arbitrary context and (P,Q,D)R}.

Then F is strongly safe.

Proof.

Suppose RS and RS. We need to prove that F(R)F(S) and F(R)F(S). The inclusion F(R)F(S) follows directly from RS and the definition of F.

To prove the progression, we need to show that if C is an arbitrary context and (P,Q,D)R, (C[P],C[Q],C[D])F(R) by definition of F, then the progression conditions in Def. 17 are satisfied. We need to prove each of the claims below.

Claim 1.

(C[P]σ,C[Q]σ,C[D]σ)F(S) for each σ that respects C[D].

Claim 2.

(C[P],C[Q],DS)F(S) for all DSC[D].

Claim 3.

If C[D]:C[P]𝛼P and α is not a bound output, then C[D]:C[Q]𝛼Q with (P,Q,C[D])F(S).

Claim 4.

If C[D]:C[P]x¯(z)P and z is fresh, then C[D]:C[Q]𝛼Q with (P,Q,C[D])F(S) where C[D]=C[D]({z}fn(C[P],C[Q])).

We present the proof of Claim 2 here, as it involves the key clause introduced in our extended definition of open bisimilarity. The remaining three claims are proved by induction on C, which requires a thorough and exhaustive case analysis. Complete proofs are provided in Appendix 8.2.

There are two cases to consider for Claim 2. In the first case, we have that the context C[] does not contain any ν-binders binding a name in DS, so we have C[DS]=DS. Let D1=DDS. Then D1DS and C[D1]=DS. From the assumption that RS, we have (P,Q,D1)S, therefore (C[P],C[Q],C[D1])=(C[P],C[Q],DS)F(S) by the definition of F. For the second case, suppose that the context C[.] contains a ν binder that binds a name in DS. We consider the case where C[.] binds exactly one name z in DS (but this argument can be generalised to any number of binders). Let DSw be obtained from DS by replacing z with a fresh name w. Since z is a binder in C[.] it follows that C[D] contains no occurrences of z. So we also have DSwC[D]. Then by the construction in the first case, we have (C[P],C[Q],DSw)F(S). Now by Claim 1, we can apply the substitution {z/w}, which respects DSw, to obtain (C[P],C[Q],DS)F(S) as required.

Proof of Theorem 16.

Let R be an open bisimulation and F(R) defined as in Lemma 21. Clearly R=F(R) when C[] is empty. Therefore RF(R). Then F(R) is also an open bisimulation by Lemma 20.

6 Alternative definitions of open bisimilarity with mismatch

We reflect here on semantically different definitions of open bisimilarity with mismatch. A question is whether open bisimilarity, as in Def. 13, has an equivalent definition in terms of histories, by extending Def. 5 to allow more histories to be induced. In particular, an extended definition could permit more permutations such that inputs behave like universal quantifiers and outputs of fresh names like nominal quantifiers. This is a natural question, since several deep embeddings of the π-calculus work in this way.

It turns out that using (linear) histories would result in a distinct semantics. Consider the following example process.

P=[xy][wz]([xz]τ+[yz]τ+[xw]τ+[yw]τ)v.s.Q=[xy][wz]τ

Clearly, according to Def. 13 these processes are not open bisimilar, since we can extend the set of distinction with the inequalities xy and wz without having to decide whether any of the other inequalities hold.

If however a ground output in a history were used to induce xy and wz then we require a history with xi before yo or xo before yi. In the same history we also require wi before zo or zo before wi. Without loss of generality suppose that xi is before yo and wi is before zo in a history. Now, since a history is an ordered sequence of inputs and outputs we have that wi is before yo or yo is before wi, as considered here.

  • If wi is before yo, then we have that wy holds and hence a τ transition is enabled for both processes.

  • If yo is before wi, then since we assumed also that xi is before yo and wi is before zo we have that xi is before zo. Hence xz holds and hence a τ transition is enabled for both processes.

Thus, regardless of how the definition is constructed, if a definition of open bisimilarity relies on a linear history to force distinctions, the processes P and Q above will be open bisimilar.

7 Conclusion and future work

This paper presents a novel definition of open bisimilarity for the π-calculus that integrates the mismatch operator. Mismatch, while crucial for modeling protocols requiring explicit name distinctions, introduces challenges such as violating the congruence property and breaking monotonicity. Building on Sangiorgi’s original framework, we address these issues by introducing a distinction-indexed operational semantics that allows for arbitrary extensions of distinctions. Our approach ensures that open bisimilarity remains a congruence relation even in the presence of mismatch. While prior approaches that relied on history-indexed relations or rigidisation strategies did not achieve compositionality, our method successfully addresses this limitation while also providing greater simplicity and conceptual clarity. Through formal proofs, we demonstrated that the extended open bisimilarity is both equivalent and congruent. This makes it a robust and expressive framework for reasoning about mobile processes and communication protocols, enabling better modeling of real-world systems.

As immediate future work, we plan to formalise the results of this paper in the theorem prover Isabelle/Nominal [28], building on an existing formalisation of the π-calculus [6].

Another avenue for possible future work is to generalise our transition semantics to be parameterised by logical constraints. Logically speaking, both distinctions and substitutions can be seen as expressing a conjunction of (in)equalities between names. This can be generalised in at least two possible directions: one in which we allow expressions of (in)equalities between (algebraic) terms (like those arising from the transition semantics for the applied π-calculus [1, 14]) and another where we allow other logical connectives (e.g., disjunction, implication, quantifiers). In such an extension, it is then natural to ask how such a logical constraint should be interpreted semantically, e.g., whether it should be viewed as a formula in classical (first-order) logic, or intuitionistic logic. We conjecture that the first interpretation (in classical logic) would give rise to the notion of symbolic bisimulation [12], and the second interpretation would give rise to open bisimulation. Work on symbolic bisimilarity for the ψ-calculus [8] takes a step in this direction. The ψ-calculus is parametrised on a constraint system that can be very general. Notably in Sec. 7 of the aforementioned paper a constraint logic is defined that must be classical for the completeness results in that paper to hold. By simply working without the law of excluded middle, we hypothesise that a notion of open bisimulation for ψ-calculi is obtained where the constraint logic can otherwise be general.

References

  • [1] Martín Abadi, Bruno Blanchet, and Cédric Fournet. The applied pi calculus: Mobile values, new names, and secure communication. J. ACM, 65(1):1:1–1:41, 2018. doi:10.1145/3127586.
  • [2] Martín Abadi and Andrew D. Gordon. A calculus for cryptographic protocols: The spi calculus. In Richard Graveman, Philippe A. Janson, Clifford Neuman, and Li Gong, editors, CCS ’97, Proceedings of the 4th ACM Conference on Computer and Communications Security, Zurich, Switzerland, April 1-4, 1997, pages 36–47. ACM, 1997. doi:10.1145/266420.266432.
  • [3] Ki Yung Ahn, Ross Horne, and Alwen Tiu. A characterisation of open bisimilarity using an intuitionistic modal logic. In Roland Meyer and Uwe Nestmann, editors, 28th International Conference on Concurrency Theory, CONCUR 2017, September 5-8, 2017, Berlin, Germany, volume 85 of LIPIcs, pages 7:1–7:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2017. doi:10.4230/LIPIcs.CONCUR.2017.7.
  • [4] Myrto Arapinis, Tom Chothia, Eike Ritter, and Mark Ryan. Analysing unlinkability and anonymity using the applied pi calculus. In Proceedings of the 23rd IEEE Computer Security Foundations Symposium, CSF 2010, Edinburgh, United Kingdom, July 17-19, 2010, pages 107–121. IEEE Computer Society, 2010. doi:10.1109/CSF.2010.15.
  • [5] David Baelde, Andrew Gacek, Dale Miller, Gopalan Nadathur, and Alwen Tiu. The bedwyr system for model checking over syntactic expressions. In Frank Pfenning, editor, Automated Deduction - CADE-21, 21st International Conference on Automated Deduction, Bremen, Germany, July 17-20, 2007, Proceedings, volume 4603 of Lecture Notes in Computer Science, pages 391–397. Springer, 2007. doi:10.1007/978-3-540-73595-3_28.
  • [6] Jesper Bengtson. The pi-calculus in nominal logic. Arch. Formal Proofs, 2012, 2012. URL: https://www.isa-afp.org/entries/Pi_Calculus.shtml.
  • [7] Michele Boreale and Rocco De Nicola. A symbolic semantics for the pi-calculus. Inf. Comput., 126(1):34–52, 1996. doi:10.1006/INCO.1996.0032.
  • [8] Johannes Borgström, Ramunas Gutkovas, Ioana Rodhe, and Björn Victor. The psi-calculi workbench: A generic tool for applied process calculi. ACM Trans. Embed. Comput. Syst., 14(1):9:1–9:25, 2015. doi:10.1145/2682570.
  • [9] Vincent Cheval, Hubert Comon-Lundh, and Stéphanie Delaune. Trace equivalence decision: negative tests and non-determinism. In Yan Chen, George Danezis, and Vitaly Shmatikov, editors, Proceedings of the 18th ACM Conference on Computer and Communications Security, CCS 2011, Chicago, Illinois, USA, October 17-21, 2011, pages 321–330. ACM, 2011. doi:10.1145/2046707.2046744.
  • [10] Stéphanie Delaune, Steve Kremer, and Mark Ryan. Symbolic bisimulation for the applied pi calculus. In Vikraman Arvind and Sanjiva Prasad, editors, FSTTCS 2007: Foundations of Software Technology and Theoretical Computer Science, 27th International Conference, New Delhi, India, December 12-14, 2007, Proceedings, volume 4855 of Lecture Notes in Computer Science, pages 133–145. Springer, 2007. doi:10.1007/978-3-540-77050-3_11.
  • [11] Yuxi Fu and Zhenrong Yang. Tau laws for pi calculus. Theoretical Computer Science, 308(1-3):55–130, 2003. doi:10.1016/S0304-3975(03)00202-0.
  • [12] Matthew Hennessy and Huimin Lin. Symbolic bisimulations. Theor. Comput. Sci., 138(2):353–389, 1995. doi:10.1016/0304-3975(94)00172-F.
  • [13] Ross Horne, Ki Yung Ahn, Shang-Wei Lin, and Alwen Tiu. Quasi-open bisimilarity with mismatch is intuitionistic. In Anuj Dawar and Erich Grädel, editors, Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2018, Oxford, UK, July 09-12, 2018, pages 26–35. ACM, 2018. doi:10.1145/3209108.3209125.
  • [14] Ross Horne and Sjouke Mauw. Discovering epassport vulnerabilities using bisimilarity. Log. Methods Comput. Sci., 17(2):24, 2021. doi:10.23638/LMCS-17(2:24)2021.
  • [15] Ross Horne, Sjouke Mauw, and Semen Yurkov. When privacy fails, a formula describes an attack: A complete and compositional verification method for the applied π-calculus. Theor. Comput. Sci., 959:113842, 2023. doi:10.1016/J.TCS.2023.113842.
  • [16] Jia Liu and Huimin Lin. A complete symbolic bisimulation for full applied pi calculus. Theor. Comput. Sci., 458:76–112, 2012. doi:10.1016/J.TCS.2012.07.034.
  • [17] Tiange Liu, Alwen Tiu, and Jim de Groot. Modal logics for mobile processes revisited. In 34th International Conference on Concurrency Theory (CONCUR 2023). Schloss-Dagstuhl-Leibniz Zentrum für Informatik, 2023.
  • [18] Robin Milner, Joachim Parrow, and David Walker. A calculus of mobile processes, i. Information and computation, 100(1):1–40, 1992. doi:10.1016/0890-5401(92)90008-4.
  • [19] Robin Milner, Joachim Parrow, and David Walker. A calculus of mobile processes, II. Information & Computation, 100:41–77, 1992. doi:10.1016/0890-5401(92)90009-5.
  • [20] Joachim Parrow and Davide Sangiorgi. Algebraic theories for name-passing calculi. Information and Computation, 120(2):174–197, 1995. doi:10.1006/INCO.1995.1108.
  • [21] Joachim Parrow and Björn Victor. The fusion calculus: Expressiveness and symmetry in mobile processes. In Proceedings. Thirteenth Annual IEEE Symposium on Logic in Computer Science (Cat. No. 98CB36226), pages 176–185. IEEE, 1998. doi:10.1109/LICS.1998.705654.
  • [22] Davide Sangiorgi. A theory of bisimulation for the pi-calculus. In Eike Best, editor, CONCUR ’93, 4th International Conference on Concurrency Theory, Hildesheim, Germany, August 23-26, 1993, Proceedings, volume 715 of Lecture Notes in Computer Science, pages 127–142. Springer, 1993. doi:10.1007/3-540-57208-2_10.
  • [23] Davide Sangiorgi and David Walker. On barbed equivalences in pi-calculus. In Kim Guldstrand Larsen and Mogens Nielsen, editors, CONCUR 2001 - Concurrency Theory, 12th International Conference, Aalborg, Denmark, August 20-25, 2001, Proceedings, volume 2154 of Lecture Notes in Computer Science, pages 292–304. Springer, 2001. doi:10.1007/3-540-44685-0_20.
  • [24] Davide Sangiorgi and David Walker. The pi-calculus: a Theory of Mobile Processes. Cambridge university press, 2003.
  • [25] Alwen Tiu. A trace based bisimulation for the spi calculus: An extended abstract. In Zhong Shao, editor, Programming Languages and Systems, 5th Asian Symposium, APLAS 2007, Singapore, November 29-December 1, 2007, Proceedings, volume 4807 of Lecture Notes in Computer Science, pages 367–382. Springer, 2007. doi:10.1007/978-3-540-76637-7_25.
  • [26] Alwen Tiu and Jeremy E. Dawson. Automating open bisimulation checking for the spi calculus. In Proceedings of the 23rd IEEE Computer Security Foundations Symposium, CSF 2010, Edinburgh, United Kingdom, July 17-19, 2010, pages 307–321. IEEE Computer Society, 2010. doi:10.1109/CSF.2010.28.
  • [27] Alwen Tiu and Dale Miller. Proof search specifications of bisimulation and modal logics for the pi-calculus. ACM Trans. Comput. Log., 11(2):13:1–13:35, 2010. doi:10.1145/1656242.1656248.
  • [28] Christian Urban. Nominal techniques in isabelle/hol. J. Autom. Reason., 40(4):327–356, 2008. doi:10.1007/S10817-008-9097-2.

8 Appendix

8.1 Proof for Lemma 14

Proof.

We illustrate the proof for transitivity here (the other cases are straightforward). By definition, since PDQ, there exists an open bisimulation relation R1 such that (P,Q,D)R1. Similarly, there exists a R2 such that (Q,V,D)R2.

Let R3={(P,V,D)(P,Q,D)R1,(Q,V,D)R2}. Obviously, (P,V,D)R3, so it suffices to show that R3 is an open bisimulation.

  • Suppose (P,V,D)R3, then (P,Q,D)R1 and (Q,V,D)R2. For all σ respecting D, we have (Pσ,Qσ,Dσ)R1, and (Qσ,Vσ,Dσ)R2. Then by definition of R3, (Pσ,Vσ,Dσ)R3.

  • Let D be a distinction that DD. By definition of open bisimilarity, (P,Q,D)R1 and (Q,V,D)R2. Hence by definition of R3, (P,V,D)R3.

  • If D:P𝛼P and α is not a bound output, then Q such that D:Q𝛼Q and (P,Q,D)R1. Then V such that D:V𝛼V and (Q,V,D)R2. By definition of R3, (P,V,D)R3.

  • If D:Px¯(z)P and z is fresh, then Q such that D:Qx¯(z)Q and (P,Q,D)R1 where D=D({z}fn(P,Q,V)). Then V such that D:Vx¯(z)V and (Q,V,D)R2 where D=D({z}fn(P,Q,V)). By definition of R3, (P,V,D)R3.

8.2 Proof for Lemma 21

Proof.

We prove each of the conditions below (each listed as a claim followed by a proof).

Claim 5.

(C[P]σ,C[Q]σ,C[D]σ)F(S) for each σ that respects C[D].

Proof.

Because RS, (Pθ,Qθ,Dθ)S for all θ respecting D and (C[Pθ],C[Qθ],C[Dθ])F(S) by definition of F.

We prove the statement by induction on C. When C=[], (C[P],C[Q],C[D])=(P,Q,D). Then C[P]σ=Pσ,C[Q]σ=Qσ,C[D]σ=Dσ. Since RS and (P,Q,D)R, we have (Pσ,Qσ,Dσ)S. Thus (C[P]σ,C[Q]σ,C[D]σ)SF(S).

When C=νz.C[],C[D]=C[D]z by Definition 15. Since substitutions must be capture-avoiding, without loss of generality, we can assume that z is not in the range of σ. Let σ=σ[z/z], i.e., σ is obtained from σ by removing the mapping for z. We have that σ respects C[D]z, and since z is a bound name C[], we also have C[P]σ=(νz.C[P])σ=νz.(C[P]σ) and C[Q]σ=(νz.C[Q])σ=νz.(C[P]σ) and (νz.C[D])σ=(C[D]z)σ=C[D]σ. By induction hypothesis, (C[P]σ,C[Q]σ,C[D]σ)F(S). By definition of F, (C[P]σ,C[Q]σ,C[D]σ)F(S).

When C=MC[], by Definition 15, C[D]=C[D]. By induction hypothesis, (C[P]σ,C[Q]σ,C[D]σ)F(S) for all σ respects C[D]. By definition of F, (MC[P]σ,MC[Q]σ,MC[D]σ)F(S). Because σ also respects C[D], ((MC[P])σ,(MC[Q])σ,(MC[D])σ)F(S).

Other cases can be derived similarly.

Claim 6.

(C[P],C[Q],DS)F(S) for all DSC[D].

Proof.

There are two cases to consider. In the first case, we have that the context C[] does not contain any ν-binders binding a name in DS, so we have C[DS]=DS. Let D1=DDS. Then D1DS and C[D1]=DS. From the assumption that RS, we have (P,Q,D1)S, therefore (C[P],C[Q],C[D1])=(C[P],C[Q],DS)F(S) by the definition of F. For the second case, suppose that the context C[.] contains a ν binder that binds a name in DS. We consider the case where C[.] binds exactly one name z in DS (but this argument can be generalised to any number of binders). Let DSw be obtained from DS by replacing z with a fresh name w. Since z is a binder in C[.] it follows that C[D] contains no occurrences of z. So we also have DSwC[D]. Then by the construction in the first case, we have (C[P],C[Q],DSwF(S). Now by Claim 1, we can apply the substitution {z/w}, which respects DSw, to obtain (C[P],C[Q],DS)F(S) as required.

Claim 7.

If C[D]:C[P]𝛼P and α is not a bound output, then C[D]:C[Q]𝛼Q with (P,Q,C[D])F(S).

Proof.

We prove by induction on C.

Case 1.

Suppose C=[], so D:P𝛼P. Since (P,Q,D)R and RS, we have D:Q𝛼Q with (P,Q,D)S. Then (P,Q,D)F(S) since SF(S).

Case 2.

Suppose C=α.C (α is not a bound output), then P=C[P] and C[D]=C[D]. C[D]:C[Q]𝛼C[Q] by the ACT rule. Let Q=C[Q]. Because (P,Q,D)R, (C[P],C[Q],C[D])F(R) by definition of F. Since F(R)F(S), we have (C[P],C[Q],C[D])F(S), i.e., (P,Q,C[D])F(S).

Case 3.

Suppose C=νz.C, then C[D]=C[D]z. By the RES rule, C[D]z:νz.C[P]𝛼νz.P if C[D]:C[P]𝛼P. By induction hypothesis, we get C[D]:C[Q]𝛼Q and (P,Q,C[D])F(S). Then we have C[D]z:νz.C[Q]𝛼νz.Q by the RES rule. Also by definition of F, we get (νz.P,νz.Q,C[D])F(S) from (P,Q,C[D])F(S).

Case 4.

Suppose C=CA,A is any process. In this case C[D]=C[D]. If C[D]:C[P]A𝛼PA, then C[D](=C[D]):C[P]𝛼P according to PAR rule. By induction hypothesis, C[D]:C[Q]𝛼Q and (P,Q,C[D])F(S). Then we have C[D]:C[Q]A𝛼QA by the PAR rule. From (P,Q,C[D])F(S) and definition of F, we have (PA,QA,C[D])F(S) as required.

Consider the symmetric case, when A is the process that is acting C[D]:A𝛼A, then C[D]:C[P]A𝛼C[P]A and C[D]:C[Q]A𝛼C[Q]A according to PAR rule. By definition of F, (C[P]A,C[Q]A,C[D]A)F(R) where C[D]A=C[D]. Then (C[P]A,C[Q]A,C[D])F(S) because F(R)F(S).

If we have C[D]:C[P]x¯(z)P; C[D]:Ax(z)A, then C[D]:C[P]A𝜏νz.(PA) according to CLOSE rule. From C[D](=C[D]):C[P]x¯(z)P, we have C[D]:C[Q]x¯(z)Q and (P,Q,C[D])F(S) where C[D]=C[D]({z}fn(C[P],C[Q])) by induction hypothesis. Then C[D]:C[Q]A𝜏νz.(QA) by the CLOSE rule. From (P,Q,C[D])F(S) and the definition of F, we have (PA,QA,C[D])F(S) where C[D]=C[D]({z}fn(C[P],C[Q]))=C[D]({z}fn(C[P],C[Q])). Then by definition of F, (νz.(PA),νz.(QA),C[Q])F(S).

When C[D]:C[P]x(z)P and C[D]:Ax¯yA, we have C[D]:C[P]A𝜏P{y/z}A according to the COM rule. By induction hypothesis, C[D](=C[D]):C[Q]x(z)Q so that C[D]:C[Q]A𝜏Q{y/z}A, and (P,Q,C[D])F(S). Because z is a placeholder that zC[D], C[D]{y/z}=C[D]. Then (P{y/z},Q{y/z},C[D])F(S), and (P{y/z}A,Q{y/z}A,C[D])F(S) by definition of F.

The symmetric case is when C[D]:C[P]x¯yP and C[D]:Ax(z)A, we have C[D]:C[P]A𝜏PA{y/z}. By induction hypothesis, C[D]:C[Q]x¯yQ so that C[D]:C[Q]A𝜏QA{y/z} and (P,Q,C[D])F(S). Then by definition of F, (PA{y/z},QA{y/z},C[D])F(S).

Case 5.

Suppose C=[xy]C, then C[D]=C[D]. According to the MISMATCH rule, C[D]:[xy]C[P]𝜋P when C[D]:C[P]𝜋P and (x,y)D. By induction hypothesis, we have C[Q]:C[Q]𝜋Q and (P,Q,C[D])F(S). And by the MISMATCH rule, C[D]:[xy]C[Q]𝜋Q.

Other cases can be proved similarly using the same technique.

Claim 8.

If C[D]:C[P]x¯(z)P and z is fresh, then C[D]:C[Q]𝛼Q with (P,Q,C[D])F(S) where C[D]=C[D]({z}fn(C[P],C[Q])).

Consider the bound output case in Case 2., when C=x¯(z).C, P=C[P]. In this case C[D]=C[D]z because x¯(z) is just the abbreviation of νz.x¯z. By the ACT rule, C[D]:C[Q]x¯(z)C[Q]. Let Q=C[Q]. By definition of F, (C[P],C[Q],C[D])F(R), i.e., (P,Q,C[D]({z}fn(C[P],C[Q])))F(R)F(S).

Consider the bound output in Case 3. Consider the RES rule. When C=νy.C and C[D]=C[D]y. We have C[D]:νy.C[P]x¯(z)νy.P if C[D]y:C[P]x¯(z)P, where C[D]y=C[D]({y}fn(C[P])). By induction hypothesis, C[D]y:C[Q]x¯(z)Q and (P,Q,C[D]yz)F(S), where C[D]yz=C[D]y({z}fn(C[P],C[Q]))=C[D]y({z}fn(C[P],C[Q])). By definition of F, we have (νy.P,νy.Q,C[D])F(S) where C[D]=C[D]({z}fn(C[P],C[Q])) as required. Also by the RES rule we have C[D]:νy.C[Q]x¯(z)νy.Q.

Now we look at the OPEN rule. C[D]:νz.C[P]x¯(z)P when C[D]:C[P]x¯zP with z{x}D and C[D]=C[D]({z}fn(νz.C[P])). By induction hypothesis, C[D]:C[Q]x¯zQ and (P,Q,C[D])F(S). Also we have C[D]:νz.C[Q]x¯(z)Q by the OPEN rule.