1 Introduction

A BPP net is a simple type of finite Place/Transition Petri net [18] whose transitions have singleton pre-set. Nonetheless, as a transition can produce more tokens than the only one consumed, there can be infinitely many reachable markings of a BPP net. BPP is the acronym of Basic Parallel Processes [4], a simple CCS [11, 15] subcalculus (without the restriction operator) whose processes cannot communicate. In [12] a variant of BPP, which requires guarded sum and guarded recursion, is actually shown to represent all and only the BPP nets, up to net isomorphism, and this explains the name of this class of nets.

In a recent paper [13], we proposed a novel behavioral equivalence for BPP nets, based on a suitable generalization of the concept of bisimulation [15], originally defined over labeled transition systems (LTSs, for short). A team bisimulation R over the places of an unmarked BPP net is a relation such that if two places \(s_1\) and \(s_2\) are related by R, then if \(s_1\) performs a and reaches the marking \(m_1\), then \(s_2\) may perform a reaching a marking \(m_2\) such that \(m_1\) and \(m_2\) are element-wise, bijectively related by R (and vice versa if \(s_2\) moves first). Team bisimilarity is the largest team bisimulation over the places of the unmarked BPP net, and then such a relation is lifted to markings by additive closure: if place \(s_1\) is team bisimilar to place \(s_2\) and the marking \(m_1\) is team bisimilar to \(m_2\) (the base case relates the empty marking to itself), then also \(s_1 \oplus m_1\) is team bisimilar to \(s_2 \oplus m_2\), where \(\_ \oplus \_\) is the operator of multiset union. Note that to check if two markings are team bisimilar we need not to construct an LTS, such as the interleaving marking graph, describing the global behavior of the whole system, but only to find a bijective, team bisimilarity-preserving match among the elements of the two markings. In other words, two distributed systems, each composed of a team of sequential, non-cooperating processes (i.e., the tokens in the BPP net), are equivalent if it is possible to match each sequential component of the first system with one team-bisimilar, sequential component of the other system, as in any sports where two competing (distributed) teams have the same number of (sequential) players.

The complexity of checking whether two markings of equal size are team bisimilar is very low. First, by adapting the optimal algorithm for standard bisimulation equivalence over LTSs [19], team bisimulation equivalence over places can be computed in \(O(m \cdot p^2 \cdot \text{ log } (n+1))\) time, where m is the number of net transitions, p is the size of the largest post-set (i.e., p is the least natural such that \(|t^{\bullet }| \le p\) for all t) and n is the number of places. Then, checking whether two markings of size k are team bisimilar can be done in \(O(k^2)\) time. Of course, we proved that team bisimilar markings respect the global behavior; in particular, we proved that team bisimilarity implies interleaving bisimilarity and that team bisimilarity coincides with strong place bisimilarity [1].

In this paper, we complete the comparison between team bisimilarity on markings and the causal semantics of BPP nets. In particular, we propose a novel coinductive equivalence, called causal-net bisimulation equivalence, inspired by [9], which is essentially a bisimulation semantics over the causal nets [2, 17] of the BPP net under scrutiny. We prove that team bisimilarity on markings coincides with causal-net bisimilarity, hence proving that our distributed semantics is coherent with the expected causal semantics of BPP nets. Moreover, we adapt the definition of fully-concurrent bisimulation (fc-bisimulation, for short) in [3], in order to be better suited for our aims. Fc-bisimilarity was inspired by previous notions of equivalence on other models of concurrency, in particular, by history-preserving bisimulation (hpb, for short) [8]. Moreover, we define also a slight strengthening of fc-bisimulation, called state-sensitive fc-bisimulation, which requires additionally that, for each pair of related processes, the current markings have the same size. We also prove that causal-net bisimilarity coincides with state-sensitive fc-bisimilarity. These behavioral causal semantics have been provided for BPP nets, but they can be easily adapted for general P/T nets.

The other main goal of this paper is to show that fc-bisimilarity (hence also hpb) can be characterized for BPP nets in a team-style, by means of h-team bisimulation equivalence. (The prefix h- is used to remind that h-team bisimilarity is connected to hpb.) The essential difference between a team bisimulation and an h-team bisimulation is that the former is a relation on the set of places only, while the latter is a relation on the set composed of the places and the empty marking \(\theta \).

The paper is organized as follows. Section 2 introduces the basic definitions about BPP nets and recalls interleaving bisimilarity. Section 3 discusses the causal semantics of BPP nets. First, the novel causal-net bisimulation is introduced, then (state-sensitive) fully-concurrent bisimilarity, as an improvement of the original one [3], which better suits our aims. Section 4 recalls the main definitions and results about team bisimilarity from [13]; in this section we also prove a novel result: causal-net bisimilarity coincides with team bisimilarity for BPP nets. Section 5 defines h-team bisimulation equivalence and studies its properties; in particular, we prove that h-team bisimilarity coincides with fc-bisimilarity. Finally, Sect. 6 discusses related literature.

2 Basic Definitions

Definition 1

(Multiset). Let \({\mathbb N}\) be the set of natural numbers. Given a finite set S, a multiset over S is a function \(m: S \rightarrow {\mathbb N}\). Its support set dom(m) is \(\{ s \in S \;\;\big |\;\;m(s) \ne 0\}\). The set \({\mathscr {M}}(S)\) of all multisets over S is ranged over by m. We write \(s \in m\) if \(m(s)>0\). The multiplicity of s in m is the number m(s). The size of m, denoted by |m|, is the number \(\sum _{s\in S} m(s)\), i.e., the total number of its elements. A multiset m such that \(dom(m) = \emptyset \) is called empty and is denoted by \(\theta \). We write \(m \subseteq m'\) if \(m(s) \le m'(s)\) for all \(s \in S\).

