Open Bisimilarity for the -Calculus with Mismatch
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 calculusCopyright and License:
2012 ACM Subject Classification:
Theory of computation Process calculiEditors:
Patricia Bouyer and Jaco van de PolSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
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 , which is crucial for modeling protocols that require explicit distinctions between names. The mismatch operator, denoted as , enables a process to proceed only if the names and are distinct. If and are the same, the process cannot proceed and essentially behaves like the deadlock process .
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 , then we want 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, can perform a -transition, but when we apply the substitution , the process transforms into which equals . 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, can only execute if it is guaranteed that and can never become equal under an arbitrary context that can potentially modify or , e.g., if the process is nested inside an input prefix binding or . 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 and can be distinguished using open bisimilarity because the former can perform a -transition only if the inequality between and is ensured, i.e., and 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 . 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 (). 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 and Figure 1 shows the original syntax and operational semantics of the -calculus. We denote with the set of processes.
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 along channel . In free output , the name 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 , 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, represents the creation of a new, private channel within the process . The scope of the name is restricted to the process , meaning is not visible outside . Match represents a conditional process that behaves like can evolve if and only if is equal to . 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 or . 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 to enumerate a substitution mapping to , for Given a substitution and names and , the substitution is defined as follows: if , and Applications of a substitution to a syntactic expression (terms, processes, etc) are written in a postfix notation, e.g., denotes the result of applying to 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 is a finite symmetric and irreflexive relation on names. A substitution respects if implies . We denote with the set of all distinctions. Given sets of names and , the distinction is defined as:
This means that contains all ordered pairs and such that is an element of , is an element of , and .
Sangiorgi defined the open bisimilarity as a family of equivalence relations indexed by distinctions. Given two family of relations and , we say is subsumed by , written , if for every , we have
Definition 2 (Sangiorgi’s open bisimilarity).
A family of relations is an open bisimulation if for every , whenever :
-
For all respecting , ;
-
If and is not a bound output, then s.t. and ;
-
If and is fresh, then s.t. and , where .
We refer to as open -bisimilarity iff there exists an open bisimulation and an such that Open bisimilarity refers to a special case of open -bisimilarity where
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 then " [20], formally,
| (1) |
This definition is obviously not closed under substitution. As we illustrated in the introduction, can execute as , but when we apply to the process, 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 , which is a list of names annotated with either (denoting an input name) or (denoting an output name). A history 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 (written as ) represent the output names that a process emits in its bound output transitions. Conversely, names annotated with (written as ) 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 if, for all and such that , we have and for all .
In this context, the -annotated names act like constants, while -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 , it is easy to generate a distinction that can functionally replace . Let and be two processes, be a history. Define a distinction from such that
| (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 for all respecting . 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 . Then for all that respect and satisfy for all , iff . 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 of symmetric relations on processes such that whenever :
-
For all substitutions respecting , we have .
-
If then s.t. and , where is of the form or ;
-
If and is fresh, then s.t. and ;
-
If and is fresh, then s.t. and .
The pointwise union of all open bisimulations is denoted by . We refer to as open -bisimilarity. We write if there exists an open bisimulation and a history with only -annotated names such that and . We call and 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 under the history is open bisimilar to , as there exists a respectful substitution that invalidates , thereby preventing the -transition from . However, this open bisimilarity does not extend to and under the history , since always holds under the history .
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 indexed by an environment is an open bisimulation whenever, if the following hold:
-
For all respecting , ;
-
For any history , we have ;
-
If and is of the form or , then s.t. and ;
-
If and is fresh, then s.t. and .
-
If and is fresh, then s.t. and .
Open bisimilarity is defined such that holds whenever there exists an open bisimulation such that holds, where .
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:
Under Definition 5, and are open bisimilar (so we are treating as an -annotated name). After three transitions, we compare
under the history We cannot distinguish the two processes because the history does not indicate the equality either between and or between and . However the above processes can be distinguished when placed in the following context.
A possible partial trace for is as follows:
These transitions would have to be matched by for the two processes to be bisimilar, so proving their bisimilarity reduces to proving bisimilarity of and under the history . So let us suppose that and are bisimilar under Since bisimilarity must be closed under respectful substitution, and since respects , it follows that
under According to the definition of respectful substitutions in Definition 3, holds, yet neither nor hold. Thus can perform a transition while 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 is the smallest relation on histories such that:
-
iff and
-
-
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 of symmetric relations on processes such that whenever :
-
For all substitutions respecting , we have .
-
For any , we have .
-
If then s.t. and , where is of the form or ;
-
If and is fresh, then s.t. and ;
-
If and is fresh, then s.t. and .
The pointwise union of all open bisimulations is denoted by . We refer to as open -bisimilarity. We write if there exists an open bisimulation and a history with only -annotated names such that and . We call and open bisimilar.
This definition is also not compositional, as the following counterexample shows.
Example 9.
Consider the following processes:
These two processes are rigid open bisimilar according to Definition 8. To see this, observe after three inputs we get to
There are two minimal ways to pass that guard, using the rigidisation. One approach is to directly rigidise to , which enables the condition . Alternatively, we can first set , and then rigidise , in which case is enabled. However, when these processes are placed in the following context, they are no longer rigid open bisimilar.
Placing the above processes in the given context and executing for 6 steps we get:
Now, since appears before is output in the history, we have , so we reach the following after another -transition.
Trivially process on the right hand side can make a -transition, however, since neither nor 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 , but not .
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 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 .
Intuitively, the mismatch operator is interpreted as saying that that process behaves like if “ and can never be equal”, that is, and 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.
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 can perform a -transition:
Lemma 10.
Let be a distinction and suppose are substitutions such that respects . Then respects if and only if respects .
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 . Then for all that respect and satisfy for all , iff .
Proof.
We prove the lemma by induction on the transition rules. We show here an inductive case involving the Mismatch rule.
We want to prove that if then for all respecting . From the Mismatch rule we have and . By induction hypothesis, for all respecting . Also from Lemma 10, . Then following the Mismatch rule, we have
5.2 Open bisimilarity with mismatch
Indexing the transition rule by the distinction 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: and . They are bisimilar () under Sangiorgi’s definition (Def. 2), because and are free names so that . Yet if we place the above processes in the context ,
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 , which implies that and 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 such that is symmetric (i.e., iff ) and for all :
-
For all respecting ,
-
For all ,
-
If and is not a bound output, then such that and
-
If and is fresh, then such that and , where
Open -bisimilarity is such that whenever there exists an open bisimulation such that . We write to denote , i.e., they are open bisimilar under the empty distinction.
Consider again Example 12. We have shown that , for , under Definition 2. However, according to the second clause in our new definition, we can add to and then while cannot make such transition. Therefore and are not open bisimilar by our extended definition.
Similarly, we look at Example 6:
We have shown that and are open bisimilar under the history-indexed open bisimilarity (Def. 5). The history is , which corresponds to a distinction . By our new definition, however, we could define such that .
The names and can never be equal under distinction while neither nor 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, and are not open bisimilar, which avoids the non-congruence problem.
Problems with Example 9 can be resolved in a similar manner:
Initially, the distinction , as there are no bound-output names in the processes. Under our new Definition 13, if we extend to , these processes are no longer open bisimilar. This is because is guaranteed, while the equality between and 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 -bisimilarity is an equivalence relation.
-
Reflexivity: For all and , .
-
Symmetry: For all , if , then .
-
Transitivity: For all and , if and , then .
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 when it is placed within a context . Specifically, if the context includes a restriction operator , which binds the name , the distinction is updated by removing all references to from (as becomes local to the context). For all other contexts, the distinction 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 and a name , we denote with the distinction obtained from by removing all pairs of names in containing , i.e., .
Definition 15 (Distinction update under context).
Let be an arbitrary context, and be a distinction. We define the distinction as follows:
Then the congruence of open bisimilarity can be formally stated as follows:
Theorem 16.
Open bisimilarity is a -congruence. Specifically:
-
If , then for any context .
The core goal of the proof is to show that the relation 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 and are directly bisimilar, this technique defines a function , called a safe function, which transforms or approximates the bisimilarity relation. By verifying that is safe – that is, 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 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 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 .
Definition 17 (Strong open progression).
Let and be ternary relations such that We say strongly open progresses to , written , if whenever :
-
For all respecting ,
-
For all ,
-
If and is not a bound output, then such that and
-
If and is fresh, then such that and , where
Now we can introduce the safe function. The safe function 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 behaves consistently with respect to progression.
Definition 18 (Strongly safe function).
A function is strongly safe if and implies and .
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 is strongly safe and , then and are included in .
Lemma 20.
If is strongly safe and , then .
To apply the up-to technique, we define the function that maps a relation to a new relation capturing all possible transformations of under arbitrary contexts . The following lemma establishes that the function is strongly safe.
Lemma 21.
Let be the function
Then is strongly safe.
Proof.
Suppose and . We need to prove that and . The inclusion follows directly from and the definition of .
To prove the progression, we need to show that if is an arbitrary context and , by definition of , then the progression conditions in Def. 17 are satisfied. We need to prove each of the claims below.
Claim 1.
for each that respects .
Claim 2.
for all .
Claim 3.
If and is not a bound output, then with .
Claim 4.
If and is fresh, then with where .
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 , 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 does not contain any -binders binding a name in , so we have Let . Then and From the assumption that , we have , therefore by the definition of . For the second case, suppose that the context contains a binder that binds a name in We consider the case where binds exactly one name in (but this argument can be generalised to any number of binders). Let be obtained from by replacing with a fresh name . Since is a binder in it follows that contains no occurrences of So we also have Then by the construction in the first case, we have Now by Claim 1, we can apply the substitution , which respects , to obtain as required.
Proof of Theorem 16.
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.
Clearly, according to Def. 13 these processes are not open bisimilar, since we can extend the set of distinction with the inequalities and without having to decide whether any of the other inequalities hold.
If however a ground output in a history were used to induce and then we require a history with before or before . In the same history we also require before or before . Without loss of generality suppose that is before and is before in a history. Now, since a history is an ordered sequence of inputs and outputs we have that is before or is before , as considered here.
-
If is before , then we have that holds and hence a transition is enabled for both processes.
-
If is before , then since we assumed also that is before and is before we have that is before . Hence 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 and 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 , there exists an open bisimulation relation such that . Similarly, there exists a such that .
Let . Obviously, , so it suffices to show that is an open bisimulation.
-
Suppose , then and . For all respecting , we have , and . Then by definition of , .
-
Let be a distinction that . By definition of open bisimilarity, and . Hence by definition of , .
-
If and is not a bound output, then such that and . Then such that and . By definition of , .
-
If and is fresh, then such that and where . Then such that and where . By definition of , .
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.
for each that respects .
Proof.
Because , for all respecting and by definition of .
We prove the statement by induction on . When , . Then . Since and , we have . Thus .
When by Definition 15. Since substitutions must be capture-avoiding, without loss of generality, we can assume that is not in the range of . Let , i.e., is obtained from by removing the mapping for . We have that respects , and since is a bound name , we also have and and By induction hypothesis, . By definition of , .
When , by Definition 15, . By induction hypothesis, for all respects . By definition of , . Because also respects , .
Other cases can be derived similarly.
Claim 6.
for all .
Proof.
There are two cases to consider. In the first case, we have that the context does not contain any -binders binding a name in , so we have Let . Then and From the assumption that , we have , therefore by the definition of . For the second case, suppose that the context contains a binder that binds a name in We consider the case where binds exactly one name in (but this argument can be generalised to any number of binders). Let be obtained from by replacing with a fresh name . Since is a binder in it follows that contains no occurrences of So we also have Then by the construction in the first case, we have Now by Claim 1, we can apply the substitution , which respects , to obtain as required.
Claim 7.
If and is not a bound output, then with .
Proof.
We prove by induction on .
Case 1.
Suppose , so . Since and , we have with . Then since .
Case 2.
Suppose ( is not a bound output), then and . by the ACT rule. Let . Because , by definition of . Since , we have , i.e., .
Case 3.
Suppose , then . By the RES rule, if . By induction hypothesis, we get and . Then we have by the RES rule. Also by definition of , we get from .
Case 4.
Suppose is any process. In this case . If , then according to PAR rule. By induction hypothesis, and . Then we have by the PAR rule. From and definition of , we have as required.
Consider the symmetric case, when is the process that is acting , then and according to PAR rule. By definition of , where . Then because .
If we have ; , then according to CLOSE rule. From , we have and where by induction hypothesis. Then by the CLOSE rule. From and the definition of , we have where . Then by definition of , .
When and , we have according to the COM rule. By induction hypothesis, so that , and . Because is a placeholder that , . Then , and by definition of .
The symmetric case is when and , we have . By induction hypothesis, so that and . Then by definition of , .
Case 5.
Suppose , then . According to the MISMATCH rule, when and . By induction hypothesis, we have and . And by the MISMATCH rule, .
Other cases can be proved similarly using the same technique.
Claim 8.
If and is fresh, then with where .
Consider the bound output case in Case 2., when , . In this case because is just the abbreviation of . By the ACT rule, . Let . By definition of , , i.e., .
Consider the bound output in Case 3. Consider the RES rule. When and . We have if , where . By induction hypothesis, and , where . By definition of , we have where as required. Also by the RES rule we have .
Now we look at the OPEN rule. when with and . By induction hypothesis, and . Also we have by the OPEN rule.