Multiset union \(\_ \oplus \_\) is defined as follows: \((m \oplus m')(s)\) \( = m(s) + m'(s)\); it is commutative, associative and has \(\theta \) as neutral element. Multiset difference \(\_ \ominus \_\) is defined as follows: \((m_1 \ominus m_2)(s) = max\{m_1(s) - m_2(s), 0\}\). The scalar product of a number j with m is the multiset \(j \cdot m\) defined as \((j \cdot m)(s) = j \cdot (m(s))\). By \(s_i\) we also denote the multiset with \(s_i\) as its only element. Hence, a multiset m over \(S = \{s_1, \ldots , s_n\}\) can be represented as \(k_1\cdot s_{1} \oplus k_2 \cdot s_{2} \oplus \ldots \oplus k_n \cdot s_{n}\), where \(k_j = m(s_{j}) \ge 0\) for \(j= 1, \ldots , n\).    \(\square \)

Definition 2

(BPP net). A labeled BPP net is a tuple \(N = (S, A, T)\), where

  • S is the finite set of places, ranged over by s (possibly indexed),

  • A is the finite set of labels, ranged over by \(\ell \) (possibly indexed), and

  • \(T \subseteq S \times A \times {\mathscr {M}}(S)\) is the finite set of transitions, ranged over by t (possibly indexed).

Given a transition \(t = (s, \ell , m)\), we use the notation:

  • \(^{\bullet }t\) to denote its pre-set s (which is a single place) of tokens to be consumed;

  • l(t) for its label \(\ell \), and

  • \(t^{\bullet }\) to denote its post-set m (which is a multiset) of tokens to be produced.

Hence, transition t can be also represented as \(^{\bullet }t {{\,{\mathop {\longrightarrow }\limits ^{l(t)}}\,}} t^{\bullet }\). We also define pre-sets and post-sets for places as follows: \(^{\bullet }s = \{t \in T \;\;\big |\;\;s \in t^{\bullet }\}\) and \(s^{\bullet } = \{t \in T \;\;\big |\;\;s\, {\in }\, ^{\bullet }t\}\). Note that the pre-set (post-set) of a place is a set.    \(\square \)

Definition 3

(Marking, BPP net system). A multiset over S is called a marking. Given a marking m and a place s, we say that the place s contains m(s) tokens, graphically represented by m(s) bullets inside place s. A BPP net system \(N(m_0)\) is a tuple \((S, A, T, m_{0})\), where (SAT) is a BPP net and \(m_{0}\) is a marking over S, called the initial marking. We also say that \(N(m_0)\) is a marked net.    \(\square \)

Definition 4

(Firing sequence). A transition t is enabled at m, denoted \(m[t\rangle \), if \(^{\bullet }t \subseteq m\). The firing of t enabled at m produces the marking \(m' = (m \ominus ^{\bullet }t) \oplus t^{\bullet }\), written \(m[t\rangle m'\). A firing sequence starting at m is defined inductively as follows:

  • \(m[\varepsilon \rangle m\) is a firing sequence (where \(\varepsilon \) denotes an empty sequence of transitions) and

  • if \(m[\sigma \rangle m'\) is a firing sequence and \(m' [t\rangle m''\), then \(m [\sigma t\rangle m''\) is a firing sequence.

If \(\sigma = t_1 \ldots t_n\) (for \(n \ge 0\)) and \(m[\sigma \rangle m'\) is a firing sequence, then there exist \(m_1, \ldots , m_{n+1}\) such that \(m = m_1[t_1\rangle m_2 [t_2\rangle \ldots m_n [t_n\rangle m_{n+1} = m'\), and \(\sigma = t_1 \ldots t_n\) is called a transition sequence starting at m and ending at \(m'\). The set of reachable markings from m is \([m\rangle = \{m' \;\;\big |\;\;\exists \sigma {.} m[\sigma \rangle m'\}.\)

Note that the reachable markings can be countably infinite. A BPP net system \(N(m_0) = (S, A, T, m_{0})\) is safe if each marking m reachable from the initial marking \(m_0\) is a set, i.e., \(\forall m \in [m_0\rangle , m(s) \le 1\) for all \(s \in S\). The set of reachable places from s is \(reach(s) = \bigcup \nolimits _{m \in [s\rangle } dom(m).\)

Note that reach(s) is always a finite set, even if \([s\rangle \) is infinite.    \(\square \)

Fig. 1.
figure 1

The net representing a semi-counter in (a), and a variant in (b)

Example 1

Figure 1(a) shows the simplest BPP net representing a semi-counter, i.e., a counter unable to test for zero. Note that the number represented by this semi-counter is the number of tokens which are present in \(s_2\), i.e., in the place ready to perform dec; hence, Fig. 1(a) represents a semi-counter holding 0; note also that the number of tokens which can be accumulated in \(s_2\) is unbounded. Indeed, the set of reachable markings for a BPP net can be countably infinite. In (b), a variant semi-counter is outlined, which holds number 2 (i.e., two tokens are ready to perform dec).    \(\square \)

Definition 5

(Interleaving Bisimulation). Let \(N = (S, A, T)\) be a BPP net. An interleaving bisimulation is a relation \(R\subseteq {\mathscr {M}}(S) \times {\mathscr {M}}(S)\) such that if \((m_1, m_2) \in R\) then

  • \(\forall t_1\) such that \(m_1[t_1\rangle m'_1\), \(\exists t_2\) such that \(m_2[t_2\rangle m'_2\) with \(l(t_1) = l(t_2)\) and \((m'_1, m'_2) \in R\),

  • \(\forall t_2\) such that \(m_2[t_2\rangle m'_2\), \(\exists t_1\) such that \(m_1[t_1\rangle m'_1\) with \(l(t_1) = l(t_2)\) and \((m'_1, m'_2) \in R\).

Two markings \(m_1\) and \(m_2\) are interleaving bisimilar, denoted by \(m_1 \sim _{int} m_2\), if there exists an interleaving bisimulation R such that \((m_1, m_2) \in R\).    \(\square \)

Interleaving bisimilarity \(\sim _{int}\), which is defined as the union of all the interleaving bisimulations, is the largest interleaving bisimulation and also an equivalence relation.

Remark 1

(Interleaving bisimulation between two nets). The definition above covers also the case of an interleaving bisimulation between two BPP nets, say, \(N_1 = (S_1, A, T_1)\) and \(N_2 = (S_2, A, T_2)\) with \(S_1 \cap S_2 = \emptyset \), because we may consider just one single BPP net \(N = (S_1 \cup S_2, A, T_1 \cup T_2)\): An interleaving bisimulation \(R \subseteq {\mathscr {M}}(S_1) \times {\mathscr {M}}(S_2)\) is also an interleaving bisimulation on \({\mathscr {M}}(S_1 \cup S_2) \times {\mathscr {M}}(S_1 \cup S_2)\). Similar considerations hold for all the bisimulation-like definitions we propose in the following.    \(\square \)

Remark 2

(Comparing two marked nets). The definition above of interleaving bisimulation is defined over an unmarked BPP net, i.e., a net without the specification of an initial marking \(m_0\). Of course, if one desires to compare two marked nets, then it is enough to find an interleaving bisimulation (over the union of the two nets, as discussed in the previous remark), containing the pair composed of the respective initial markings. This approach is followed for all the other bisimulation-like definitions we propose.    \(\square \)

Example 2

Continuing Example 1 about Fig. 1, it is easy to realize that relation \(R = \{(s_1 \oplus k \cdot s_2, s_3 \oplus k_1 \cdot s_5 \oplus k_2 \cdot s_6) \;\;\big |\;\;k = k_1 + k_2\) and \(k, k_1, k_2 \ge 0\} \cup \{(s_1 \oplus k \cdot s_2, s_4 \oplus k_1 \cdot s_5 \oplus k_2 \cdot s_6) \;\;\big |\;\;k = k_1 + k_2\) and \(k, k_1, k_2 \ge 0\} \) is an interleaving bisimulation.    \(\square \)

3 Causality-Based Semantics

We start with the most concrete equivalence definable over BPP nets: isomorphism equivalence.

Definition 6

(Isomorphism). Given two BPP nets \(N_1 = (S_1, A, T_1)\) and \(N_2 = (S_2, A, T_2)\), we say that \(N_1\) and \(N_2\) are isomorphic via f if there exists a type-preserving bijection \(f: S_1 \cup T_1 \rightarrow S_2 \cup T_2\) (i.e., a bijection such that \(f(S_1) = S_2\) and \(f(T_1) = T_2\)), satisfying the following condition:

$$\forall t \in T_1, \text { if } t = (^{\bullet }t, \ell , t^{\bullet }), \text { then } f(t) = (f(^{\bullet }t), \ell , f(t^{\bullet })),$$

where f is homomorphically extended to markings (i.e., f is applied element-wise to each component of the marking: \(f(\theta ) = \theta \) and \(f(m_1 \oplus m_2) = f(m_1) \oplus f(m_2)\).)

Two BPP net systems \(N_1( m_{1})\) and \(N_2(m_{2})\) are rooted isomorphic if the isomorphism f ensures, additionally, that \(f(m_{1}) = m_{2}\).    \(\square \)

In order to define our approach to causality-based semantics for BPP nets, we need some auxiliary definitions, adapting those in, e.g., [3, 9, 10].

Definition 7

(Acyclic net). A BPP net \(N = (S, A, T)\) is acyclic if there exists no sequence \(x_1 x_2 \ldots x_n\) such that \(n \ge 3\), \(x_i \in S \cup T\) for \(i = 1, \ldots , n\), \(x_1 = x_n\), \(x_1 \in S\) and \(x_i \,{\in }\, ^{\bullet }x_{i+1}\) for \(i = 1, \ldots , n-1\), i.e., the arcs of the net do not form any cycle.    \(\square \)

Definition 8

(Causal net). A BPP causal net is a marked BPP net \(\mathsf {N}(\mathsf {m}_0) = (\mathsf {S}, \mathsf {A}, \mathsf {T}, \mathsf {m}_0)\) satisfying the following conditions:

  1. 1.

    \(\mathsf {N}\) is acyclic;

  2. 2.

    \(\forall s \in \mathsf {S} \; \; | ^{\bullet }s | \le 1\, \wedge \, | s^{\bullet } | \le 1\) (i.e., the places are not branched);

  3. 3.

    \( \forall s \in \mathsf {S}\; \; \mathsf {m}_0(s) = {\left\{ \begin{array}{ll} 1 &{} \text{ if } \; ^{\bullet }s = \emptyset \\ 0 &{} \text{ otherwise; } \end{array}\right. }\)

  4. 4.

    \(\forall t \in \mathsf {T} \; \; t^{\bullet }(s) \le 1\) for all \(s \in \mathsf {S}\) (i.e., all the arcs have weight 1).

We denote by \(Min(\mathsf {N})\) the set \(\mathsf {m}_0\), and by \(Max(\mathsf {N})\) the set \(\{s \in \mathsf {S} \;\;\big |\;\;s^{\bullet } = \emptyset \}\).    \(\square \)

Note that a BPP causal net, being a BPP net, is finite; since it is acyclic, it represents a finite computation. Note also that any reachable marking of a BPP causal net is a set, i.e., this net is safe; in fact, the initial marking is a set and, assuming by induction that a reachable marking \(\mathsf {m}\) is a set and enables t, i.e., \(\mathsf {m}[t\rangle \mathsf {m}'\), then also \(\mathsf {m}' = (\mathsf {m} \,{\ominus }\, ^{\bullet }t) \oplus t^{\bullet }\) is a set, because the net is acyclic and because of the condition on the shape of the post-set of t (weights can only be 1).

Definition 9

(Partial orders of events from a causal net). From a BPP causal net \(\mathsf {N}(\mathsf {m}_0) = (\mathsf {S}, \mathsf {A}, \mathsf {T}, \mathsf {m}_0)\), we can extract the partial order of its events \(\mathsf {E}_{\mathsf {N}} = (\mathsf {T}, \preceq )\), where \(t_1 \preceq t_2\) iff there exists a sequence \(x_1 x_2 x_3 \ldots x_n\) such that \(n \ge 3\), \(x_i \in \mathsf {S} \cup \mathsf {T}\) for \(i = 1, \ldots , n\), \(t_1 = x_1, t_2 = x_n\), and \(x_i \,{\in }\, ^{\bullet }x_{i+1}\) for \(i = 1, \ldots , n-1\); in other words, \(t_1 \preceq t_2\) if there is a path from \(t_1\) to \(t_2\).

Two partial orders \((T_1, \preceq _1)\) and \((T_2, \preceq _2)\) are isomorphic if there is a label-preserving, order-preserving bijection \(g: T_1 \rightarrow T_2\), i.e., a bijection such that \(\mathsf {l}_1(t) = \mathsf {l}_2(g(t))\) and \(t \preceq _1 t'\) if and only if \(g(t) \preceq _2 g(t')\).

We also say that g is an event isomorphism between the causal nets \(\mathsf {N}_1\) and \(\mathsf {N}_2\) if it is an isomorphism between their associated partial orders of events \(\mathsf {E}_{\mathsf {N}_1}\) and \(\mathsf {E}_{\mathsf {N}_2}\).    \(\square \)

Remark 3

As the initial marking of a causal net is fixed by its shape (according to item 3 of Definition 8), in the following, in order to make the notation lighter, we often omit the indication of the initial marking, so that the causal net \(\mathsf {N}(\mathsf {m}_0)\) is denoted by \(\mathsf {N}\).    \(\square \)

Definition 10

(Moves of a causal net). Given two BPP causal nets \(\mathsf {N} = (\mathsf {S}, \mathsf {A}, \mathsf {T}, \mathsf {m}_0)\) and \(\mathsf {N}' = (\mathsf {S}', \mathsf {A}, \mathsf {T}', \mathsf {m}_0)\), we say that \(\mathsf {N}\) moves in one step to \(\mathsf {N}'\) through t, denoted by \(\mathsf {N} [t\rangle \mathsf {N}'\), if \(\; ^{\bullet }t \in Max(\mathsf {N})\), \(\mathsf {T}' = \mathsf {T} \cup \{t\}\) and \(\mathsf {S}' = \mathsf {S} \cup t^{\bullet }\); in other words, \(\mathsf {N}'\) extends \(\mathsf {N}\) by one event t.    \(\square \)

Definition 11

(Folding and Process). A folding from a BPP causal net \(\mathsf {N} = (\mathsf {S}, \mathsf {A}, \mathsf {T}, \mathsf {m}_0)\) into a BPP net system \(N(m_0) = (S, A, T, m_0)\) is a function \(\rho : \mathsf {S} \cup \mathsf {T} \rightarrow S \cup T\), which is type-preserving, i.e., such that \(\rho (\mathsf {S}) \subseteq S\) and \(\rho (\mathsf {T}) \subseteq T\), satisfying the following:

  • \(\mathsf {A} = A\) and \(\mathsf {l}(t) = l(\rho (t))\) for all \(t \in \mathsf {T}\);

  • \(\rho (\mathsf {m}_0) = m_0\), i.e., \(m_0(s) = | \rho ^{-1}(s) \cap \mathsf {m}_0 |\);

  • \(\forall t \in \mathsf {T}, \rho (^{\bullet }t)\, {=}\, ^{\bullet }\rho (t)\), i.e., \(\rho (^{\bullet }t)(s) = | \rho ^{-1}(s) \cap ^{\bullet }t |\) for all \(s \in S\);

  • \(\forall t \in \mathsf {T}, \, \rho (t^{\bullet }) = \rho (t)^{\bullet }\), i.e., \(\rho (t^{\bullet })(s) = | \rho ^{-1}(s) \cap t^{\bullet } |\) for all \(s \in S\).

A pair \((\mathsf {N}, \rho )\), where \(\mathsf {N}\) is a BPP causal net and \(\rho \) a folding from \(\mathsf {N}\) to a BPP net system \(N(m_0)\), is a process of \(N(m_0)\).    \(\square \)

Definition 12

(Isomorphic processes). Given a BPP net system \(N(m_0)\), two of its processes \((\mathsf {N}_1, \rho _1)\) and \((\mathsf {N}_2, \rho _2)\) are isomorphic via f if \(\mathsf {N}_1\) and \(\mathsf {N}_2\) are rooted isomorphic via bijection f (see Definition 6) and \(\rho _1 = \rho _2 \circ f\).    \(\square \)

Definition 13

(Moves of a process). Let \(N(m_0) = (S, A, T, m_0)\) be a BPP system and let \((\mathsf {N}_i, \rho _i)\), for \(i = 1, 2\), be two processes of \(N(m_0)\). We say that \((\mathsf {N}_1, \rho _1)\) moves in one step to \((\mathsf {N}_2, \rho _2)\) through t, denoted by \((\mathsf {N}_1, \rho _1) {{\,{\mathop {\longrightarrow }\limits ^{t}}\,}} (\mathsf {N}_2, \rho _2)\), if \(\mathsf {N}_1 [t\rangle \mathsf {N}_2\) and \(\rho _1 \subseteq \rho _2\).    \(\square \)

3.1 Causal-Net Bisimulation

We would like to define a bisimulation-based equivalence which is coarser than the branching-time semantics of isomorphism of (nondeterministic) occurrence nets (or unfoldings) [5, 7, 16] and finer than the linear-time semantics of isomorphism of causal nets [2, 17]. The proposed novel behavioral equivalence is the following causal-net bisimulation, inspired by [9].

Definition 14

(Causal-net bisimulation). Let \(N = (S, A, T)\) be a BPP net. A causal-net bisimulation is a relation R, composed of triples of the form \((\rho _1, \mathsf {N}, \rho _2)\), where, for \(i = 1, 2\), \((\mathsf {N}, \rho _i)\) is a process of \(N(m_{0_i})\) for some \(m_{0_i}\), such that if \((\rho _1, \mathsf {N}, \rho _2) \in R\) then

  1. i)

    \(\forall t_1\) such that \(\rho _1(Max(\mathsf {N}))[t_1\rangle m_1\), \(\exists t_2, m_2, t, \mathsf {N}', \rho _1', \rho _2'\) such that

    1. 1.

      \(\rho _2(Max(\mathsf {N}))[t_2\rangle m_2\),

    2. 2.

      \((\mathsf {N}, \rho _1) {{\,{\mathop {\longrightarrow }\limits ^{t}}\,}} (\mathsf {N}', \rho '_1)\), \(\rho '_1(t) = t_1\) and \( \rho '_1(Max(\mathsf {N}')) = m_1\),

    3. 3.

      \((\mathsf {N}, \rho _2) {{\,{\mathop {\longrightarrow }\limits ^{t}}\,}} (\mathsf {N}', \rho '_2)\), \(\rho '_2(t) = t_2\) and \( \rho '_2(Max(\mathsf {N}')) = m_2\); and finally,

    4. 4.

      \((\rho '_1, \mathsf {N}', \rho '_2) \in R\);

  2. ii)

    symmetrically, if \(\rho _2(Max(\mathsf {N}))\) moves first.

Two markings \(m_{1}\) and \(m_2\) of N are cn-bisimilar (or cn-bisimulation equivalent), denoted by \(m_{1} \sim _{cn} m_{2}\), if there exists a causal-net bisimulation R containing a triple \((\rho ^0_1, \mathsf {N}^0, \rho ^0_2)\), where \(\mathsf {N}^0\) contains no transitions and \(\rho ^0_i(Min( \mathsf {N}^0)) = \rho ^0_i(Max( \mathsf {N}^0)) = m_i\;\) for \(i = 1, 2\).    \(\square \)

Let us denote by \(\sim _R^{cn} = \big \{(m_1, m_2) \;\;\big |\;\;m_1 \hbox { is cn-bisimilar to } m_2 \hbox { thanks to }R\big \}\). Of course, cn-bisimilarity \(\sim _{cn}\) can be seen as \(\bigcup \big \{\sim _R^{cn} \;\;\big |\;\;R\) is a causal-net bisimulation \(\big \} = \; \sim _{\mathscr {R}}^{cn}\), where \(\mathscr {R} = \bigcup \big \{R \;\;\big |\;\;R \hbox { is a causal-net bisimulation}\big \}\) is the largest causal-net bisimulation by item 4 of the following proposition.

Fig. 2.
figure 2

Two cn-bisimilar BPP nets

Proposition 1

For each BPP net \(N = (S, A, T)\), the following hold:

  1. 1.

    the identity relation \({\mathscr {I}} = \{ (\rho , \mathsf {N}, \rho ) \;\;\big |\;\;\exists m \in {\mathscr {M}}(S){.} (\mathsf {N}, \rho )\) is a process of N(m)} is a causal-net bisimulation;

  2. 2.

    the inverse relation \(R^{-1} = \{ (\rho _2, \mathsf {N}, \rho _1) \;\;\big |\;\;(\rho _1, \mathsf {N}, \rho _2) \in R\}\) of a causal-net bisimulation R is a causal-net bisimulation;

  3. 3.

    the relational composition, up to net isomorphism, \(R_1 \circ R_2 = \{ (\rho _1, \mathsf {N}, \rho _3) \;\;\big |\;\;\exists \rho _2.\) \((\rho _1, \mathsf {N}, \rho _2) \in R_1 \wedge (\overline{\rho }_2, \overline{\mathsf {N}}, \overline{\rho }_3) \in R_2 \wedge (\mathsf {N}, \rho _2)\) and \((\overline{\mathsf {N}}, \overline{\rho }_2)\) are isomorphic processes via \(f \,\) \(\wedge \; \rho _3 = \overline{\rho }_3 \circ f \}\) of two causal-net bisimulations \(R_1\) and \(R_2\) is a causal-net bisimulation;

  4. 4.

    the union \(\bigcup _{i \in I} R_i\) of causal-net bisimulations \(R_i\) is a causal-net bisimulation.

Proof

Trivial for 1, 2 and 4. For case 3, assume that \((\rho _1, \mathsf {N}, \rho _3) \in R_1 \circ R_2\) and that \(\rho _1(Max(\mathsf {N}))[t_1\rangle m_1\). Since \(R_1\) is a causal-net bisimulation and \((\rho _1, \mathsf {N}, \rho _2) \in R_1\), we have that \(\exists t_2, m_2, t, \mathsf {N}', \rho _1', \rho _2'\) such that

  1. 1.

    \(\rho _2(Max(\mathsf {N}))[t_2\rangle m_2\),

  2. 2.

    \((\mathsf {N}, \rho _1) {{\,{\mathop {\longrightarrow }\limits ^{t}}\,}} (\mathsf {N}', \rho '_1)\), \(\rho '_1(t) = t_1\) and \( \rho '_1(Max(\mathsf {N}')) = m_1\),

  3. 3.

    \((\mathsf {N}, \rho _2) {{\,{\mathop {\longrightarrow }\limits ^{t}}\,}} (\mathsf {N}', \rho '_2)\), \(\rho '_2(t) = t_2\) and \( \rho '_2(Max(\mathsf {N}')) = m_2\); and finally,

  4. 4.

    \((\rho '_1, \mathsf {N}', \rho '_2) \in R_1\);

Since \((\mathsf {N}, \rho _2)\) and \((\overline{\mathsf {N}}, \overline{\rho }_2)\) are isomorphic via f, it follows that \(\rho _2(Max(\mathsf {N})) = \overline{\rho }_2(Max(\overline{\mathsf {N}}))\), so that the move \(\overline{\rho }_2(Max(\overline{\mathsf {N}})) [t_2\rangle m_2\) is derivable, too. As \((\overline{\rho }_2, \overline{\mathsf {N}}, \overline{\rho }_3) \in R_2\) and \(R_2\) is a causal-net bisimulation, for \(\overline{\rho }_2(Max(\overline{\mathsf {N}})) [t_2\rangle m_2\), \(\exists t_3, m_3, \overline{t}, \overline{\mathsf {N}}', \overline{\rho }_2', \overline{\rho }_3'\) such that

  1. 1.

    \(\overline{\rho }_3(Max(\overline{\mathsf {N}}))[t_3\rangle m_3\),

  2. 2.

    \((\overline{\mathsf {N}}, \overline{\rho }_2) {{\,{\mathop {\longrightarrow }\limits ^{\overline{t}}}\,}} (\overline{\mathsf {N}}', \overline{\rho }'_2)\), \(\overline{\rho }'_2(\overline{t}) = t_2\) and \( \overline{\rho }'_2(Max(\overline{\mathsf {N}}')) = m_2\),

  3. 3.

    \((\overline{\mathsf {N}}, \overline{\rho }_3) {{\,{\mathop {\longrightarrow }\limits ^{\overline{t}}}\,}} (\overline{\mathsf {N}}', \overline{\rho }'_3)\), \(\overline{\rho }'_3(\overline{t}) = t_3\) and \( \overline{\rho }'_3(Max(\overline{\mathsf {N}}')) = m_3\); and finally,

  4. 4.

    \((\overline{\rho }'_2, \overline{\mathsf {N}}', \overline{\rho }'_3) \in R_2\).

Note that \((\mathsf {N}', \rho '_2)\) and \((\overline{\mathsf {N}}', \overline{\rho }'_2)\) are isomorphic via \(f'\), where \(f'\) extends f in the obvious way (notably, by mapping transition t to \(\overline{t}\)). As \(\rho _3 = \overline{\rho }_3 \circ f\), it follows that \((\mathsf {N}, \rho _3)\) and \((\overline{\mathsf {N}}, \overline{\rho }_3)\) are isomorphic via f. Therefore, \(\rho _3(Max(\mathsf {N})) = \overline{\rho }_3(Max(\overline{\mathsf {N}}))\), so that the move \(\rho _3(Max(\mathsf {N})) [t_3\rangle m_3\) is derivable, too. Since \((\mathsf {N}, \rho _3)\) and \((\overline{\mathsf {N}}, \overline{\rho }_3)\) are isomorphic via f, transition \((\overline{\mathsf {N}}, \overline{\rho }_3) {{\,{\mathop {\longrightarrow }\limits ^{\overline{t}}}\,}} (\overline{\mathsf {N}}', \overline{\rho }'_3)\), can be matched by \((\mathsf {N}, \rho _3) {{\,{\mathop {\longrightarrow }\limits ^{t}}\,}} (\mathsf {N}', \rho '_3)\), where \(\rho '_3 = \overline{\rho }'_3 \circ f'\), so that \((\mathsf {N}', \rho '_3)\) and \((\overline{\mathsf {N}}', \overline{\rho }'_3)\) are isomorphic via \(f'\). Hence, if \((\rho _1, \mathsf {N}, \rho _3) \in R_1 \circ R_2\) and \(\rho _1(Max(\mathsf {N}))[t_1\rangle m_1\), then \(\exists t_3, m_3, t, \mathsf {N}', \rho _1', \rho _3'\) such that

  1. 1.

    \(\rho _3(Max(\mathsf {N}))[t_3\rangle m_3\),

  2. 2.

    \((\mathsf {N}, \rho _1) {{\,{\mathop {\longrightarrow }\limits ^{t}}\,}} (\mathsf {N}', \rho '_1)\), \(\rho '_1(t) = t_1\) and \( \rho '_1(Max(\mathsf {N}')) = m_1\),

  3. 3.

    \((\mathsf {N}, \rho _3) {{\,{\mathop {\longrightarrow }\limits ^{t}}\,}} (\mathsf {N}', \rho '_3)\), \(\rho '_3(t) = t_3\) and \( \rho '_3(Max(\mathsf {N}')) = m_3\); and finally,

  4. 4.

    \((\rho '_1, \mathsf {N}', \rho '_3) \in R_1 \circ R_2\).

The symmetric case when \((\mathsf {N}, \rho _3)\) moves first is analogous, hence omitted. Therefore, \(R_1 \circ R_2\) is a causal-net bisimulation, indeed.    \(\square \)

Proposition 2

For each BPP net \(N = (S, A, T)\), relation \(\sim _{cn} \; \subseteq \mathscr {M}(S) \times \mathscr {M}(S)\) is an equivalence relation.

Proof

Standard, by exploiting Proposition 1.    \(\square \)

Fig. 3.
figure 3

Some non-cn-bisimilar BPP nets

Example 3

Consider the nets in Fig. 1. Clearly the net in a) with initial marking \(s_1\) and the net in b) with initial marking \(s_3\) are not isomorphic; however, we can prove that they have isomorphic unfoldings [5, 7, 16]; moreover, \(s_1 \sim _{cn} s_3\), even if the required causal-net bisimulation contains infinitely many triples.    \(\square \)

Example 4

Consider the nets in Fig. 2. Of course, the initial markings \(s_1\) and \(s_2\) do not generate isomorphic unfoldings; however, \(s_1 \sim _{cn} s_2\).    \(\square \)

Example 5

Look at Fig. 3. Of course, \(s_1 \not \sim _{cn} s_3\), even if they generate the same causal nets. In fact, \(s_1 {{\,{\mathop {\longrightarrow }\limits ^{a}}\,}} s_2\) might be matched by \(s_3\) either with \(s_3 {{\,{\mathop {\longrightarrow }\limits ^{a}}\,}} s_4\) or with \(s_3 {{\,{\mathop {\longrightarrow }\limits ^{a}}\,}} s_5\), so that it is necessary that \(s_2 \sim _{cn} s_4\) or \(s_2 \sim _{cn} s_5\); but this is impossible, because only \(s_2\) can perform both b and c. Moreover, \(s_6 \not \sim _{cn} s_8\) as they generate different causal nets.    \(\square \)

3.2 (State-Sensitive) Fully-Concurrent Bisimulation

Behavioral equivalences for distributed systems, usually, observe only the events. Hence, causal-net bisimulation, which also observes the structure of the distributed state, may be considered too concrete an equivalence. We disagree with this view, as the structure of the distributed state is not less observable than the events this distributed system can perform. Among the equivalences not observing the state, the most prominent is fully-concurrent bisimulation (fc-bisimulation, for short) [3]. As we think that the definition in [3] is not very practical (as it assumes implicitly a universal quantification over the infinite set of all the possible extensions of the current process), we prefer to offer here an equivalent definition, by considering a universal quantification over the finite set of the net transitions only. We define also a novel, slightly stronger version, called state-sensitive fc-bisimulation equivalence, that we prove to coincide with cn-bisimilarity.

Definition 15

(Fully-concurrent bisimulation). Let \(N = (S, A, T)\) be a BPP net. An fc-bisimulation is a relation R, composed of triples of the form \(((\mathsf {N}_1, \rho _1), g,\) \((\mathsf {N}_2, \rho _2))\), where, for \(i = 1, 2\), \((\mathsf {N}_i, \rho _i)\) is a process of \(N(m_{0_i})\) for some \(m_{0_i}\) and g is an event isomorphism between \(\mathsf {N}_1\) and \(\mathsf {N}_2\), such that if \(((\mathsf {N}_1, \rho _1), g, (\mathsf {N}_2, \rho _2)) \in R\) then

  1. i)

    \(\forall t_1\) such that \(\rho _1(Max(\mathsf {N}_1))[t_1\rangle m_1\), \(\exists t_2, m_2, t_1', t_2', \mathsf {N}_1', \mathsf {N}_2', \rho _1', \rho _2', g'\) such that

    1. 1.

      \(\rho _2(Max(\mathsf {N}_2))[t_2\rangle m_2\);

    2. 2.

      \((\mathsf {N}_1, \rho _1) {{\,{\mathop {\longrightarrow }\limits ^{t_1'}}\,}} (\mathsf {N}_1', \rho '_1)\), \(\rho '_1(t_1') = t_1\) and \(\rho '_1(Max(\mathsf {N}_1')) = m_1\),

    3. 3.

      \((\mathsf {N}_2, \rho _2) {{\,{\mathop {\longrightarrow }\limits ^{t_2'}}\,}} (\mathsf {N}_2', \rho '_2)\), \(\rho '_2(t_2') = t_2\) and \( \rho '_2(Max(\mathsf {N}_2')) = m_2\);

    4. 4.

      \(g' = g \cup \{(t_1', t_2')\}\), and finally,

    5. 5.

      \(((\mathsf {N}'_1, \rho '_1), g', (\mathsf {N}_2', \rho '_2)) \in R\);

  2. ii)

    symmetrically, if \(\rho _2(Max(\mathsf {N}_2))\) moves first.

Two markings \(m_{1}\) and \(m_2\) of N are fc-bisimilar, denoted by \(m_{1} \sim _{fc} m_{2}\), if there exists an fc-bisimulation R containing a triple \(((\mathsf {N}^0_1, \rho ^0_1), g_0, (\mathsf {N}^0_2, \rho ^0_2))\), where \(\mathsf {N}^0_i\) contains no transitions, \(g_0\) is empty and \(\rho ^0_i(Min( \mathsf {N}^0_i)) = \rho ^0_i(Max( \mathsf {N}^0_i)) = m_i\;\) for \(i = 1, 2\).    \(\square \)

Let us denote by \(\sim _R^{fc} = \{(m_1, m_2) \;\;\big |\;\;m_1 \hbox { is fc-bisimilar to } m_2 \hbox { thanks to }R\}\). Of course, \(\sim _{fc} = \bigcup \{\sim _R^{fc} \;\;\big |\;\;R \hbox { is a fully-concurrent bisimulation}\} = \; \sim _{\mathscr {R}}^{fc}\), where relation

$$\mathscr {R} = \bigcup \{R \;\;\big |\;\;R \hbox { is a fully-concurrent bisimulation}\}$$

is the largest fully-concurrent bisimulation. Similarly to what done in Proposition 1, we can prove that (i) the identity relation \({\mathscr {I}} = \{ ((\mathsf {N}, \rho ), id, (\mathsf {N}, \rho )) \;\;\big |\;\;\exists m{.} (\mathsf {N}, \rho )\) is a process of N(m) and id is the identity event isomorphism on \(\mathsf {N}\}\) is an fc-bisimulation; that (ii) the inverse relation \(R^{-1}\) of an fc-bisimulation R is an fc-bisimulation; that (iii) the composition \(R_1 \circ R_2 = \{((\mathsf {N}_1, \rho _1), g, (\mathsf {N}_3, \rho _3)) \;\;\big |\;\;\exists \mathsf {N}_2, \rho _2, g_1, g_2. ((\mathsf {N}_1, \rho _1), g_1, (\mathsf {N}_2, \rho _2)) \in R_1 \; \wedge \; ((\overline{\mathsf {N}}_2, \overline{\rho }_2), g_2, (\overline{\mathsf {N}}_3, \overline{\rho }_3)) \in R_2 \; \wedge \; (\mathsf {N}_2, \rho _2)\) and \((\overline{\mathsf {N}}_2, \overline{\rho }_2)\) are isomorphic processes via \(f_2 \; \wedge \; (\mathsf {N}_3, \rho _3)\) and \((\overline{\mathsf {N}}_3, \overline{\rho }_3)\) are isomorphic processes via \(f_3\; \wedge \; g = f_3^{-1} \circ (g_2 \circ (f_2 \circ g_1)) \}\) of two fc-bisimulations \(R_1\) and \(R_2\) is an fc-bisimulation; and finally, that (iv) the union \(\bigcup _{i \in I} R_i\) of a family of fc-bisimulations \(R_i\) is an fc-bisimulation.

Proposition 3

For each BPP net \(N = (S, A, T)\), relation \(\sim _{fc} \; \subseteq \mathscr {M}(S) \times \mathscr {M}(S)\) is an equivalence relation.    \(\square \)

Example 6

In Example 5 about Fig. 3 we argued that \(s_6 \not \sim _{cn} s_8\); however, \(s_6 \sim _{fc} s_8\), because, even if they do not generate the same causal net, still they generate isomorphic partial orders of events. On the contrary, \(s_1 \not \sim _{fc} s_3\) because, even if they generate the same causal nets, the two markings have a different branching structure. Note that the deadlock place \(s_7\) and the empty marking \(\theta \) are fc-bisimilar.    \(\square \)

Definition 16

(State-sensitive fully-concurrent bisimulation). An fc-bisimulation R is state-sensitive if for each triple \(((\mathsf {N}_1, \rho _1), g, (\mathsf {N}_2, \rho _2)) \in R\), the maximal markings have equal size, i.e., \(|\rho _1(Max(\mathsf {N}_1))| = |\rho _2(Max(\mathsf {N}_2))|\). Two markings \(m_{1}\) and \(m_2\) of N are sfc-bisimilar, denoted by \(m_{1} \sim _{sfc} m_{2}\), if there exists a state-sensitive fc-bisimulation R containing a triple \(((\mathsf {N}^0_1, \rho ^0_1), g_0, (\mathsf {N}^0_2, \rho ^0_2))\), where \(\mathsf {N}^0_i\) contains no transitions, \(g_0\) is empty and \(\rho ^0_i(Min( \mathsf {N}^0_i)) = \rho ^0_i(Max( \mathsf {N}^0_i)) = m_i\;\) for \(i = 1, 2\).    \(\square \)

Of course, also the above definition is defined coinductively; as we can prove an analogous of Proposition 1, it follows that \(\sim _{sfc}\) is an equivalence relation, too.

Theorem 1

(cn-bisimilarity and sfc-bisimilarity coincide). For each BPP net \(N = (S, A, T)\), \(m_1 \sim _{cn} m_2\) if and only if \(m_1 \sim _{sfc} m_2\).

Proof

\(\Rightarrow \)). If \(m_1 \sim _{cn} m_2\), then there exists a causal-net bisimulation R such that it contains a triple \((\rho ^0_1, \mathsf {N}^0, \rho ^0_2)\), where \(\mathsf {N}^0\) contains no transitions and \(\rho ^0_i(Min( \mathsf {N}^0)) = \rho ^0_i(Max( \mathsf {N}^0)) = m_i\;\) for \(i = 1, 2\). Relation \(\mathscr {R} = \{((\mathsf {N}, \rho _1), id, (\mathsf {N}, \rho _2)) \;\;\big |\;\;(\rho _1, \mathsf {N}, \rho _2) \in R\}\), where id is the identity event isomorphism on \(\mathsf {N}\), is a state-sensitive fc-bisimulation. Since \(\mathscr {R}\) contains the triple \((( \mathsf {N}^0, \rho ^0_1), id, (\mathsf {N}^0, \rho ^0_2))\), it follows that \(m_1 \sim _{sfc} m_2\).

\(\Leftarrow \)) (Sketch). If \(m_1 \sim _{sfc} m_2\), then there exists a state-sensitive fc-bisimulation \(\mathscr {R}\) containing a triple \(((\mathsf {N}^0_1, \rho ^0_1), g_0, (\mathsf {N}^0_2, \rho ^0_2))\), where \(\mathsf {N}^0_i\) contains no transitions, \(g_0\) is empty and \(\rho ^0_i(Min( \mathsf {N}^0_i)) = \rho ^0_i(Max( \mathsf {N}^0_i)) = m_i\;\) for \(i = 1, 2\), with \(|m_1| = |m_2|\). Hence, \(\mathsf {N}^0_1\) and \(\mathsf {N}^0_2\) are isomorphic, where the isomorphism function \(f_0\) is a suitably chosen bijection from \(Min( \mathsf {N}^0_1)\) to \(Min( \mathsf {N}^0_2)\).Footnote 1

We build the candidate causal-net bisimulation R inductively, by first including the triple \((\rho ^0_1, \mathsf {N}^0_1, \rho ^0_2 \circ f_0)\); hence, if R is a causal-net bisimulation, then \(m_1 \sim _{cn} m_2\).

Since \(((\mathsf {N}^0_1, \rho ^0_1), g_0, (\mathsf {N}^0_2, \rho ^0_2)) \in \mathscr {R}\) and \(\mathscr {R}\) is a state-sensitive fully-concurrent bisimulation, if \(\rho ^0_1(\mathsf {N}^0_1)[t_1\rangle m'_1\), then \(\exists t_2, m_2', t_1', t_2', \mathsf {N}_1, \mathsf {N}_2, \rho _1, \rho _2, g\) such that

  1. 1.

    \(\rho ^0_2(Max(\mathsf {N}^0_2))[t_2\rangle m'_2\);

  2. 2.

    \((\mathsf {N}^0_1, \rho ^0_1) {{\,{\mathop {\longrightarrow }\limits ^{t_1'}}\,}} (\mathsf {N}_1, \rho _1)\), \(\rho _1(t_1') = t_1\) and \(\rho _1(Max(\mathsf {N}_1)) = m'_1\),

  3. 3.

    \((\mathsf {N}^0_2, \rho ^0_2) {{\,{\mathop {\longrightarrow }\limits ^{t_2'}}\,}} (\mathsf {N}_2, \rho _2)\), \(\rho _2(t_2') = t_2\) and \( \rho _2(Max(\mathsf {N}_2)) = m'_2\);

  4. 4.

    \(g = g_0 \cup \{(t_1', t_2')\}\), and finally,

  5. 5.

    \(((\mathsf {N}_1, \rho _1), g, (\mathsf {N}_2, \rho _2)) \in \mathscr {R}\), with \(|\rho _1(Max(\mathsf {N}_1))| = |\rho _2(Max(\mathsf {N}_2))|\).

It is necessary that the isomorphism \(f_0\) has been chosen in such a way that \(f_0(^{\bullet }t_1') \,{=}\, ^{\bullet }t_2'\). As \(|\rho ^0_1(Max(\mathsf {N}^0_1))| = |\rho ^0_2(Max(\mathsf {N}^0_2))|\) and \(|\rho _1(Max(\mathsf {N}_1))| = |\rho _2(Max(\mathsf {N}_2))|\), it is necessary that \(t_1\) and \(t_2\) have the same post-set size; hence, \(\mathsf {N}_1\) and \(\mathsf {N}_2\) are isomorphic and the bijection \(f_0\) can be extended to bijection f with the pair \(\{(t_1', t_2')\}\) and also with a suitably chosen bijection between the post-sets of these two transitions. Hence, we include into R also the triple \((\rho _1, \mathsf {N}_1, \rho _2 \circ f)\). Symmetrically, if \(\rho ^0_2(\mathsf {N}^0_2)\) moves first.

By iterating this procedure, we add (possibly unboundedly many) triples to R. It is an easy observation to realize that R is a causal-net bisimulation.    \(\square \)

Remark 4

For general P/T nets, \(\sim _{cn}\) is finer than \(\sim _{sfc}\). E.g., consider the nets \(N = (\{s_1, s_2, s_3, s_4\}, \{a\}, \{(s_1 \oplus s_2, a, s_3 \oplus s_4)\})\) and \(N' = (\{s_1', s_2', s_3'\}, \{a\}, \{(s_1', a, s_3')\})\). Of course, \(s_1 \oplus s_2 \sim _{sfc} s_1' \oplus s_2'\), but \(s_1 \oplus s_2 \not \sim _{cn} s_1' \oplus s_2'\).    \(\square \)

3.3 Deadlock-Free BPP Nets and Fully-Concurrent Bisimilarity

We first define a cleaning-up operation on a BPP net N, yielding a net d(N) where all the deadlock places of N are removed. Then, we show that two markings \(m_1\) and \(m_2\) of N are fc-bisimilar if and only if the markings \(d(m_1)\) and \(d(m_2)\), obtained by removing all the deadlock places in \(m_1\) and \(m_2\) respectively, are state-senstive fc-bisimilar in d(N).

Definition 17

(Deadlock-free BPP net). For each BPP net \(N = (S, A, T)\), we define its associated deadlock-free net d(N) as the tuple (d(S), Ad(T)) where

  • \(d(S) = S {\setminus } \{s \in S \;\;\big |\;\;s \nrightarrow \}\), where \(s \nrightarrow \) if and only if ;

  • \(d(T) = \{d(t) \;\;\big |\;\;t \in T\}\), where \(d(t) = (^{\bullet }t, l(t), d(t^{\bullet }))\) and \(d(m) \in \mathscr {M}(d(S))\) is the marking obtained from \(m \in \mathscr {M}(S)\) by removing all its deadlock places.

A BPP net \(N = (S, A, T)\) is deadlock-free if all of its places are not a deadlock, i.e., \(d(S) = S\) and so \(d(T) = T\).    \(\square \)

Formally, given a marking \(m \in \mathscr {M}(S)\), we define d(m) as the marking

$$d(m)(s) = {\left\{ \begin{array}{ll} m(s) &{} \text{ if } s \in d(S)\\ 0 &{} \text{ otherwise }. \end{array}\right. }$$

For instance, let us consider the FSM in Fig. 3(c). Then, \(d(2 \cdot s_6 \oplus 3 \cdot s_7) = 2 \cdot s_6\), or \(d(s_7) = \theta \). Of course, d(m) is a multiset on d(S).

Example 7

Let us consider the BPP net \(N = (S, A, T)\), where \(S = \{s_1, s_2\}\), \(A = \{a\}\) and \(T = \{t_1, t_2\}\), where \(t_1 = (s_1, a, s_2)\) and \(t_2 = (s_1, a, \theta )\). Then, its associated deadlock-free net is \(d(N) = (\{s_1\}, A, \{t_2\})\). Note that \(d(t_1) = t_2\) and \(d(t_2) = t_2\).    \(\square \)

Proposition 4

(Fc-bisimilarity and sfc-bisimilarity coincide on deadlock-free nets). For each deadlock-free BPP net \(N = (S, A, T)\), \(m_1 \sim _{fc} m_2\) if and only if \(m_1 \sim _{sfc} m_2\).

Proof

\(\Leftarrow )\). Of course, a state-sensitive fc- bisimulation is also an fc-bisimulation.

\(\Rightarrow )\). If there are no deadlock places, an fc-bisimulation must be state sensitive. In fact, if two related markings have a different size, then, since no place is a deadlock and the BPP net transitions have singleton pre-set, they would originate different partial orders of events.    \(\square \)

Proposition 5

Given a BPP net \(N = (S, A, T)\) and its associated deadlock-free net \(d(N) = (d(S), A, d(T))\), two markings \(m_1\) and \(m_2\) of N are fc-bisimilar if and only if \(d(m_1)\) and \(d(m_2)\) in d(N) are sfc-bisimilar.

Proof

\(\Rightarrow \)). If \(m_1 \sim _{fc} m_2\), then there exists an fc-bisimulation \(\mathscr {R}\) on N containing a triple \(((\mathsf {N}^0_1, \rho ^0_1), g_0, (\mathsf {N}^0_2, \rho ^0_2))\), where \(\mathsf {N}^0_i\) contains no transitions, \(g_0\) is empty and \(\rho ^0_i(Min( \mathsf {N}^0_i))\) \( = \rho ^0_i(Max( \mathsf {N}^0_i)) = m_i\;\) for \(i = 1, 2\).

Relation \(R = \{((d(\mathsf {N}_1), d(\rho _1)), \hat{g}, (d(\mathsf {N}_2), d(\rho _2))) \;\;\big |\;\;((\mathsf {N}_1, \rho _1), g, (\mathsf {N}_2, \rho _2)) \in \mathscr {R},\) such that \(d(\rho _i)\) is the restriction of \(\rho _i\) on the places of \(d(\mathsf {N}_i)\), for \(i = 1, 2\), and \(\hat{g}\) is such that \(g(t_1) = t_2\) iff \(\hat{g}(d(t_1)) = d(t_2)\}\) is an fc-bisimulation on d(N). By Proposition 4, R is actually a state-sensitive fully-concurrent bisimulation on d(N). Note that R contains the triple \(((d(\mathsf {N}^0_1), d(\rho ^0_1)), g_0, (d(\mathsf {N}^0_2), d(\rho ^0_2)))\) such that \(d(\rho ^0_i)(Min(d(\mathsf {N}^0_i))) = d(\rho ^0_i)(Max(d(\mathsf {N}^0_i))) = d(m_i)\;\) for \(i = 1, 2\), and so \(d(m_1) \sim _{sfc} d(m_2)\).

\(\Leftarrow \)). If \(d(m_1) \sim _{sfc} d(m_2)\), then there exists an sfc-bisimulation R on d(N) containing a triple \(((\overline{\mathsf {N}}^0_1, \overline{\rho }^0_1), g_0, (\overline{\mathsf {N}}^0_2, \overline{\rho }^0_2))\), where \(\overline{\mathsf {N}}^0_i\) contains no transitions, \(g_0\) is empty and \(\overline{\rho }^0_i(Min(\overline{\mathsf {N}}^0_i)) = \overline{\rho }^0_i(Max( \overline{\mathsf {N}}^0_i)) = d(m_i)\;\) for \(i = 1, 2\).

Relation \(\mathscr {R} = \{((\mathsf {N}_1, \rho _1), g, (\mathsf {N}_2, \rho _2)) \;\;\big |\;\;(\mathsf {N}_i, \rho _i)\) is a process of \(N(m_{0_i})\) for some \(m_{0_i}\), for \(i = 1, 2,\) \(((d(\mathsf {N}_1), d(\rho _1)), \hat{g}, (d(\mathsf {N}_2), d(\rho _2))) \in R,\) such that \(d(\rho _i)\) is the restriction of \(\rho _i\) on the places of \(d(\mathsf {N}_i)\), for \(i = 1, 2\), and g is such that \(g(t_1) = t_2\) iff \(\hat{g}(d(t_1)) = d(t_2)\}\) is an fc-bisimulation on N. Note that \(\mathscr {R}\) contains the triple \(((\mathsf {N}^0_1, \rho ^0_1), g_0, (\mathsf {N}^0_2, \rho ^0_2))\) such that, for \(i = 1, 2\), \(d(\mathsf {N}^0_i) = \overline{\mathsf {N}}^0_i\), \(d(\rho ^0_i) = \overline{\rho }^0_i\), \(\rho ^0_i(Min(\mathsf {N}^0_i)) = \rho ^0_i(Max(\mathsf {N}^0_i)) = m_i\;\) and so \(m_1 \sim _{fc} m_2\).    \(\square \)

4 Team Bisimulation Equivalence

In this section, we recall the main definitions and results about team bisimulation equivalence, outlined in [13]. We also include one novel, main result: causal-net bisimilarity coincides with team bisimilarity.

4.1 Additive Closure and Its Properties

Definition 18

(Additive closure). Given a BPP net \(N = (S, A, T)\) and a place relation \(R \subseteq S \times S\), we define a marking relation \(R^\oplus \, \subseteq \, {\mathscr {M}}(S) \times {\mathscr {M}}(S)\), called the additive closure of R, as the least relation induced by the following axiom and rule.

$$\begin{array}{lllllllllll} \begin{array}{c}\\ \hline (\theta , \theta ) \in R^\oplus \end{array} &{} \; \; \; &{} \; \; \; \begin{array}{c}(s_1, s_2) \in R \; \; \; (m_1, m_2) \in R^\oplus \\ \hline (s_1 \oplus m_1, s_2 \oplus m_2) \in R^\oplus \end{array} \\ \end{array}$$

   \(\square \)

Fig. 4.
figure 4

Two team bisimilar BPP nets

Note that, by definition, two markings are related by \(R^\oplus \) only if they have the same size; in fact, the axiom states that the empty marking is related to itself, while the rule, assuming by induction that \(m_1\) and \(m_2\) have the same size, ensures that \(s_1 \oplus m_1\) and \(s_2 \oplus m_2\) have the same size. An alternative way to define that two markings \(m_1\) and \(m_2\) are related by \(R^\oplus \) is to state that \(m_1\) can be represented as \(s_1 \oplus s_2 \oplus \ldots \oplus s_k\), \(m_2\) can be represented as \(s_1' \oplus s_2' \oplus \ldots \oplus s_k'\) and \((s_i, s_i') \in R\) for \(i = 1, \ldots , k\).

It is possible to prove that if R is an equivalence relation, then its additive closure \(R^\oplus \) is also an equivalence relation. Moreover, if \(R_1 \subseteq R_2\), then \(R_1^\oplus \subseteq R_2^\oplus \), i.e., the additive closure is monotonic.

4.2 Team Bisimulation on Places

Definition 19

(Team bisimulation). Let \(N = (S, A, T)\) be a BPP net. A team bisimulation is a place relation \(R\subseteq S\times S\) such that if \((s_1, s_2) \in R\) then for all \(\ell \in A\)

  • \(\forall m_1\) such that \(s_1{{\,{\mathop {\longrightarrow }\limits ^{\ell }}\,}}m_1\), \(\exists m_2\) such that \(s_2{{\,{\mathop {\longrightarrow }\limits ^{\ell }}\,}}m_2\) and \((m_1, m_2) \in R^\oplus \),

  • \(\forall m_2\) such that \(s_2{{\,{\mathop {\longrightarrow }\limits ^{\ell }}\,}}m_2\), \(\exists m_1\) such that \(s_1{{\,{\mathop {\longrightarrow }\limits ^{\ell }}\,}}m_1\) and \((m_1, m_2) \in R^\oplus \).

Two places s and \(s'\) are team bisimilar (or team bisimulation equivalent), denoted \(s \sim s'\), if there exists a team bisimulation R such that \((s, s') \in R\).    \(\square \)

Example 8

Continuing Example 1 about Fig. 1, it is easy to see that relation \(R = \{(s_1, s_3), (s_1, s_4), (s_2, s_5), (s_2, s_6)\}\) is a team bisimulation. In fact, \((s_1, s_3)\) is a team bisimulation pair because, to transition \(s_1 {{\,{\mathop {\longrightarrow }\limits ^{inc}}\,}} s_1 \oplus s_2\), \(s_3\) can respond with \(s_3 {{\,{\mathop {\longrightarrow }\limits ^{inc}}\,}} s_4 \oplus s_5\), and \((s_1 \oplus s_2, s_4 \oplus s_5) \in R^\oplus \); symmetrically, if \(s_3\) moves first. Also \((s_1, s_4)\) is a team bisimulation pair because, to transition \(s_1 {{\,{\mathop {\longrightarrow }\limits ^{inc}}\,}} s_1 \oplus s_2\), \(s_4\) can respond with \(s_4 {{\,{\mathop {\longrightarrow }\limits ^{inc}}\,}} s_3 \oplus s_6\), and \((s_1 \oplus s_2, s_3 \oplus s_6) \in R^\oplus \); symmetrically, if \(s_4\) moves first. Also \((s_2, s_5)\) is a team bisimulation pair: to transition \(s_2 {{\,{\mathop {\longrightarrow }\limits ^{dec}}\,}} \theta \), \(s_5\) responds with \(s_5 {{\,{\mathop {\longrightarrow }\limits ^{dec}}\,}} \theta \), and \((\theta , \theta ) \in R^\oplus \). Similarly for the pair \((s_2, s_6)\). Hence, relation R is a team bisimulation, indeed.

The team bisimulation R above is a very simple, finite relation, proving that \(s_1\) and \(s_3\) are team bisimulation equivalent. In Example 2, in order to show that \(s_1\) and \(s_3\) are interleaving bisimilar, we had to introduce a complex relation, with infinitely many pairs. In Example 3 we argued that \(s_1 \sim _{cn} s_3\), even if we did not provide any causal-net bisimulation (which would be composed of infinitely many triples).    \(\square \)

Example 9

Consider the nets in Fig. 2. Of course, \(s_1 \sim s_2\) because the finite relation \(R = \{(s_1, s_2),\) \( (s_1, s_3), (s_1, s_4)\}\) is a team bisimulation. Actually, all the places are pairwise team bisimilar. In Example 4 we argued that \(s_1 \sim _{cn} s_2\), but the justifying causal-net bisimulation would contain infinitely many triples.    \(\square \)

Example 10

Consider the nets in Fig. 4. It is easy to see that \(R = \{(s_1, s_4),\) \((s_2, s_5),\) \((s_2, s_6), (s_2, s_7), (s_3, s_8), (s_3, s_9)\}\) is a team bisimulation. This example shows that team bisimulation is compatible with duplication of behavior and fusion of places.    \(\square \)

It is not difficult to prove [13] that (i) the identity relation \({\mathscr {I}}_S = \{ (s, s) \;\;\big |\;\;s \in S \}\) is a team bisimulation; that (ii) the inverse relation \(R^{-1} = \{ (s', s) \;\;\big |\;\;(s, s') \in R\}\) of a team bisimulation R is a team bisimulation; that (iii) the relational composition \(R_1 \circ R_2 = \{ (s, s'') \;\;\big |\;\;\exists s'. (s, s') \in R_1 \wedge (s', s'') \in R_2 \}\) of two team bisimulations \(R_1\) and \(R_2\) is a team bisimulation; and, finally, that (iv) the union \(\bigcup _{i \in I} R_i\) of team bisimulations \(R_i\) is a team bisimulation. Remember that \(s \sim s'\) if there exists a team bisimulation containing the pair \((s, s')\). This means that \(\sim \) is the union of all team bisimulations, i.e.,

$$\begin{aligned} \sim \; = \bigcup \{ R \subseteq S \times S \;\;\big |\;\;R \; \hbox { is a team bisimulation} \}. \end{aligned}$$

Hence \(\sim \) is also a team bisimulation, the largest such relation. Moreover, by the property listed above, relation \(\sim \; \subseteq S \times S\) is an equivalence relation.

Remark 5

(Complexity 1). It is well-known that the optimal algorithm for computing bisimilarity over a finite-state LTS with n states and m transitions has \(O(m \cdot \text{ log } n)\) time complexity [19]; this very same partition refinement algorithm can be easily adapted also for team bisimilarity over BPP nets; it is enough to start from an initial partition composed of two blocks: S and \(\{\theta \}\), and to consider the little additional cost due to the fact that the reached markings are to be related by the additive closure of the current partition; this extra cost is related to the size of the post-set of the net transitions; if p is the size of the largest post-set of the net transitions, then the time complexity is \(O(m \cdot p^2 \cdot \text{ log } (n+1))\), where m is the number of the net transitions and n is the number of the net places.    \(\square \)

4.3 Team Bisimilarity over Markings

Starting from team bisimulation equivalence \(\sim \), which has been computed over the places of an unmarked BPP net N, we can lift it over the markings of N in a distributed way: \(m_1\) is team bisimulation equivalent to \(m_2\) if these two markings are related by the additive closure of \(\sim \), i.e., if \((m_1, m_2) \in \sim ^\oplus \), usually denoted by \(m_1 \sim ^\oplus m_2\).

Of course, if \(m_1 \sim ^\oplus m_2\), then \(|m_1| = |m_2|\). Moreover, for any BPP net \(N = (S, A, T)\), relation \(\sim ^\oplus \, \subseteq \, {\mathscr {M}}(S) \times {\mathscr {M}}(S)\) is an equivalence relation.

Remark 6

(Complexity 2). Once \(\sim \) has been computed once and for all for the given net (in \(O(m \cdot p^2 \cdot \text{ log } (n+1))\) time), the algorithm in [13] checks whether two markings \(m_1\) and \(m_2\) are team bisimulation equivalent in \(O(k^2)\) time, where k is the size of the markings. In fact, if \(\sim \) is implemented as an adjacency matrix, then the complexity of checking if two markings \(m_1\) and \(m_2\) (represented as an array of places with multiplicities) are related by \(\sim ^\oplus \) is \(O(k^2)\), because the problem is essentially that of finding for each element \(s_1\) of \(m_1\) a matching, \(\sim \)-related element \(s_2\) of \(m_2\). Moreover, if we want to check whether other two markings of the same net are team bisimilar, we can reuse the already computed \(\sim \) relation, so that the time complexity is again quadratic.    \(\square \)

Example 11

Continuing Example 8 about the semi-counters, the marking \(s_1 \oplus 2 \cdot s_2\) is team bisimilar to the following markings of the net in (b): \(s_3 \oplus 2 \cdot s_5\), or \(s_3 \oplus s_5 \oplus s_6\), or \(s_3 \oplus 2 \cdot s_6\), or \(s_4 \oplus 2 \cdot s_5\), or \(s_4 \oplus s_5 \oplus s_6\), or \(s_4 \oplus 2 \cdot s_6\).    \(\square \)

Of course, two markings \(m_1\) and \(m_2\) are not team bisimilar if there is no bijective, team-bisimilar-preserving mapping between them; this is the case when \(m_1\) and \(m_2\) have different size, or if the algorithm in [13] ends with b holding false, i.e., by singling out a place \(s'_i\) in (the residual of) \(m_1\) which has no matching team bisimilar place in (the residual of) \(m_2\).

The following theorem provides a characterization of team bisimulation equivalence \(\sim ^\oplus \) as a suitable bisimulation-like relation over markings. It is interesting to observe that this characterization gives a dynamic interpretation of team bisimulation equivalence, while Definition 18 gives a structural definition of team bisimulation equivalence \(\sim ^\oplus \) as the additive closure of \(\sim \). The proof is outlined in [13].

Theorem 2

Let \(N = (S, A, T)\) be a BPP net. Two markings \(m_1\) and \(m_2\) are team bisimulation equivalent, \(m_1 \sim ^\oplus m_2\), if and only if \(|m_1| = |m_2|\) and

  • \(\forall t_1\) such that \(m_1[t_1\rangle m'_1\), \(\exists t_2\) such that \(^{\bullet }t_1\, {\sim }\, ^{\bullet }t_2\), \(l(t_1) = l(t_2)\), \(t_1^{\bullet } \sim ^\oplus t_2^{\bullet }\), \(m_2[t_2\rangle m'_2\) and \(m_1' \sim ^\oplus m_2'\), and symmetrically,

  • \(\forall t_2\) such that \(m_2[t_2\rangle m'_2\), \(\exists t_1\) such that \(^{\bullet }t_1\,{\sim }\, ^{\bullet }t_2\), \(l(t_1) = l(t_2)\), \(t_1^{\bullet } \sim ^\oplus t_2^{\bullet }\), \(m_1[t_1\rangle m'_1\) and \(m_1' \sim ^\oplus m_2'\).

   \(\square \)

By the theorem above, it is clear that \(\sim ^\oplus \) is an interleaving bisimulation.

Corollary 1

(Team bisimilarity is finer than interleaving bisimilarity). Let \(N = (S, A, T)\) be a BPP net. If \(m_1 \sim ^\oplus m_2\), then \(m_1 \sim _{int} m_2\).    \(\square \)

4.4 Team Bisimilarity and Causal-Net Bisimilarity Coincide

Theorem 3

(Team bisimilarity implies cn-bisimilarity). Let \(N = (S, A, T)\) be a BPP net. If \(m_1 \sim ^\oplus m_2\), then \(m_1 \sim _{cn} m_2\).

Proof

Let \(R = \{(\rho _1, \mathsf {N}, \rho _2) \;\;\big |\;\;(\mathsf {N}, \rho _1)\) is a process of \(N(m_1)\) and \((\mathsf {N}, \rho _2)\) is a process of \(N(m_2)\) such that \(\rho _1(s) \sim \rho _2(s)\), for all \(s \in Max(\mathsf {N})\}\). We want to prove that R is a causal-net bisimulation. First, observe that, any triple of the form \((\rho ^0_1, \mathsf {N}^0, \rho ^0_2)\), where \(\mathsf {N}^0\) is a BPP causal net with no transitions, \(\rho ^0_i(Max( \mathsf {N}^0))\) \(= m_i\) and \(\rho ^0_1(s) \sim \rho ^0_2(s)\), for all \(s \in Max(\mathsf {N}^0)\), belongs to R and its existence is justified by the hypothesis \(m_1\sim ^\oplus m_2\). Note also that if the relation R is a causal-net bisimulation, then this triple ensures that \(m_1 \sim _{cn} m_2\). Now assume \((\rho _1, \mathsf {N}, \rho _2) \in R\). In order to be a causal-net bisimulation triple, it is necessary that

i):

\(\forall t_1\) such that \(\rho _1(Max(\mathsf {N}))[t_1\rangle m'_1\), \(\exists t_2, m_2', t, \mathsf {N}', \rho _1', \rho _2'\) such that

1.:

\(\rho _2(Max(\mathsf {N}))[t_2\rangle m'_2\),

2.:

\((\mathsf {N}, \rho _1) {{\,{\mathop {\longrightarrow }\limits ^{t}}\,}} (\mathsf {N}', \rho '_1)\), \(\rho '_1(t) = t_1\) and \( \rho '_1(Max(\mathsf {N}')) = m'_1\),

3.:

\((\mathsf {N}, \rho _2) {{\,{\mathop {\longrightarrow }\limits ^{t}}\,}} (\mathsf {N}', \rho '_2)\), \(\rho '_2(t) = t_2\) and \( \rho '_2(Max(\mathsf {N}')) = m'_2\); and finally,

4.:

\((\rho '_1, \mathsf {N}', \rho '_2) \in R\);

ii):

symmetrically, if \(\rho _2(Max(\mathsf {N}))\) moves first.

Let \(t_1\) be any transition such that \(\rho _1(Max(\mathsf {N}))[t_1\rangle m'_1\) and let \(s_1 \,{=}\, ^{\bullet }t_1\). Since by hypothesis we have that \(\rho _1(s) \sim \rho _2(s)\), for all \(s \in Max(\mathsf {N})\), if \(s_1 = \rho _1(s')\), then there exists \(s_2 = \rho _2(s')\) such that \(s_1 \sim s_2\). Hence, there exists \(t_2\) such that \(s_1 \,{=}\, ^{\bullet }t_1 \,{\sim }\, ^{\bullet }t_2 = s_2\), \(l(t_1) = l(t_2)\), \(t_1^{\bullet } \sim ^\oplus t_2^{\bullet }\), so that, by Theorem 2, \(\rho _2(Max(\mathsf {N}))[t_2\rangle m'_2\) and \(m_1' \sim ^\oplus m_2'\). Therefore, it is really possible to extend the causal net \(\mathsf {N}\) to the causal net \(\mathsf {N}'\) through a suitable transition t such that \(^{\bullet }t = s'\), as required above, and to extend \(\rho _1\) and \(\rho _2\) to \(\rho _1'\) and \(\rho _2'\), respectively, in such a way that \(\rho '_1(s) \sim \rho '_2(s)\), for all \(s \in t^{\bullet }\) because \(t_1^{\bullet } \sim ^\oplus t_2^{\bullet }\).

Summing up, for the move \(t_1\), we have that \((\rho '_1, \mathsf {N}', \rho '_2) \in R\) because \(\rho '_1(s) \sim \rho '_2(s)\), for all \(s \in Max(\mathsf {N}')\), as required. Symmetrically, if \(\rho _2(Max(\mathsf {N}))\) moves first.    \(\square \)

Theorem 4

(Cn-bisimilarity implies team bisimilarity). Let \(N = (S, A, T)\) be a BPP net. If \(m_1 \sim _{cn} m_2\) then \(m_1 \sim ^\oplus m_2\).

Proof

If \(m_1 \sim _{cn} m_2\), then there exists a causal-net bisimulation R containing a triple \((\rho ^0_1, \mathsf {N}^0, \rho ^0_2)\), where \(\mathsf {N}^0\) is a BPP causal net which has no transitions and \(\rho ^0_i(Max( \mathsf {N}^0))\) \(= m_i\;\) for \(i = 1, 2\).

Let us consider \(\mathscr {R} = \{(\rho _1(s), \rho _2(s)) \;\;\big |\;\;(\rho _1, \mathsf {N}, \rho _2) \in R \, \wedge \, s \in Max(\mathsf {N})\}\). If we prove that \(\mathscr {R}\) is a team bisimulation, then, since \((\rho ^0_1(s), \rho ^0_2(s)) \in \mathscr {R}\) for each \(s \in Max( \mathsf {N}^0)\), it follows that \((m_1, m_2) \in \mathscr {R}^\oplus \). As \(\mathscr {R} \subseteq \sim \), we also have that \(m_1 \sim ^\oplus m_2\).

Let us consider a pair \((s_1, s_2) \in \mathscr {R}\). Hence, there exist a triple \((\rho _1, \mathsf {N}, \rho _2) \in R\) and a place \(s \in Max(\mathsf {N})\) such that \(s_1 = \rho _1(s)\) and \(s_2 = \rho _2(s)\). If \(s_1\) moves, e.g., \(t_1 = s_1 {{\,{\mathop {\longrightarrow }\limits ^{\ell }}\,}} m'_1\), then \(\rho _1(Max(\mathsf {N}))[t_1\rangle \overline{m}_1\), where \(\overline{m}_1 = \rho _1(Max(\mathsf {N})) \ominus s_1 \oplus m_1'\). Since R is a causal-net bisimulation, \(\exists t_2, \overline{m}_2, t, \mathsf {N}', \rho _1', \rho _2'\) such that

  1. 1.

    \(\rho _2(Max(\mathsf {N}))[t_2\rangle \overline{m}_2\),

  2. 2.

    \((\mathsf {N}, \rho _1) {{\,{\mathop {\longrightarrow }\limits ^{t}}\,}} (\mathsf {N}', \rho '_1)\), \(\rho '_1(t) = t_1\) and \( \rho '_1(Max(\mathsf {N}')) = \overline{m}_1\),

  3. 3.

    \((\mathsf {N}, \rho _2) {{\,{\mathop {\longrightarrow }\limits ^{t}}\,}} (\mathsf {N}', \rho '_2)\), \(\rho '_2(t) = t_2\) and \( \rho '_2(Max(\mathsf {N}')) = \overline{m}_2\); and finally,

  4. 4.

    \((\rho '_1, \mathsf {N}', \rho '_2) \in R\);

Note that t is such that \(^{\bullet }t = s\), and so \(^{\bullet }t_2 = s_2\). This means that \(\overline{m}_2 = \rho _2(Max(\mathsf {N})) \ominus s_2 \oplus m_2'\), where \(m_2' = t_2^{\bullet }\); in other words, \(t_2 = s_2 {{\,{\mathop {\longrightarrow }\limits ^{\ell }}\,}} m_2'\). Note also that \( \rho '_1\) extends \( \rho _1\) by mapping t to \(t_1\) and, similarly, \( \rho '_2\) extends \( \rho _2\) by mapping t to \(t_2\); in this way, \(\rho '_1(t^{\bullet }) = t_1^{\bullet }\) and \(\rho '_2(t^{\bullet }) = t_2^{\bullet }\). Since \((\rho '_1, \mathsf {N}', \rho '_2) \in R\), it follows that the set \(\{(\rho '_1(s'), \rho '_2(s')) \;\;\big |\;\;\, s' \in t^{\bullet })\} \) is a subset of \( \mathscr {R}\), so that \((m_1', m_2') \in \mathscr {R}^\oplus \).

Summing up, for \((s_1, s_2) \in \mathscr {R}\), if \(s_1 {{\,{\mathop {\longrightarrow }\limits ^{\ell }}\,}} m'_1\), then \(s_2 {{\,{\mathop {\longrightarrow }\limits ^{\ell }}\,}} m'_2\) such that \((m_1', m_2') \in \mathscr {R}^\oplus \); symmetrically, if \(s_2\) moves first. Therefore, \(\mathscr {R}\) is a team bisimulation.    \(\square \)

Corollary 2

(Team bisimilarity and cn-bisimilarity coincide). Let \(N = (S, A, T)\) be a BPP net. Then, \(m_1 \sim _{cn} m_2\) if and only if \(m_1 \sim ^\oplus m_2\).

Proof

By Theorems 3 and 4, we get the thesis.    \(\square \)

Corollary 3

(Team bisimilarity and sfc-bisimilarity coincide). Let \(N = (S, A, T)\) be a BPP net. Then, \(m_1 \sim _{sfc} m_2\) if and only if \(m_1 \sim ^\oplus m_2\).

Proof

By Corollary 2 and Theorem 1, we get the thesis.    \(\square \)

Therefore, our characterization of cn-bisimilarity and sfc-bisimilarity, which are, in our opinion, the intuitively correct (strong) causal semantics for BPP nets, is quite appealing because it is based on the very simple technical definition of team bisimulation on the places of the unmarked net, and, moreover, offers a very efficient algorithm to check if two markings are cn-bisimilar (see Remarks 5 and 6).

5 H-Team Bisimulation

We provide the definition of h-bisimulation on places for unmarked BPP nets, adapting the definition of team bisimulation on places (cf. Definition 19). In this definition, the empty marking \(\theta \) is considered as an additional place, so that the relation is defined not on S, rather on \(S \cup \{\theta \}\); therefore, the symbols \(p_1\) and \(p_2\) that occur in the definition below can only denote either the empty marking \(\theta \) or a single place.

Definition 20

(H-team bisimulation). Let \(N = (S, A, T)\) be a BPP net. An h-team bisimulation is a place relation \(R\subseteq (S\cup \{\theta \}) \times (S \cup \{\theta \})\) such that if \((p_1, p_2) \in R\) then for all \(\ell \in A\)

  • \(\forall m_1\) such that \(p_1{{\,{\mathop {\longrightarrow }\limits ^{\ell }}\,}}m_1\), \(\exists m_2\) such that \(p_2{{\,{\mathop {\longrightarrow }\limits ^{\ell }}\,}}m_2\) and \((m_1, m_2) \in R^\oplus \),

  • \(\forall m_2\) such that \(p_2{{\,{\mathop {\longrightarrow }\limits ^{\ell }}\,}}m_2\), \(\exists m_1\) such that \(p_1{{\,{\mathop {\longrightarrow }\limits ^{\ell }}\,}}m_1\) and \((m_1, m_2) \in R^\oplus \).

\(p_1\) and \(p_2\) are h-team bisimilar (or h-team bisimulation equivalent), denoted \(p_1 \sim _h p_2\), if there exists an h-team bisimulation R such that \((p_1, p_2) \in R\).    \(\square \)

Since a team bisimulation is also an h-team bisimulation, we have that team bisimilarity \(\sim \) implies h-team bisimilarity \(\sim _h\). This implication is strict as illustrated in the following example.

Example 12

Consider the nets in Fig. 3. It is not difficult to realize that \(s_6\) and \(s_8\) are h-team bisimilar because \(R = \{(s_6, s_8), (s_7, \theta )\}\) is an h-team bisimulation. In fact, \(s_6\) can reach \(s_7\) by performing a, and \(s_8\) can reply by reaching the empty marking \(\theta \), and \((s_7, \theta ) \in R\). In Example 6 we argued that \(s_6 \sim _{fc} s_8\) and in fact we will prove that h-team bisimilarity coincide with fc-bisimilarity.    \(\square \)

Remark 7

(Additive closure properties). Note that the additive closure of an h-team bisimulation R does not ensure that if two markings are related by \(R^\oplus \), then they must have the same size. For instance, considering the above relation \(R = \{(s_6, s_8), (s_7, \theta )\}\), we have that, e.g., \(s_6 \oplus s_7 R^\oplus s_8\), because \(\theta \) is the identity for multiset union. However, the other properties of the additive closure described in Sect. 4.1 hold also for these more general place relations.    \(\square \)

It is not difficult to prove that, for any BPP net \(N = (S, A, T)\), the following hold:

  1. 1.

    The identity relation \({\mathscr {I}}_S = \{ (s, s) \;\;\big |\;\;s \in S \}\) is an h-team bisimulation;

  2. 2.

    the inverse relation \(R^{-1} = \{ (p', p) \;\;\big |\;\;(p, p') \in R\}\) of an h-team bisimulation R is an h-team bisimulation;

  3. 3.

    the relational composition \(R_1 \circ R_2 = \{ (p, p'') \;\;\big |\;\;\exists p'. (p, p') \in R_1 \wedge (p', p'') \in R_2 \}\) of two h-team bisimulations \(R_1\) and \(R_2\) is an h-team bisimulation;

  4. 4.

    the union \(\bigcup _{i \in I} R_i\) of h-team bisimulations \(R_i\) is an h-team bisimulation.

Relation \(\sim _h\) is the union of all h-team bisimulations, i.e.,

$$\begin{aligned} \sim _h \; = \bigcup \{ R \subseteq (S \cup \{\theta \}) \times (S \cup \{\theta \}) \;\;\big |\;\;R \; \hbox { is a h-team bisimulation} \}. \end{aligned}$$

Hence, \(\sim _h\) is also an h-team bisimulation, the largest such relation. Moreover, by the observations above, relation \(\sim _h \; \subseteq (S \cup \{\theta \}) \times (S \cup \{\theta \})\) is an equivalence relation.

Starting from h-team bisimulation equivalence \(\sim _h\), which has been computed over the places (and the empty marking) of an unmarked BPP net N, we can lift it over the markings of N in a distributed way: \(m_1\) is h-team bisimulation equivalent to \(m_2\) if these two markings are related by the additive closure of \(\sim _h\), i.e., if \((m_1, m_2) \in \sim _h^\oplus \), usually denoted by \(m_1 \sim _h^\oplus m_2\). Since \(\sim _h\) is an equivalence relation, then also relation \(\sim _h^\oplus \, \subseteq \, {\mathscr {M}}(S) \times {\mathscr {M}}(S)\) is an equivalence relation.

Remark 8

(Complexity 3). Computing \(\sim _h\) is not more difficult than computing \(\sim \). The partition refinement algorithm in [19] can be adapted also in this case. It is enough to consider the empty marking \(\theta \) as an additional, special place which is h-team bisimilar to each deadlock place. Hence, the initial partition considers two sets: one composed of all the deadlock places and \(\theta \), the other one with all the non-deadlock places. Therefore, the time complexity is also in this case \(O(m \cdot p^2 \cdot \text{ log } (n+1))\), where m is the number of the net transitions, n is the number of the net places and p the size of the largest post-set of the net transitions.

Once \(\sim _h\) has been computed once and for all for the given net, the complexity of checking whether two markings \(m_1\) and \(m_2\) are h-team bisimulation equivalent, according to the algorithm in [13], is \(O(k^2)\), where k is the size of the largest marking, since the problem is essentially that of finding for each element \(s_1\) (not \(\sim _h\)-related to \(\theta \)) of \(m_1\) a matching, \(\sim _h\)-related element \(s_2\) of \(m_2\) (and then checking that all the remaining elements of \(m_1\) and \(m_2\) are \(\sim _h\)-related to \(\theta \)).    \(\square \)

5.1 H-Team Bisimilarity and Fully-Concurrent Bisimilarity Coincide

In this section, we first show that h-team bisimilarity over a BPP net N coincides with team-bisimilarity over its associated deadlock-free net d(N). A consequence of this result is that h-team bisimilarity coincides with fc-bisimilarity on BPP nets.

Proposition 6

Given a BPP net \(N = (S, A, T)\) and its associated deadlock-free net \(d(N) = (d(S), A, d(T))\), two markings \(m_1\) and \(m_2\) of N are h-team bisimilar if and only if \(d(m_1)\) and \(d(m_2)\) in d(N) are team bisimilar.

Proof

\(\Rightarrow \)). If \(m_1 \sim _{h}^\oplus m_2\), then there exists an h-team bisimulation \(R_1\) on N such that \(m_1 R_1^\oplus m_2\). If we take relation \(R_2 = \{(s_1, s_2) \;\;\big |\;\;s_1, s_2 \in d(S) \, \wedge \, (s_1, s_2) \in R_1\}\), then it is easy to see that \(R_2\) is a team bisimulation on d(N), so that \(d(m_1) R_2^\oplus d(m_2)\), hence \(d(m_1) \sim ^\oplus d(m_2)\).

\(\Leftarrow \)). If \(d(m_1) \sim ^\oplus d(m_2)\), then there exists a team bisimulation \(R_2\) on d(N) such that \(d(m_1) R_2^\oplus d(m_2)\). Now, take relation \(R_1 = R_2 \cup (S' \cup \{\theta \}) \times (S' \cup \{\theta \})\), where the set \(S' \) is \( \{s \in S \;\;\big |\;\;s \nrightarrow \}\). It is easy to observe that \(R_1\) is an h-team bisimulation on N, so that \(m_1 R_1^\oplus m_2\), hence \(m_1 \sim _h^\oplus m_2\).    \(\square \)

Theorem 5

(Fully concurrent bisimilarity and h-team bisimilarity coincide). Given a BPP net \(N = (S, A, T)\), \(m_1 \sim _{fc} m_2\) if and only if \(m_1 \sim _h^\oplus m_2\).

Proof

By Proposition 5, \(m_1 \sim _{fc} m_2\) in N if and only if \(d(m_1) \sim _{sfc} d(m_2)\) in the associated deadlock-free net d(N). By Corollary 3, \(d(m_1) \sim _{sfc} d(m_2)\) iff \(d(m_1) \sim ^\oplus d(m_2)\) in d(N). By Proposition 6, \(d(m_1) \sim ^\oplus d(m_2)\) in d(N) if and only if \(m_1 \sim _{h}^\oplus m_2\) in N.    \(\square \)

6 Conclusion

Team bisimilarity is the most natural, intuitive and simple extension of LTS bisimilarity to BPP nets; it also has a very low complexity, actually lower than any other equivalence for BPP nets. Moreover, it coincides with causal-net bisimilarity and state-sensitive fully-concurrent bisimilarity, hence it corresponds to the intuitively correct bisimulation-based causal semantics for BPP nets. Moreover, it coincides also with structure-preserving bisimilarity, because our causal-net bisimilarity is rather similar to its process-oriented characterization in [9]. From a technical point of view, team bisimulation seems a sort of egg of Columbus: a simple (actually, a bit surprising in its simplicity) solution for a presumedly hard problem. This paper is not only an addition to [13], where team bisimilarity was originally introduced, but also an extension to a team-style characterization of fully-concurrent bisimilarity, namely h-team bisimilarity.

We think that state-sensitive fc-bisimilarity (hence, also team bisimilarity) is more accurate than fc-bisimilarity (hence, h-team bisimilarity) because it is resource-aware, i.e., it is sensitive to the number of resources that are present in the net. This more concrete equivalence is justified in, e.g., the area of information flow security [14].

Our complexity results for fc-bisimilarity in terms of the equivalent h-team bisimilarity (cf. Remark 8), seem comparable with those in [6], where, by using an event structure [20] semantics, Fröschle et al. show that history-preserving bisimilarity (hpb, for short) is decidable for the BPP process algebra with guarded summation in \(O(n^3 \cdot \text{ log } n)\) time, where n is the size of the involved BPP terms. However, this value n is strictly larger than the size of the corresponding BPP net. In fact, in [6] the size of a BPP term p is defined as “the total number of occurrences of symbols (including parentheses)”, where p is defined by means of a concrete syntax. E.g., \(p = (a.\text{0 }) \,|\,(a.\text{0 })\) has size 11, while the net semantics for p generates one place and one transition (and 2 tokens). For a comparison of team bisimilarity with other equivalences for BPP, we refer you to [13].

In [13] we presented a modal logic characterization of \(\sim ^\oplus \) and also a finite axiomatization for the process algebra BPP (with guarded sum and guarded recursion). As a future work, we plan to extend these results to \(\sim _h^\oplus \), hence equipping fc-bisimilarity (and hpb) with a logic characterization and an axiomatic one for the process algebra BPP.