1 Introduction

Reversibility started to receive attention in computing several decades ago [3, 15]. Landauer’s principle states that any irreversible manipulation of information, such as bit erasure or computation path merging, must be accompanied by a corresponding entropy increase. Therefore, any reversible computation, in which no information is lost, may be potentially carried out without releasing any heat. Nowadays, reversible computing has many applications ranging from biochemical reaction modeling and parallel discrete-event simulation to robotics, control theory, fault tolerant systems, and concurrent program debugging.

In a reversible system, we can observe two directions of computation: a forward one, coinciding with the normal way of computing, and a backward one, along which the effects of the forward one are undone when needed in a causally consistent way, i.e., by returning to a past consistent state. The latter task is not easy to accomplish in a concurrent system, because the undo procedure necessarily starts from the last performed action and this may not be unique. The usually adopted strategy is that an action can be undone provided that all of its consequences, if any, have been undone beforehand.

In the process algebra literature, two approaches have been developed to reverse a computation based on keeping track of past actions: the dynamic one of [7] and the static one of [24]. The former yields RCCS, a variant of CCS [20] that uses stack-based memories attached to processes to record all the actions executed by those processes. In contrast, the latter proposes a general method, of which CCSK is a result, to reverse calculi, relying on the idea of retaining within the process syntax all executed actions and dynamic operators.

In [24] forward-reverse bisimilarity is introduced too. Unlike standard bisimilarity [20, 22], it is truly concurrent as it does not satisfy the expansion law of parallel composition into a choice among all possible action sequencings. The interleaving view can be restored by employing back-and-forth bisimilarity [8]. This is defined on computation paths instead of states, thus preserving not only causality but also history as backward moves have to occur along the path followed when going forward even in the presence of concurrency.

In this paper, we investigate compositionality properties and equational characterizations of forward-reverse bisimilarity as well as of its two components, i.e., forward bisimilarity and reverse bisimilarity, so as to highlight their differences. To this purpose, we introduce a minimal calculus including only the terminated process \(\underline{0}\), the unary action prefix operator \(a \, . \, \_\) where a stands for an action, and the binary alternative composition operator \(\_ + \_\) also called choice. These operators are enough to compare the essential features of the three equivalences, in a neutral way with respect to interleaving view vs. true concurrency.

The paper is divided into two parts. In Section 2, we conduct our study on nondeterministic reversible processes, with the operational semantic rules defined in the style of [24] generating only forward transitions that are viewed as bidirectional, in lieu of a forward transition relation separated from a backward transition relation. In Section 3, we repeat our study on stochastic reversible processes, whose operational semantic rules in the style of [24] generate a single transition relation encompassing both forward transitions and backward transitions, by exploiting time reversibility [13] and lumpability [14] for Markov chains. In Section 4, we recap the differences between forward and reverse bisimilarities.

2 The Nondeterministic Case

In this section, we investigate forward bisimilarity, reverse bisimilarity, and forward-reverse bisimilarity over nondeterministic reversible processes. We start by introducing the syntax (Section 2.1) and the semantics (Section 2.2) for these processes through a minimal calculus, then we provide the definitions of the three equivalences (Section 2.3) and we study their congruence properties (Section 2.4) and equational characterizations (Section 2.5).

2.1 Syntax of Nondeterministic Reversible Processes

In the formalization of a process, we usually describe only its future behavior, hence the following syntax for sequential processes where \(a \in A\):

$$\begin{aligned}{P \, {::}\!= \, \underline{0}\mid a \, . \, P \mid P + P}\end{aligned}$$

However, in order to support the definition of the semantics in the style of [24], we need to enrich the syntax above with information about the past, i.e., the actions that have already been executed. Due to the absence of a parallel composition operator, unlike [24] there is no need to add communication keys to executed actions. It thus suffices to mark them with some symbol, which we choose to be \(\dag \). This yields the following syntax extended with information about the past:

$$\begin{aligned}{P \, {::}\!= \, \underline{0}\mid a \, . \, P \mid a^{\dag } . \, P \mid P + P}\end{aligned}$$

We can syntactically characterize several classes of processes generated by the grammar above through suitable predicates. Firstly, we have initial processes, i.e., processes in which all the actions are unexecuted:

$$\begin{aligned}{\begin{array}{rcl} \textit{initial}(\underline{0}) &{} &{} \\ \textit{initial}(a \, . \, P) &{} \, \Longleftarrow \, &{} \textit{initial}(P) \\ \textit{initial}(P_{1} + P_{2}) &{} \Longleftarrow &{} \textit{initial}(P_{1}) \wedge \textit{initial}(P_{2}) \\ \end{array}}\end{aligned}$$

Secondly, we have final processes, i.e., processes in which all the actions along a single path have been executed:

$$\begin{aligned}{\begin{array}{rcl} \textit{final}(\underline{0}) &{} &{} \\ \textit{final}(a^{\dag } . \, P) &{} \, \Longleftarrow \, &{} \textit{final}(P) \\ \textit{final}(P_{1} + P_{2}) &{} \Longleftarrow &{} (\textit{final}(P_{1}) \wedge \textit{initial}(P_{2})) \, \vee \\ &{} &{} (\textit{initial}(P_{1}) \wedge \textit{final}(P_{2})) \\ \end{array}}\end{aligned}$$

Multiple paths arise only in the presence of alternative compositions. At each occurrence of \(+\), only the subprocess chosen for execution advances, while the other one, although not selected, is kept as an initial subprocess within the overall process to support the definition of the semantics in the style of [24].

Thirdly, we have the processes that are reachable from an initial one, whose set we denote by \(\mathbb {P}\):

$$\begin{aligned}{\begin{array}{rcl} \textit{reachable}(\underline{0}) &{} &{} \\ \textit{reachable}(a \, . \, P) &{} \, \Longleftarrow \, &{} \textit{initial}(P) \\ \textit{reachable}(a^{\dag } . \, P) &{} \Longleftarrow &{} \textit{reachable}(P) \\ \textit{reachable}(P_{1} + P_{2}) &{} \Longleftarrow &{} (\textit{reachable}(P_{1}) \wedge \textit{initial}(P_{2})) \, \vee \\ &{} &{} (\textit{initial}(P_{1}) \wedge \textit{reachable}(P_{2})) \\ \end{array}}\end{aligned}$$

It is worth noting that:

  • \(\underline{0}\) is the only process that is both initial and final as well as reachable.

  • Any initial or final process is reachable too.

  • \(\mathbb {P}\) also contains processes that are neither initial nor final, like e.g. \(a^{\dag } . \, P\) with \(\textit{initial}(P)\) and \(P \ne \underline{0}\).

  • The relative positions of already executed actions and actions to be executed matter; in particular, an action of the former kind can never follow one of the latter kind. For instance, \(a^{\dag } . \, b \, . \, P \in \mathbb {P}\) if \(\textit{initial}(P)\) whereas \(b \, . \, a^{\dag } . \, P \notin \mathbb {P}\).

2.2 Semantics of Nondeterministic Reversible Processes

According to the approach of [24], dynamic operators such as action prefix and alternative composition have to be made static by the semantics, so as to retain within the syntax all the information needed to enable reversibility. For the sake of minimality, unlike [24] we do not generate two distinct transition relations – a forward one \( \, {\mathop {\longrightarrow }\limits ^{}}_{} \, \!\) and a backward one \( \, {\mathop {- \!\!\! \rightsquigarrow }\limits ^{}}_{} \, \!\) – but a single transition relation, which we implicitly regard as being symmetric like in [8] to enforce the loop property: any executed action can be undone and any undone action can be redone.

In our setting, a backward transition from \(P'\) to P (\(P' \, {\mathop {- \!\!\! \rightsquigarrow }\limits ^{a}}_{} \, P\)) is subsumed by the corresponding forward transition t from P to \(P'\) (\(P \, {\mathop {\longrightarrow }\limits ^{a}}_{} \, P'\)). As will become clear with the definition of behavioral equivalences in Section 2.3, like in [8] when going forward we view t as an outgoing transition of P, while when going backward we view t as an incoming transition of \(P'\). The semantic rules in Table 1 generate the labeled transition system \((\mathbb {P}, A, \! \, {\mathop {\longrightarrow }\limits ^{}}_{} \, \!)\) where \( \, {\mathop {\longrightarrow }\limits ^{}}_{} \, \! \subseteq \mathbb {P}\times A \times \mathbb {P}\).

Table 1. Operational semantic rules for nondeterministic reversible processes

The first rule for action prefix (Act\(_\textrm{f}\) where f stands for forward) applies only if P is initial and retains the executed action in the target process of the generated forward transition by decorating the action itself with \(\dag \). The second rule for action prefix (Act\(_\textrm{p}\) where p stands for propagation) propagates actions executed by inner initial subprocesses.

In both rules for alternative composition (Cho\(_\textrm{l}\) and Cho\(_\textrm{r}\) where l stands for left and r stands for right), the subprocess that has not been selected for execution is retained as an initial subprocess in the target process of the generated transition. When both subprocesses are initial, both rules for alternative composition are applicable, otherwise only one of them can be applied and in that case it is the non-initial subprocess that can move, because the other one has been discarded at the moment of the selection.

Any state corresponding to a process different from \(\underline{0}\) has at least one outgoing transition and exactly one incoming transition due to the decoration of executed actions. The labeled transition system underlying an initial process turns out to be a tree, whose branching points correspond to occurrences of \(+\).

Example 1

The labeled transition systems generated by the rules in Table 1 for the two initial processes \(a \, . \, \underline{0}+ a \, . \, \underline{0}\) and \(a \, . \, \underline{0}\) are depicted below:

figure a

As far as the one on the left is concerned, we observe that, in the case of a standard process calculus, a single a-transition from \(a \, . \, \underline{0}+ a \, . \, \underline{0}\) to \(\underline{0}\) would have been generated due to the absence of action decorations within processes.    \(\blacksquare \)

2.3 Bisimilarities for Nondeterministic Reversible Processes

The asymmetry between the relative positions of already executed actions and actions to be executed within reachable processes, as well as the asymmetry between the use of predicates \(\textit{initial}\) and \(\textit{final}\) in the operational semantic rules, determine a number of asymmetries between forward and reverse bisimilarity defined below that will become evident in Sections 2.4 and 2.5.

The difference between the definitions of forward bisimilarity and reverse bisimilarity is that the former considers only outgoing transitions [20, 22] whereas the latter considers only incoming transitions. We also address forward-reverse bisimilarity [24], which considers both outgoing transitions and incoming ones. All the equivalences are strong, i.e., they do not abstract from invisible actions.

Definition 1

We say that \(P_{1}, P_{2} \in \mathbb {P}\) are forward bisimilar, written \(P_{1} \sim _\textrm{FB} P_{2}\), iff \((P_{1}, P_{2}) \in \mathcal {B}\) for some forward bisimulation \(\mathcal {B}\). A symmetric relation \(\mathcal {B}\) over \(\mathbb {P}\) is a forward bisimulation iff for all \((P_{1}, P_{2}) \in \mathcal {B}\) and \(a \in A\):

  • Whenever \(P_{1} \, {\mathop {\longrightarrow }\limits ^{a}}_{} \, P'_{1}\), then \(P_{2} \, {\mathop {\longrightarrow }\limits ^{a}}_{} \, P'_{2}\) with \((P'_{1}, P'_{2}) \in \mathcal {B}\).    \(\blacksquare \)

Definition 2

We say that \(P_{1}, P_{2} \in \mathbb {P}\) are reverse bisimilar, written \(P_{1} \sim _\textrm{RB} P_{2}\), iff \((P_{1}, P_{2}) \in \mathcal {B}\) for some reverse bisimulation \(\mathcal {B}\). A symmetric relation \(\mathcal {B}\) over \(\mathbb {P}\) is a reverse bisimulation iff for all \((P_{1}, P_{2}) \in \mathcal {B}\) and \(a \in A\):

  • Whenever \(P'_{1} \, {\mathop {\longrightarrow }\limits ^{a}}_{} \, P_{1}\), then \(P'_{2} \, {\mathop {\longrightarrow }\limits ^{a}}_{} \, P_{2}\) with \((P'_{1}, P'_{2}) \in \mathcal {B}\).    \(\blacksquare \)

Definition 3

We say that \(P_{1}, P_{2} \in \mathbb {P}\) are forward-reverse bisimilar, written \(P_{1} \sim _\textrm{FRB} P_{2}\), iff \((P_{1}, P_{2}) \in \mathcal {B}\) for some forward-reverse bisimulation \(\mathcal {B}\). A symmetric relation \(\mathcal {B}\) over \(\mathbb {P}\) is a forward-reverse bisimulation iff for all \((P_{1}, P_{2}) \in \mathcal {B}\) and \(a \in A\):

  • Whenever \(P_{1} \, {\mathop {\longrightarrow }\limits ^{a}}_{} \, P'_{1}\), then \(P_{2} \, {\mathop {\longrightarrow }\limits ^{a}}_{} \, P'_{2}\) with \((P'_{1}, P'_{2}) \in \mathcal {B}\).

  • Whenever \(P'_{1} \, {\mathop {\longrightarrow }\limits ^{a}}_{} \, P_{1}\), then \(P'_{2} \, {\mathop {\longrightarrow }\limits ^{a}}_{} \, P_{2}\) with \((P'_{1}, P'_{2}) \in \mathcal {B}\).    \(\blacksquare \)

It holds that \(\sim _\textrm{FRB} \; \subsetneq \; \sim _\textrm{FB} \cap \sim _\textrm{RB}\). The inclusion is strict because for example the two final processes \(a^{\dag } . \, \underline{0}\) and \(a^{\dag } . \, \underline{0}+ c \, . \, \underline{0}\) are identified by \(\sim _\textrm{FB}\) and by \(\sim _\textrm{RB}\), but distinguished by \(\sim _\textrm{FRB}\) as in the latter process action c is enabled again after undoing a. Moreover, \(\sim _\textrm{FB}\) and \(\sim _\textrm{RB}\) are incomparable because for instance:

$$\begin{aligned}{\begin{array}{rcl} a^{\dag } . \, \underline{0}\sim _\textrm{FB} \underline{0}&{} \, \text {but} \, &{} a^{\dag } . \, \underline{0}\not \sim _\textrm{RB} \underline{0}\\ a \, . \, \underline{0}\sim _\textrm{RB} \underline{0}&{} \text {but} &{} a \, . \, \underline{0}\not \sim _\textrm{FB} \underline{0}\\ \end{array}}\end{aligned}$$

The first asymmetry is that \(\sim _\textrm{FRB} \; = \; \sim _\textrm{FB}\) over initial processes, with \(\sim _\textrm{RB}\) strictly coarser, whilst \(\sim _\textrm{FRB} \; \ne \; \sim _\textrm{RB}\) over final processes because, after going backward, previously discarded subprocesses come into play again in the forward direction.

Example 2

The two processes shown in Example 1 are identified by all the three equivalences. This is witnessed by any bisimulation that contains the pairs \((a \, . \, \underline{0}+ a \, . \, \underline{0}, a \, . \, \underline{0})\), \((a^{\dag } . \, \underline{0}+ a \, . \, \underline{0}, a^{\dag } . \, \underline{0})\), and \((a \, . \, \underline{0}+ a^{\dag } . \, \underline{0}, a^{\dag } . \, \underline{0})\).    \(\blacksquare \)

2.4 Congruence Properties

In principle, it makes sense that \(\sim _\textrm{FB}\) identifies processes with a different past and that \(\sim _\textrm{RB}\) identifies processes with a different future, in particular with \(\underline{0}\) that has neither past nor future. However, for \(\sim _\textrm{FB}\) this results in a compositionality violation with respect to alternative composition. As an example:

$$\begin{aligned}{\begin{array}{rcl} a^{\dag } . \, b \, . \, \underline{0}&{} \, \sim _\textrm{FB} \, &{} b \, . \, \underline{0}\\ a^{\dag } . \, b \, . \, \underline{0}+ c \, . \, \underline{0}&{} \not \sim _\textrm{FB} &{} b \, . \, \underline{0}+ c \, . \, \underline{0}\\ \end{array}}\end{aligned}$$

because in \(a^{\dag } . \, b \, . \, \underline{0}+ c \, . \, \underline{0}\) action c is disabled due to the presence of the already executed action \(a^{\dag }\), while in \(b \, . \, \underline{0}+ c \, . \, \underline{0}\) action c is enabled as there are no past actions preventing it from occurring. Note that a similar phenomenon does not happen with \(\sim _\textrm{RB}\) as \(a^{\dag } . \, b \, . \, \underline{0}\not \sim _\textrm{RB} b \, . \, \underline{0}\) due to the incoming a-transition of \(a^{\dag } . \, b \, . \, \underline{0}\), thus yielding the second asymmetry between forward and reverse bisimilarity.

This problem, which does not show up for \(\sim _\textrm{RB}\) and \(\sim _\textrm{FRB}\) because these two equivalences cannot identify an initial process with a non-initial one, leads to the following variant of \(\sim _\textrm{FB}\) that is sensitive to the presence of the past.

Definition 4

We say that \(P_{1}, P_{2} \in \mathbb {P}\) are past-sensitive forward bisimilar, written \(P_{1} \sim _\textrm{FB, ps} P_{2}\), iff \((P_{1}, P_{2}) \in \mathcal {B}\) for some past-sensitive forward bisimulation \(\mathcal {B}\). A symmetric relation \(\mathcal {B}\) over \(\mathbb {P}\) is a past-sensitive forward bisimulation iff for all \((P_{1}, P_{2}) \in \mathcal {B}\):

  • \(\textit{initial}(P_{1}) \Longleftrightarrow \textit{initial}(P_{2})\).

  • For all \(a \in A\), whenever \(P_{1} \, {\mathop {\longrightarrow }\limits ^{a}}_{} \, P'_{1}\), then \(P_{2} \, {\mathop {\longrightarrow }\limits ^{a}}_{} \, P'_{2}\) with \((P'_{1}, P'_{2}) \in \mathcal {B}\).    \(\blacksquare \)

Now \(\sim _\textrm{FB, ps}\) is sensitive to the presence of the past:

$$\begin{aligned}{a^{\dag } . \, b \, . \, \underline{0}\, \not \sim _\textrm{FB, ps} \, b \, . \, \underline{0}}\end{aligned}$$

but can still identify non-initial processes having a different past:

$$\begin{aligned}{a_{1}^{\dag } \, . \, P \, \sim _\textrm{FB, ps} \, a_{2}^{\dag } \, . \, P}\end{aligned}$$

It holds that \(\sim _\textrm{FRB} \; \subsetneq \; \sim _\textrm{FB, ps} \cap \sim _\textrm{RB}\), with \(\sim _\textrm{FRB} \, = \, \sim _\textrm{FB, ps}\) over initial processes as well as \(\sim _\textrm{FB, ps}\) and \(\sim _\textrm{RB}\) being incomparable because e.g. for \(a_{1} \ne a_{2}\):

$$\begin{aligned}{\begin{array}{rcl} a_{1}^{\dag } \, . \, P \sim _\textrm{FB, ps} a_{2}^{\dag } \, . \, P &{} \, \text {but} \, &{} a_{1}^{\dag } \, . \, P \not \sim _\textrm{RB} a_{2}^{\dag } \, . \, P \\ a_{1} \, . \, P \sim _\textrm{RB} a_{2} \, . \, P &{} \text {but} &{} a_{1} \, . \, P \not \sim _\textrm{FB, ps} a_{2} \, . \, P \\ \end{array}}\end{aligned}$$

We conclude by formalizing the congruence properties of all the considered equivalences. When present in the results below, side conditions just ensure that the overall processes are reachable.

Theorem 1

Let \(\sim _{} \, \in \{ \sim _\textrm{FB}, \sim _\textrm{FB, ps}, \sim _\textrm{RB}, \sim _\textrm{FRB} \}\), \(\sim _{}' \, \in \{ \sim _\textrm{FB, ps}, \sim _\textrm{RB}, \sim _\textrm{FRB} \}\), and \(P_{1}, P_{2} \in \mathbb {P}\):

  • If \(P_{1} \sim _{} P_{2}\) then for all \(a \in A\):

    • \(a \, . \, P_{1} \sim _{} a \, . \, P_{2}\) provided that \(\textit{initial}(P_{1}) \wedge \textit{initial}(P_{2})\).

    • \(a^{\dag } . \, P_{1} \sim _{} a^{\dag } . \, P_{2}\).

  • If \(P_{1} \sim _{}' P_{2}\) then for all \(P \in \mathbb {P}\):

    • \(P_{1} + P \sim _{}' P_{2} + P\) and \(P + P_{1} \sim _{}' P + P_{2}\) provided that \(\textit{initial}(P) \vee (\textit{initial}(P_{1}) \wedge \textit{initial}(P_{2}))\).

  • \(\sim _\textrm{FB, ps}\) is the coarsest congruence with respect to \(+\) contained in \(\sim _\textrm{FB}\).    \(\blacksquare \)

2.5 Equational Characterizations

We now investigate the equational characterizations of \(\sim _\textrm{FB, ps}\), \(\sim _\textrm{RB}\), and \(\sim _\textrm{FRB}\) so as to highlight the fundamental laws of these behavioral equivalences. In the following, by deduction system we mean a set comprising the following axioms and inference rules on \(\mathbb {P}\) – possibly enriched by a set of additional axioms \(\mathcal {A}\) – corresponding to the fact that \(\sim _\textrm{FB, ps}\), \(\sim _\textrm{RB}\), and \(\sim _\textrm{FRB}\) are equivalence relations as well as congruences with respect to action prefix and alternative composition:

  • Reflexivity, symmetry, transitivity: \(P = P\), , .

  • .-Substitutivity: , .

  • \(+\)-Substitutivity: .

Table 2. Axioms characterizing bisimilarity over nondeterministic reversible processes

It is well known that, in the case of bisimilarity over standard nondeterministic processes, alternative composition turns out to be associative and commutative and to admit \(\underline{0}\) as neutral element [11]. The same holds true for \(\sim _\textrm{FB, ps}\), \(\sim _\textrm{RB}\), and \(\sim _\textrm{FRB}\) because the two operational semantic rules for alternative composition are symmetric and \(\underline{0}\) has no outgoing or incoming transitions. This is formalized by axioms \(\mathcal {A}_{1}\) to \(\mathcal {A}_{3}\) in Table 2.

Then, we have axioms specific to \(\sim _\textrm{FB, ps}\). Axioms \(\mathcal {A}_{4}\) and \(\mathcal {A}_{5}\) together establish that the past can be neglected when moving only forward, but the presence of the past cannot be ignored. Axiom \(\mathcal {A}_{6}\) states that a previously non-selected alternative can be discarded after starting moving only forward.

Likewise, we have axioms specific to \(\sim _\textrm{RB}\). Axiom \(\mathcal {A}_{7}\) means that the future can be completely canceled when moving only backward. Axiom \(\mathcal {A}_{8}\) states that a previously non-selected alternative can be discarded when moving only backward. Since there are no constraints on P, axiom \(\mathcal {A}_{8}\) subsumes axiom \(\mathcal {A}_{3}\).

Finally, the idempotency of alternative composition in the case of bisimilarity over standard nondeterministic processes, i.e., \(P + P = P\) [11], changes depending on the considered equivalence:

  • For \(\sim _\textrm{FB, ps}\), idempotency is explicitly formalized by axiom \(\mathcal {A}_{9}\), which we note to be disjoint from axiom \(\mathcal {A}_{6}\) where P cannot be initial.

  • For \(\sim _\textrm{RB}\), an additional axiom is not needed as idempotency follows from axiom \(\mathcal {A}_{8}\) by taking Q equal to P. Thus, the third asymmetry between forward and reverse bisimilarity has to do with idempotency.

  • For \(\sim _\textrm{FRB}\), idempotency is formalized by axiom \(\mathcal {A}_{10}\), where function \(\textit{to}\_\textit{initial}\) brings a process back to its initial version by removing all action decorations:

    $$\begin{aligned}{\begin{array}{rcl} \textit{to}\_\textit{initial}(\underline{0}) &{} \, = \, &{} \underline{0}\\ \textit{to}\_\textit{initial}(a \, . \, P) &{} = &{} a \, . \, P \\ \textit{to}\_\textit{initial}(a^{\dag } . \, P) &{} = &{} a \, . \, \textit{to}\_\textit{initial}(P) \\ \textit{to}\_\textit{initial}(P_{1} + P_{2}) &{} = &{} \textit{to}\_\textit{initial}(P_{1}) + \textit{to}\_\textit{initial}(P_{2}) \\ \end{array}}\end{aligned}$$

    This axiom appeared for the first time in [16] and subsumes axioms \(\mathcal {A}_{9}\) and \(\mathcal {A}_{6}\) for \(\sim _\textrm{FB, ps}\) as well as axiom \(\mathcal {A}_{8}\) for \(\sim _\textrm{RB}\).

To prove the ground completeness of the equational characterizations of the three considered bisimilarities, as usual we introduce equivalence-specific normal forms to which every process is shown to be reducible, then we work with normal forms only. All the three normal forms rely on the fact that alternative composition is associative and commutative, hence the binary \(+\) can be generalized to the n-ary \(\sum _{i \in I}\) for a finite nonempty index set I. In the following, we denote by \(\vdash \) the deduction relation and we examine the sets of additional axioms below:

  • \(\mathcal {A}_\textrm{FB, ps} = \{ \mathcal {A}_{1}, \mathcal {A}_{2}, \mathcal {A}_{3}, \mathcal {A}_{4}, \mathcal {A}_{5}, \mathcal {A}_{6}, \mathcal {A}_{9} \}\).

  • \(\mathcal {A}_\textrm{RB} = \{ \mathcal {A}_{1}, \mathcal {A}_{2}, \mathcal {A}_{7}, \mathcal {A}_{8} \}\).

  • \(\mathcal {A}_\textrm{FRB} = \{ \mathcal {A}_{1}, \mathcal {A}_{2}, \mathcal {A}_{3}, \mathcal {A}_{10} \}\).

Definition 5

We say that \(P \in \mathbb {P}\) is in \(\sim _\textrm{FB, ps}\)-normal form, written \(\sim _\textrm{FB, ps}\)-nf, iff it is equal to one of the following:

  • \(\underline{0}\).

  • \(\sum _{i \in I} a_{i} \, . \, P_{i}\), where each \(P_{i}\) is initial and in \(\sim _\textrm{FB, ps}\)-nf.

  • \(a^{\dag } . \, P\), where P is initial and in \(\sim _\textrm{FB, ps}\)-nf.    \(\blacksquare \)

All initial processes without \(\underline{0}\) summands are in \(\sim _\textrm{FB, ps}\)-nf. We observe that, in the second case, \(a_{1} \, . \, P_{1} \sim _\textrm{FB, ps} a_{2} \, . \, P_{2}\) trivially implies \(a_{1} = a_{2}\) and \(P_{1} \sim _\textrm{FB, ps} P_{2}\). Likewise, in the third case, \(a_{1}^{\dag } \, . \, P_{1} \sim _\textrm{FB, ps} a_{2}^{\dag } \, . \, P_{2}\) trivially implies \(P_{1} \sim _\textrm{FB, ps} P_{2}\). These facts will be exploited in the proof of the forthcoming Theorem 2.

Lemma 1

For all \(P \in \mathbb {P}\) there is \(Q \in \mathbb {P}\) in \(\sim _\textrm{FB, ps}\)-nf such that \(\mathcal {A}_\textrm{FB, ps} \vdash P = Q\).    \(\blacksquare \)

Theorem 2

Let \(P_{1}, P_{2} \in \mathbb {P}\). Then \(P_{1} \sim _\textrm{FB, ps} P_{2}\) iff \(\mathcal {A}_\textrm{FB, ps} \vdash P_{1} = P_{2}\).    \(\blacksquare \)

Definition 6

We say that \(P \in \mathbb {P}\) is in \(\sim _\textrm{RB}\)-normal form, written \(\sim _\textrm{RB}\)-nf, iff it is equal to one of the following:

  • \(\underline{0}\).

  • \(a^{\dag } . \, P\), where P is in \(\sim _\textrm{RB}\)-nf.    \(\blacksquare \)

The normal form above boils down to a final process consisting of a possibly empty, finite sequence of already executed actions terminated by \(\underline{0}\). As a consequence, \(a^{\dag }_{1} \, . \, P_{1} \sim _\textrm{RB} a^{\dag }_{2} \, . \, P_{2}\) with \(P_{1}\) and \(P_{2}\) in \(\sim _\textrm{RB}\)-nf implies \(a_{1} = a_{2}\) and \(P_{1} \sim _\textrm{RB} P_{2}\), because \(a^{\dag }_{1} \, . \, P_{1}\) and \(a^{\dag }_{2} \, . \, P_{2}\) must feature the same sequence of already executed actions and the last executed action of \(P_{1}\) (resp. \(P_{2}\)), when the process is different from \(\underline{0}\), is the same as the last executed action of \(a^{\dag }_{1} \, . \, P_{1}\) (resp. \(a^{\dag }_{2} \, . \, P_{2}\)). This fact will be exploited in the proof of the forthcoming Theorem 3.

Lemma 2

For all \(P \in \mathbb {P}\) there is \(Q \in \mathbb {P}\) in \(\sim _\textrm{RB}\)-nf such that \(\mathcal {A}_\textrm{RB} \vdash P = Q\).    \(\blacksquare \)

Theorem 3

Let \(P_{1}, P_{2} \in \mathbb {P}\). Then \(P_{1} \sim _\textrm{RB} P_{2}\) iff \(\mathcal {A}_\textrm{RB} \vdash P_{1} = P_{2}\).    \(\blacksquare \)

Definition 7

We say that \(P \in \mathbb {P}\) is in \(\sim _\textrm{FRB}\)-normal form, written \(\sim _\textrm{FRB}\)-nf, iff it is equal to one of the following:

  • \(\underline{0}\).

  • \(\sum _{i \in I} a_{i} \, . \, P_{i}\), where each \(P_{i}\) is initial and in \(\sim _\textrm{FRB}\)-nf.

  • \(a^{\dag } . \, P\), where P is in \(\sim _\textrm{FRB}\)-nf.

  • \(a^{\dag } . \, P + \sum _{i \in I} a_{i} \, . \, P_{i}\), where P is in \(\sim _\textrm{FRB}\)-nf and each \(P_{i}\) is initial and in \(\sim _\textrm{FRB}\)-nf.    \(\blacksquare \)

As for the second case above, which is concerned with initial processes, we observe that \(a_{1} \, . \, P_{1} \sim _\textrm{FRB} a_{2} \, . \, P_{2}\) trivially implies \(a_{1} = a_{2}\) and \(P_{1} \sim _\textrm{FRB} P_{2}\). The last two cases together, which are concerned with non-initial processes, yield a process consisting of a finite sequence of already executed actions terminated by an initial process, such that every action in the sequence may have an initial process as an alternative. As a consequence, \(a^{\dag }_{1} \, . \, P_{1} + P'_{1} \sim _\textrm{FRB} a^{\dag }_{2} \, . \, P_{2} + P'_{2}\) with \(P_{1}\), \(P_{2}\), \(P'_{1}\), \(P'_{2}\) in \(\sim _\textrm{FRB}\)-nf, \(P'_{1}\) and \(P'_{2}\) initial, and \(P'_{1}\) and \(P'_{2}\) moving only when going back to \(\textit{to}\_\textit{initial}(a^{\dag }_{1} \, . \, P_{1})\) and \(\textit{to}\_\textit{initial}(a^{\dag }_{2} \, . \, P_{2})\), implies \(a_{1} = a_{2}\), \(P_{1} \sim _\textrm{FRB} P_{2}\), and \(P'_{1} \sim _\textrm{FRB} P'_{2}\). These facts will be exploited in the proof of the forthcoming Theorem 4.

Lemma 3

For all \(P \in \mathbb {P}\) there is \(Q \in \mathbb {P}\) in \(\sim _\textrm{FRB}\)-nf such that \(\mathcal {A}_\textrm{FRB} \vdash P = Q\).    \(\blacksquare \)

Theorem 4

Let \(P_{1}, P_{2} \in \mathbb {P}\). Then \(P_{1} \sim _\textrm{FRB} P_{2}\) iff \(\mathcal {A}_\textrm{FRB} \vdash P_{1} = P_{2}\).    \(\blacksquare \)

3 The Markovian Case

In this section, we repeat the investigation over Markovian reversible processes. We start by recalling the theory of continuous-time Markov chains (Section 3.1) including time reversibility (Section 3.2) and lumpability (Section 3.3), then we introduce syntax and semantics for these processes (Section 3.4), we provide the definitions of the three equivalences (Section 3.5), and we study their congruence properties and equational characterizations (Section 3.6).

3.1 Markov Chains: Definition, Representation, Terminology

A Markov chain is a discrete-state stochastic process characterized by the memoryless property [14]. More precisely, a stochastic process X(t), \(t \in \mathbb {R}_{\ge 0}\), over a discrete state space \(\mathcal {S}\) is a continuous-time Markov chain (CTMC) iff for all \(n \in \mathbb {N}\), time instants \(t_{0}< t_{1}< \dots< t_{n} < t_{n + 1} \in \mathbb {R}_{\ge 0}\), and states \(s_{0}, s_{1}, \dots , s_{n}, s_{n + 1} \in \mathcal {S}\) it holds that \(\Pr \{ X(t_{n + 1}) = s_{n + 1} \mid X(t_{i}) = s_{i}, 0 \le i \le n \} = \Pr \{ X(t_{n + 1}) = s_{n + 1} \mid X(t_{n}) = s_{n} \}\), i.e., the probability of moving from one state to another does not depend on the particular path that has been followed in the past to reach the current state, hence that path can be forgotten.

A CTMC is representable as a labeled transition system or as a state-indexed matrix. In the first case, each transition is labeled with some probabilistic information describing the evolution from the source state to the target state of the transition. In the second case, the same information is stored into an entry, indexed by those two states, of a matrix. The value of this probabilistic information is a function of the time at which the state change takes place.

For the sake of simplicity, we restrict ourselves to time-homogeneous CTMCs, in which conditional probabilities of the form \(\Pr \{ X(t + t') = s' \mid X(t) = s \}\) do not depend on t, so that the considered information is simply a positive real number given by \(\lim _{t' \rightarrow 0} \frac{\Pr \{ X(t + t') = s' \mid X(t) = s \}}{t'}\). This is called the rate at which the CTMC moves from state s to state \(s'\) and uniquely characterizes the exponentially distributed time taken by the considered move.

A CTMC is irreducible iff each of its states is reachable from every other state with probability greater than 0. A state \(s \in \mathcal {S}\) is recurrent iff the CTMC will eventually return to s with probability 1, in which case s is positive recurrent iff the expected number of steps until the CTMC returns to it is finite. A CTMC is ergodic iff it is irreducible and all of its states are positive recurrent; ergodicity coincides with irreducibility in the case that the CTMC has finitely many states.

Every time-homogeneous and ergodic CTMC X(t) is stationary, which means that \((X(t_{i} + t'))_{1 \le i \le n}\) has the same joint distribution as \((X(t_{i}))_{1 \le i \le n}\) for all \(n \in \mathbb {N}_{\ge 1}\) and \(t_{1}< \dots < t_{n}, t' \in \mathbb {R}_{\ge 0}\). In this case, X(t) has a unique steady-state probability distribution \(\boldsymbol{\pi }\) that for all \(s \in \mathcal {S}\) fulfills \(\pi (s) = \lim _{t \rightarrow \infty } \Pr \{ X(t) = s \mid X(0) = s' \}\) for any \(s' \in \mathcal {S}\). These probabilities can be computed by solving the linear system of global balance equations \(\boldsymbol{\pi } \cdot \textbf{Q} = \textbf{0}\) subject to \(\sum _{s \in \mathcal {S}} \pi (s) = 1\) and \(\pi (s) \in \mathbb {R}_{> 0}\) for all \(s \in \mathcal {S}\). The infinitesimal generator matrix \(\textbf{Q}\) contains for each pair of distinct states the rate of the corresponding move, which is 0 in the absence of a direct move between them, while \(q_{s, s} = - \sum _{s' \ne s} q_{s, s'}\) for all \(s \in \mathcal {S}\), i.e., every diagonal element contains the opposite of the total exit rate of the corresponding state, so that each row of \(\textbf{Q}\) sums up to 0.

3.2 Time Reversibility of Continuous-Time Markov Chains

Due to state space explosion and numerical stability problems [27], the calculation of the solution of the global balance equation system is not always feasible. However, it can be tackled in the case that the behavior of the considered CTMC remains the same when the direction of time is reversed. A CTMC X(t) is time reversible iff \((X(t_{i}))_{1 \le i \le n}\) has the same joint distribution as \((X(t' - t_{i}))_{1 \le i \le n}\) for all \(n \in \mathbb {N}_{\ge 1}\) and \(t_{1}< \dots < t_{n}, t' \in \mathbb {R}_{\ge 0}\). In this case, X(t) and its time-reversed version \(X^{\text {r}}(t) = X(t' - t)\) are stochastically identical, in particular they are stationary and share the same steady-state probability distribution \(\boldsymbol{\pi }\). In order for a stationary CTMC X(t) to be time reversible, it is necessary and sufficient that the partial balance equations \(\pi (s) \cdot q_{s, s'} = \pi (s') \cdot q_{s', s}\) are satisfied for all \(s, s' \in \mathcal {S}\) such that \(s \ne s'\) or, equivalently, that \(q_{s_{1}, s_{2}} \cdot \ldots \cdot q_{s_{n - 1}, s_{n}} \cdot q_{s_{n}, s_{1}} = q_{s_{1}, s_{n}} \cdot q_{s_{n}, s_{n - 1}} \cdot \ldots \cdot q_{s_{2}, s_{1}}\) for all \(n \in \mathbb {N}_{\ge 2}\) and distinct \(s_{1}, \dots , s_{n} \in \mathcal {S}\) [13].

The time-reversed version \(X^{\text {r}}(t)\) of a stationary CTMC X(t) can be defined even when X(t) is not reversible. As shown in [10, 13], this is accomplished by using the steady-state probability distribution \(\boldsymbol{\pi }\) of X(t), with \(X^{\text {r}}(t)\) turning out to be a CTMC too and having the same steady-state probability distribution \(\boldsymbol{\pi }\). More precisely, \(q_{s_{j}, s_{i}}^{\text {r}} = q_{s_{i}, s_{j}} \cdot \pi (s_{i}) / \pi (s_{j})\) for all \(s_{i} \ne s_{j}\), i.e., the rate from state \(s_{j}\) to state \(s_{i}\) in the time-reversed CTMC is proportional to the rate from state \(s_{i}\) to state \(s_{j}\) in the original CTMC, where the coefficient is given by the ratio of \(\pi (s_{i})\) to \(\pi (s_{j})\). Note that the time-reversed version of \(X^{\text {r}}(t)\) is X(t).

3.3 Lumpability of Continuous-Time Markov Chains

A different approach to the state space explosion problem consists of aggregating states and transitions in a suitable way. In particular, the focus is on exact aggregations, i.e., partitions of the state space such that the probability of being in any of the aggregated states is equal to the sum of the probabilities of the original states it contains. In the following, we consider a time-homogeneous CTMC X(t) with state space \(\mathcal {S}\) and infinitesimal generator matrix \(\textbf{Q}\); the formulas for the elements of the matrix of the resulting aggregations are taken from [2].

The first notion of exact aggregation that we address is strong lumpability [14]. It was later renamed ordinary lumpability in [5, 28], which we prefer to adopt so as not to generate confusion with the use of strong and weak for behavioral equivalences in concurrency theory.

Definition 8

The partition \(\mathcal {P}\) induced by an equivalence relation \(\mathcal {L}\) over \(\mathcal {S}\) is an ordinary lumping iff for all \((s_{1}, s_{2}) \in \mathcal {L}\) and \(C \in \mathcal {P}\) such that \(s_{1}, s_{2} \notin C\):

$$\begin{aligned}{\sum \nolimits _{s' \in C} q_{s_{1}, s'} \, = \, \sum \nolimits _{s' \in C} q_{s_{2}, s'}}\end{aligned}$$

The resulting CTMC with state space \(\mathcal {P}\) has infinitesimal generator matrix \(\mathbf {Q'}\) defined as follows for all \(C_{1}, C_{2} \in \mathcal {P}\) such that \(C_{1} \ne C_{2}\):

$$\begin{aligned}{q'_{C_{1}, C_{2}} \, = \, \sum \nolimits _{s' \in C_{2}} q_{s, s'}}\end{aligned}$$

where \(s \in C_{1}\).    \(\blacksquare \)

The second notion of exact aggregation is exact lumpability [5, 25, 28], which further enjoys the property that all the original states contained in the same aggregated state have the same probability. While ordinary lumpability considers the rates of outgoing transitions and does not check for rate equality within any class, exact lumpability considers the rates of incoming transitions and applies the rate equality check inside each class too.

Definition 9

The partition \(\mathcal {P}\) induced by an equivalence relation \(\mathcal {L}\) over \(\mathcal {S}\) is an exact lumping iff for all \((s_{1}, s_{2}) \in \mathcal {L}\) and \(C \in \mathcal {P}\):

$$\begin{aligned}{\sum \nolimits _{s' \in C} q_{s', s_{1}} \, = \, \sum \nolimits _{s' \in C} q_{s', s_{2}}}\end{aligned}$$

The resulting CTMC with state space \(\mathcal {P}\) has infinitesimal generator matrix \(\mathbf {Q'}\) defined as follows for all \(C_{1}, C_{2} \in \mathcal {P}\) such that \(C_{1} \ne C_{2}\):

$$\begin{aligned}{q'_{C_{1}, C_{2}} \, = \, \sum \nolimits _{s' \in C_{1}} q_{s', s} \cdot (|C_{2}| / |C_{1}|)}\end{aligned}$$

where \(s \in C_{2}\).    \(\blacksquare \)

The third notion of exact aggregation is strict lumpability [5], which is a combination of the previous two.

Definition 10

The partition \(\mathcal {P}\) induced by an equivalence relation \(\mathcal {L}\) over \(\mathcal {S}\) is a strict lumping iff it is both an ordinary lumping and an exact lumping.    \(\blacksquare \)

The relationships between lumpability and time reversibility for CTMCs have been investigated in [18, 19]:

  • An exact lumping of a CTMC corresponds to an ordinary lumping on the time-reversed CTMC.

  • An aggregation of a CTMC is a strict lumping iff it is a strict lumping for the time-reversed CTMC too.

  • An exact lumping of a CTMC is also an ordinary lumping whenever the CTMC is time reversible, while the vice versa does not hold in general.

Example 3

Consider the three time-reversible, ergodic CTMCs depicted below:

figure g

When solving the global balance equations for the first CTMC from the left, we obtain:

$$\begin{aligned}{\begin{array}{rcl} \pi (s_{0}) &{} \, = \, &{} \frac{\mu _{1} \cdot \mu _{2}}{\mu _{1} \cdot \mu _{2} + \lambda _{1} \cdot \mu _{2} + \lambda _{2} \cdot \mu _{1}} \\ \pi (s_{1}) &{} = &{} \frac{\lambda _{1} \cdot \mu _{2}}{\mu _{1} \cdot \mu _{2} + \lambda _{1} \cdot \mu _{2} + \lambda _{2} \cdot \mu _{1}} \\ \pi (s_{2}) &{} = &{} \frac{\lambda _{2} \cdot \mu _{1}}{\mu _{1} \cdot \mu _{2} + \lambda _{1} \cdot \mu _{2} + \lambda _{2} \cdot \mu _{1}} \\ \end{array}}\end{aligned}$$

If \(\lambda _{1} = \lambda _{2}\) but \(\mu _{1} \ne \mu _{2}\), then no exact aggregation exists for that CTMC.

If \(\mu _{1} = \mu _{2} \triangleq \mu \) but \(\lambda _{1} \ne \lambda _{2}\), then the second CTMC from the left is an ordinary lumping of the first one, where the aggregated state \(s'\) contains the two original states \(s_{1}\) and \(s_{2}\) and the solution of the global balance equations is the following:

$$\begin{aligned}{\begin{array}{rcccl} \pi (s'_{0}) &{} \, = \, &{} \frac{\mu }{\mu + \lambda _{1} + \lambda _{2}} &{} \, = \, &{} \pi (s_{0}) \\ \pi (s') &{} = &{} \frac{\lambda _{1} + \lambda _{2}}{\mu + \lambda _{1} + \lambda _{2}} &{} = &{} \pi (s_{1}) + \pi (s_{2}) \\ \end{array}}\end{aligned}$$

with \(\pi (s_{1}) \ne \pi (s_{2})\).

If \(\lambda _{1} = \lambda _{2} \triangleq \lambda \) and \(\mu _{1} = \mu _{2} \triangleq \mu \), then the third CTMC from the left is a strict – i.e., ordinary and exact – lumping of the first one, where the aggregated state \(s''\) contains the two original states \(s_{1}\) and \(s_{2}\) and the solution of the global balance equations is the following:

$$\begin{aligned}{\begin{array}{rcccl} \pi (s''_{0}) &{} \, = \, &{} \frac{\mu }{\mu + 2 \cdot \lambda } &{} \, = \, &{} \pi (s_{0}) \\ \pi (s'') &{} = &{} \frac{2 \cdot \lambda }{\mu + 2 \cdot \lambda } &{} = &{} \pi (s_{1}) + \pi (s_{2}) \\ \end{array}}\end{aligned}$$

with \(\pi (s_{1}) = \pi (s_{2})\).    \(\blacksquare \)

Example 4

The considered notions of lumpability are distinct from each other. On the one hand, in the previous example the second CTMC from the left is an ordinary lumping of the first one, but not an exact lumping as \(\pi (s_{1}) \ne \pi (s_{2})\) when \(\mu _{1} = \mu _{2}\) and \(\lambda _{1} \ne \lambda _{2}\). On the other hand, the CTMC on the right depicted below is an exact lumping of the CTMC on the left – where the aggregated state \(s'\) contains the two original states \(s_{1}\) and \(s_{2}\) – when \(\mu ' + \mu '' = \nu ' + \nu ''\) – corresponding to \(q_{s_{1}, s_{1}} + q_{s_{2}, s_{1}} = q_{s_{1}, s_{2}} + q_{s_{2}, s_{2}}\), i.e., \(-(\mu ' + \mu '') + 0 = 0 - (\nu ' + \nu '')\) – but it is not an ordinary lumping if \(\mu ' \ne \nu '\) and \(\mu '' \ne \nu ''\):

figure h

Note that the two CTMCs above are ergodic, but not time reversible.    \(\blacksquare \)

3.4 Syntax and Semantics of Markovian Reversible Processes

We have seen in Section 2 that a single forward transition relation is enough for nondeterministic processes in a reversible setting. This is due to the fact that \(P \, {\mathop {\longrightarrow }\limits ^{a}}_{} \, P'\) iff \(P' \, {\mathop {- \!\!\! \rightsquigarrow }\limits ^{a}}_{} \, P\), where according to [24] the backward transition relation \(\, {\mathop {- \!\!\! \rightsquigarrow }\limits ^{}}_{} \,\) should be used in the second clause of the definition of \(\sim _\textrm{FRB}\) and hence in the definition of \(\sim _\textrm{RB}\) as well.

A transition relation in a single direction is no longer sufficient in the case of Markovian reversible processes. The reason is that every transition of these processes is also labeled with its rate, a positive real number that uniquely identifies the exponentially distributed duration of the action associated with the transition. In general, the rate may be different depending on whether the transition goes forward or backward, without necessarily affecting time reversibility.

When moving from nondeterministic reversible processes to Markovian ones, in the syntax we thus need to replace a and \(a^{\dag }\) with \(<a, \lambda , \mu {>}\) and \(<a^{\dag }, \lambda , \mu {>}\) respectively, where \(\lambda \in \mathbb {R}_{> 0}\) is the rate of the forward a-transition whilst \(\mu \in \mathbb {R}_{> 0}\) is the rate of the backward a-transition. Predicates \(\textit{initial}\), \(\textit{final}\), and \(\textit{reachable}\) are extended accordingly and the set of reachable processes is denoted by \(\mathbb {P}_\textrm{M}\).

In order for the semantics to be consistent with the CTMC theory recalled in Sections 3.1 to 3.3, we cannot use a transition relation \(\, {\mathop {\longrightarrow }\limits ^{}}_{} \,\) with forward rates separated from a transition relation \(\, {\mathop {- \!\!\! \rightsquigarrow }\limits ^{}}_{} \,\) with backward rates, as would be the case if we applied the approach of [24]. For instance, the two Markovian processes depicted below would be identified by a Markovian variant of \(\sim _\textrm{FRB}\) relying on \(\, {\mathop {\longrightarrow }\limits ^{}}_{} \,\) and \(\, {\mathop {- \!\!\! \rightsquigarrow }\limits ^{}}_{} \, \!\), but the CTMC underlying the labeled transition system of the process on the right is not an exact lumping of the CTMC underlying the labeled transition system of the process on the left if \(\lambda _{1} \ne \lambda _{2}\), i.e., this Markovian variant of \(\sim _\textrm{FRB}\) would not induce strict lumping:

figure i
Table 3. Operational semantic rules for Markovian reversible processes

We thus keep using a single transition relation, which is \( \, {\mathop {\longrightarrow }\limits ^{}}_\textrm{M} \, \! \subseteq \mathbb {P}_\textrm{M} \times (A \times \mathbb {R}_{> 0}) \times \mathbb {P}_\textrm{M}\) defined in Table 3. Unlike the one in Section 2.2, it embodies both transitions with forward rates and transitions with backward rates. This has been accomplished not only by extending all the rules in Table 1 according to the new richer syntax, but also by adding a rule for action prefix (Act\(_\textrm{r}\) where r stands for reverse) that generates transitions with backward rates.

Any state corresponding to a process different from \(\underline{0}\) can now have several incoming transitions too. The labeled transition system underlying an initial process turns out to be a tree-like extension of a birth-death process [21, 23], with branching points corresponding to occurrences of \(+\). The reason is that between any pair of connected states there can only be a transition from the former state to the latter and a transition from the latter state back to the former, with the two transitions sharing the same name as they are generated by the same action \({<}a, \lambda , \mu {>}\). The underlying CTMC, obtained by removing actions from transitions, turns out to be not only ergodic, but also time reversible due to its tree-like birth-death structure [13]. The considered calculus thus combines causality-consistent reversibility with time reversibility like in [4].

Example 5

The labeled transition systems generated by the rules in Table 3 for the two Markovian processes \({<}a, \lambda , \mu {>} \, . \, \underline{0}+ {<} a, \lambda , \mu {>} \, . \, \underline{0}\) and \({<} a, \lambda , \mu {>} \, . \, \underline{0}\) are shown below:

figure j

The generation of a single a-transition from \({<} a, \lambda , \mu {>} \, . \, \underline{0}+ {<} a, \lambda , \mu {>} \, . \, \underline{0}\) on the left would have been wrong, as it would have not reflected the total exit rate \(2 \cdot \lambda \) of the source state. Several solutions to this problem have been proposed for Markovian process calculi without reversibility, while in our setting the problem is naturally prevented by action decorations within processes.    \(\blacksquare \)

3.5 Bisimilarities for Markovian Reversible Processes

We now define the Markovian variants of forward bisimilarity, reverse bisimilarity, and forward-reverse bisimilarity based on the CTMC theory recalled in Sections 3.1 to 3.3.

In the forward case, it is known that the (discrete-time) probabilistic bisimilarity of [17] and the (continuous-time) Markovian bisimilarity of [12] induce an ordinary lumping on the Markov chains underlying the considered processes, hence so does \(\sim _\textrm{MFB}\) below. Unlike Definition 8, in Definition 11 the rate equality check is applied inside each class too and hence not all ordinary lumpings can be induced by \(\sim _\textrm{MFB}\), in particular not the one identifying every pair of processes.

The reason is that while in Markov chain theory one is interested in state probabilities, in concurrency theory one experiments with processes by observing the labels of the transitions that are executed [1, 9, 17]. In particular, two processes with different total exit rates cannot be identified by \(\sim _\textrm{MFB}\) below, which is perfectly justifiable from an observational viewpoint. As an example, consider a state with a self-looping \(\lambda \)-transition and a state with a self-looping \(\mu \)-transition. The two states would be deemed ordinarily lumpable according to Definition 8, although the more \(\lambda \) and \(\mu \) are different, the easier it is for an observer to tell those two states apart.

In the following, \(\{ \! | \,\!\) and \( \, | \! \}\) denote multiset parentheses, while \(\mathbb {P}_\textrm{M} / \mathcal {B}\) is the set of equivalence classes induced by the equivalence relation \(\mathcal {B}\) over \(\mathbb {P}_\textrm{M}\).

Definition 11

We say that \(P_{1}, P_{2} \in \mathbb {P}_\textrm{M}\) are Markovian forward bisimilar, written \(P_{1} \sim _\textrm{MFB} P_{2}\), iff \((P_{1}, P_{2}) \in \mathcal {B}\) for some Markovian forward bisimulation \(\mathcal {B}\). An equivalence relation \(\mathcal {B}\) over \(\mathbb {P}_\textrm{M}\) is a Markovian forward bisimulation iff for all \((P_{1}, P_{2}) \in \mathcal {B}\), \(a \in A\), and \(C \in \mathbb {P}_\textrm{M} / \mathcal {B}\):

$$\begin{aligned}{\textit{rate}_\textrm{out}(P_{1}, a, C) \, = \, \textit{rate}_\textrm{out}(P_{2}, a, C)}\end{aligned}$$

where .    \(\blacksquare \)

In the reverse case, incoming transitions are considered instead of outgoing ones. As in [6, 26], in the definition of \(\sim _\textrm{MRB}\) below an additional condition about total exit rate equality is needed, which in Definition 9 is naturally handled through the diagonal elements of the infinitesimal generator matrix. It is easily seen that \(\sim _\textrm{MRB}\) induces an exact lumping on the Markov chains underlying the considered processes, but not all exact lumpings can be induced.

Definition 12

We say that \(P_{1}, P_{2} \in \mathbb {P}_\textrm{M}\) are Markovian reverse bisimilar, written \(P_{1} \sim _\textrm{MRB} P_{2}\), iff \((P_{1}, P_{2}) \in \mathcal {B}\) for some Markovian reverse bisimulation \(\mathcal {B}\). An equivalence relation \(\mathcal {B}\) over \(\mathbb {P}_\textrm{M}\) is a Markovian reverse bisimulation iff for all \((P_{1}, P_{2}) \in \mathcal {B}\) and \(a \in A\):

$$\begin{aligned}{\textit{rate}_\textrm{out}(P_{1}, a, \mathbb {P}_\textrm{M}) \, = \, \textit{rate}_\textrm{out}(P_{2}, a, \mathbb {P}_\textrm{M})}\end{aligned}$$

and for all \(C \in \mathbb {P}_\textrm{M} / \mathcal {B}\):

$$\begin{aligned}{\textit{rate}_\textrm{in}(P_{1}, a, C) \, = \, \textit{rate}_\textrm{in}(P_{2}, a, C)}\end{aligned}$$

where .    \(\blacksquare \)

In the forward-reverse case, \(\sim _\textrm{MFRB}\) below induces a strict lumping on the Markov chains underlying the considered processes.

Definition 13

We say that \(P_{1}, P_{2} \in \mathbb {P}_\textrm{M}\) are Markovian forward-reverse bisimilar, written \(P_{1} \sim _\textrm{MFRB} P_{2}\), iff \((P_{1}, P_{2}) \in \mathcal {B}\) for some Markovian forward-reverse bisimulation \(\mathcal {B}\). An equivalence relation \(\mathcal {B}\) over \(\mathbb {P}_\textrm{M}\) is a Markovian forward-reverse bisimulation iff for all \((P_{1}, P_{2}) \in \mathcal {B}\), \(a \in A\), and \(C \in \mathbb {P}_\textrm{M} / \mathcal {B}\):

$$\begin{aligned}{\begin{array}{rcl} \textit{rate}_\textrm{out}(P_{1}, a, C) &{} \, = \, &{} \textit{rate}_\textrm{out}(P_{2}, a, C) \\ \textit{rate}_\textrm{in}(P_{1}, a, C) &{} = &{} \textit{rate}_\textrm{in}(P_{2}, a, C) \\ \end{array}}\end{aligned}$$

   \(\blacksquare \)

It is worth noting that any aggregated state resulting from an ordinary lumping is \(\sim _\textrm{MFB}\)-equivalent to each of the original states it contains, while this is not necessarily the case for exact lumping and \(\sim _\textrm{MRB}\), where \(\sim _\textrm{MRB}\)-equivalence certainly holds only among the original states contained in an aggregated state. This is the fourth asymmetry between forward and reverse bisimilarity.

Example 6

The three CTMCs of Example 3 can be viewed as underlying the labeled transition systems of the following three initial processes:

$$\begin{aligned}{\begin{array}{ll} {<} a, \lambda _{1}, \mu _{1} {>} \, . \, \underline{0}+ {<} a, \lambda _{2}, \mu _{2} {>} \, . \, \underline{0}&{} \text { corresponding to } s_{0} \\ {<} a, \lambda _{1} + \lambda _{2}, \mu {>} \, . \, \underline{0}&{} \text { corresponding to } s'_{0} \\ {<} a, 2 \cdot \lambda , \mu {>} \, . \, \underline{0}&{} \text { corresponding to } s''_{0} \\ \end{array}}\end{aligned}$$

with:

$$\begin{aligned}{\begin{array}{ll} {<} a^{\dag }, \lambda _{1}, \mu _{1} {>} \, . \, \underline{0}+ {<} a, \lambda _{2}, \mu _{2} {>} \, . \, \underline{0}&{} \text { corresponding to } s_{1} \\ {<} a, \lambda _{1}, \mu _{1} {>} \, . \, \underline{0}+ {<} a^{\dag }, \lambda _{2}, \mu _{2} {>} \, . \, \underline{0}&{} \text { corresponding to } s_{2} \\ {<} a^{\dag }, \lambda _{1} + \lambda _{2}, \mu {>} \, . \, \underline{0}&{} \text { corresponding to } s' \\ {<} a^{\dag }, 2 \cdot \lambda , \mu {>} \, . \, \underline{0}&{} \text { corresponding to } s'' \\ \end{array}}\end{aligned}$$

If \(\mu _{1} = \mu _{2} \triangleq \mu \) but \(\lambda _{1} \ne \lambda _{2}\), then:

$$\begin{aligned}{\begin{array}{rcl} {<} a, \lambda _{1}, \mu {>} \, . \, \underline{0}+ {<} a, \lambda _{2}, \mu {>} \, . \, \underline{0}&{} \, \sim _\textrm{MFB} \, &{} {<} a, \lambda _{1} + \lambda _{2}, \mu {>} \, . \, \underline{0}\\ {<} a^{\dag }, \lambda _{1}, \mu {>} \, . \, \underline{0}+ {<} a, \lambda _{2}, \mu {>} \, . \, \underline{0}&{} \sim _\textrm{MFB} &{} {<} a^{\dag }, \lambda _{1} + \lambda _{2}, \mu {>} \, . \, \underline{0}\\ {<} a, \lambda _{1}, \mu {>} \, . \, \underline{0}+ {<} a^{\dag }, \lambda _{2}, \mu {>} \, . \, \underline{0}&{} \sim _\textrm{MFB} &{} {<} a^{\dag }, \lambda _{1} + \lambda _{2}, \mu {>} \, . \, \underline{0}\\ \end{array}}\end{aligned}$$

If \(\lambda _{1} = \lambda _{2} \triangleq \lambda \) and \(\mu _{1} = \mu _{2} \triangleq \mu \), then:

$$\begin{aligned}{\begin{array}{rcl} {<} a, \lambda , \mu {>} \, . \, \underline{0}+ {<} a, \lambda , \mu {>} \, . \, \underline{0}&{} \, \sim _\textrm{MFB} \, &{} {<} a, 2 \cdot \lambda , \mu {>} \, . \, \underline{0}\\ {<} a^{\dag }, \lambda , \mu {>} \, . \, \underline{0}+ {<} a, \lambda , \mu {>} \, . \, \underline{0}&{} \sim _\textrm{MFB} &{} {<} a^{\dag }, 2 \cdot \lambda , \mu {>} \, . \, \underline{0}\\ {<} a, \lambda , \mu {>} \, . \, \underline{0}+ {<} a^{\dag }, \lambda , \mu {>} \, . \, \underline{0}&{} \sim _\textrm{MFB} &{} {<} a^{\dag }, 2 \cdot \lambda , \mu {>} \, . \, \underline{0}\\ \end{array}}\end{aligned}$$

but:

$$\begin{aligned}{\begin{array}{rcl} {<} a, \lambda , \mu {>} \, . \, \underline{0}+ {<} a, \lambda , \mu {>} \, . \, \underline{0}&{} \, \not \sim _\textrm{MRB} \, &{} {<} a, 2 \cdot \lambda , \mu {>} \, . \, \underline{0}\\ {<} a^{\dag }, \lambda , \mu {>} \, . \, \underline{0}+ {<} a, \lambda , \mu {>} \, . \, \underline{0}&{} \not \sim _\textrm{MRB} &{} {<} a^{\dag }, 2 \cdot \lambda , \mu {>} \, . \, \underline{0}\\ {<} a, \lambda , \mu {>} \, . \, \underline{0}+ {<} a^{\dag }, \lambda , \mu {>} \, . \, \underline{0}&{} \not \sim _\textrm{MRB} &{} {<} a^{\dag }, 2 \cdot \lambda , \mu {>} \, . \, \underline{0}\\ \end{array}}\end{aligned}$$

with the only exception of the following two contained in the same aggregate:

$$\begin{aligned}{{<} a^{\dag }, \lambda , \mu {>} \, . \, \underline{0}+ {<} a, \lambda , \mu {>} \, . \, \underline{0}\, \sim _\textrm{MRB} \, {<} a, \lambda , \mu {>} \, . \, \underline{0}+ {<} a^{\dag }, \lambda , \mu {>} \, . \, \underline{0}}\end{aligned}$$

   \(\blacksquare \)

Unlike \(\sim _\textrm{FB}\), it holds that \(\sim _\textrm{MFB}\) is sensitive to the presence of the past, so that in Definition 11 it is not necessary to require \(\textit{initial}(P_{1}) \Longleftrightarrow \textit{initial}(P_{2})\) to gain compositionality with respect to alternative composition. For example:

$$\begin{aligned}{{<} a^{\dag }, \lambda , \mu {>} \, . \, {<} b, \delta , \gamma {>} \, . \, \underline{0}\, \not \sim _\textrm{MFB} \, {<} b, \delta , \gamma {>} \, . \, \underline{0}}\end{aligned}$$

because the process on the left has an outgoing a-transition with rate \(\mu \) that cannot be matched by the process on the right.

Furthermore, unlike \(\sim _\textrm{FB, ps}\), it holds that \(\sim _\textrm{MFB}\) cannot identify processes with a different past. For instance:

$$\begin{aligned}{{<} a^{\dag }, \lambda , \mu {>} \, . \, \underline{0}\, \not \sim _\textrm{MFB} \, {<} b^{\dag }, \delta , \gamma {>} \, . \, \underline{0}}\end{aligned}$$

whenever \(a \ne b\) or \(\mu \ne \gamma \), as in that case the outgoing a-transition on the left cannot be matched by the outgoing b-transition on the right.

Similarly, unlike \(\sim _\textrm{RB}\), we have that \(\sim _\textrm{MRB}\) is sensitive to the presence of the future and cannot identify processes with a different future. As an example:

$$\begin{aligned}{{<} a, \lambda , \mu {>} \, . \, \underline{0}\, \not \sim _\textrm{MRB} \, \underline{0}}\end{aligned}$$

because the process on the left has an incoming a-transition with rate \(\mu \) that cannot be matched by the process on the right. As another example:

$$\begin{aligned}{{<} a, \lambda , \mu {>} \, . \, \underline{0}\, \not \sim _\textrm{MRB} \, {<} b, \delta , \gamma {>} \, . \, \underline{0}}\end{aligned}$$

whenever \(a \ne b\) or \(\mu \ne \gamma \), as in that case the incoming a-transition on the left cannot be matched by the incoming b-transition on the right.

We conclude by showing that \(\sim _\textrm{MFRB}\) coincides with \(\sim _\textrm{MRB}\) (whilst \(\sim _\textrm{MFB}\) is strictly coarser) thus extending the first asymmetry between forward and reverse bisimilarities (see page 5). This result stems from the definition of the operational semantics and the consequent time reversibility of the underlying CTMCs.

Theorem 5

Let \(P_{1}, P_{2} \in \mathbb {P}_\textrm{M}\). Then \(P_{1} \sim _\textrm{MFRB} P_{2}\) iff \(P_{1} \sim _\textrm{MRB} P_{2}\).    \(\blacksquare \)

3.6 Congruence Properties and Equational Characterizations

We start by observing that \(\sim _\textrm{MFB}\) is not totally sensitive to the past, in the same way as \(\sim _\textrm{MRB}\) is not totally sensitive to the future. For both equivalences this results in a compositionality violation with respect to \(+\). As an example:

$$\begin{aligned}{\begin{array}{rcl} {<} a, \lambda , \lambda {>} \, . \, \underline{0}&{} \, \sim _\textrm{MFRB} \, &{} {<} a^{\dag }, \lambda , \lambda {>} \, . \, \underline{0}\\ {<} a, \lambda , \lambda {>} \, . \, \underline{0}+ {<} c, \kappa _{1}, \kappa _{2} {>} \, . \, \underline{0}&{} \, \not \sim _\textrm{MFRB} \, &{} {<} a^{\dag }, \lambda , \lambda {>} \, . \, \underline{0}+ {<} c, \kappa _{1}, \kappa _{2} {>} \, . \, \underline{0}\\ \end{array}}\end{aligned}$$

because in \({<} a^{\dag }, \lambda , \lambda {>} \, . \, \underline{0}+ {<} c, \kappa _{1}, \kappa _{2} {>} \, . \, \underline{0}\) action c is disabled due to the presence of the already executed action \(a^{\dag }\), while in \({<} a, \lambda , \lambda {>} \, . \, \underline{0}+ {<} c, \kappa _{1}, \kappa _{2} {>} \, . \, \underline{0}\) action c is enabled as there are no past actions preventing it from occurring.

Note that \(\sim _\textrm{MFRB}\) would not equate the first two processes if their two rates were \(\lambda _{1}\) and \(\lambda _{2}\) with \(\lambda _{1} \ne \lambda _{2}\) or there were any other process in place of \(\underline{0}\). Therefore, when investigating congruence with respect to alternative composition, we will consider the set of processes \(\mathbb {P}'_\textrm{M} = \mathbb {P}_\textrm{M} \setminus \{ {<} a, \lambda , \lambda {>} \, . \, \underline{0}\mid a \in A, \lambda \in \mathbb {R}_{> 0} \}\).

Theorem 6

Let \(\sim _\textrm{M} \, \in \{ \sim _\textrm{MFB}, \sim _\textrm{MRB} \}\) and \(P_{1}, P_{2} \in \mathbb {P}_\textrm{M}\):

  • If \(P_{1} \sim _\textrm{M} P_{2}\) then for all \(a \in A\) and \(\lambda , \mu \in \mathbb {R}_{> 0}\):

    • \({<} a, \lambda , \mu {>} \, . \, P_{1} \sim _\textrm{M} {<} a, \lambda , \mu {>} \, . \, P_{2}\) provided that \(\textit{initial}(P_{1}) \wedge \textit{initial}(P_{2})\).

    • \({<} a^{\dag }, \lambda , \mu {>} \, . \, P_{1} \sim _\textrm{M} {<} a^{\dag }, \lambda , \mu {>} \, . \, P_{2}\).

  • If \(P_{1} \sim _\textrm{M} P_{2}\) with \(P_{1}, P_{2} \in \mathbb {P}'_\textrm{M}\) then for all \(P \in \mathbb {P}'_\textrm{M}\):

    • \(P_{1} + P \sim _\textrm{M} P_{2} + P\) and \(P + P_{1} \sim _\textrm{M} P + P_{2}\) provided that \(\textit{initial}(P) \vee (\textit{initial}(P_{1}) \wedge \textit{initial}(P_{2}))\).    \(\blacksquare \)

Table 4. Axioms characterizing bisimilarity over Markovian reversible processes

With regard to equational characterizations, as expected \(\sim _\textrm{MFB}\) and \(\sim _\textrm{MRB}\) are such that alternative composition is associative and commutative and admits \(\underline{0}\) as neutral element. This is formalized by axioms \(\mathcal {A}_{\textrm{M}, 1}\) to \(\mathcal {A}_{\textrm{M}, 3}\) in Table 4.

Markovian variants of axioms \(\mathcal {A}_{4}\) to \(\mathcal {A}_{6}\) in Table 2 are not valid for \(\sim _\textrm{MFB}\) because this behavioral equivalence is sensitive to the presence of the past, cannot identify processes with a different past, and views all the transitions as outgoing.

Likewise, Markovian variants of axioms \(\mathcal {A}_{7}\) and \(\mathcal {A}_{8}\) in Table 2 are not valid for \(\sim _\textrm{MRB}\) because this behavioral equivalence is sensitive to the presence of the future, cannot identify processes with a different future, and views all the transitions as incoming.

As for idempotency, Markovian variants of axioms \(\mathcal {A}_{9}\) and \(\mathcal {A}_{10}\) in Table 2, which are formalized by axioms \(\mathcal {A}_{\textrm{M}, 4}\) and \(\mathcal {A}_{\textrm{M}, 5}\) in Table 4, are valid only for \(\sim _\textrm{MFB}\) as shown in Example 6. We further observe that in the considered example:

$$\begin{aligned}{{<} a^{\dag }, \lambda , \mu {>} \, . \, \underline{0}+ {<} a, \lambda , \mu {>} \, . \, \underline{0}\, \sim _\textrm{MRB} \, {<} a, \lambda , \mu {>} \, . \, \underline{0}+ {<} a^{\dag }, \lambda , \mu {>} \, . \, \underline{0}}\end{aligned}$$

can be proved via axiom \(\mathcal {A}_{\textrm{M}, 2}\).

Theorem 7

Let \(\mathcal {A}_\textrm{MFB} = \{ \mathcal {A}_{\textrm{M}, 1}, \mathcal {A}_{\textrm{M}, 2}, \mathcal {A}_{\textrm{M}, 3}, \mathcal {A}_{\textrm{M}, 4}, \mathcal {A}_{\textrm{M}, 5} \}\) and \(P_{1}, P_{2} \in \mathbb {P}'_\textrm{M}\). Then \(P_{1} \sim _\textrm{MFB} P_{2}\) iff \(\mathcal {A}_\textrm{MFB} \vdash P_{1} = P_{2}\).    \(\blacksquare \)

Theorem 8

Let \(\mathcal {A}_\textrm{MRB} = \{ \mathcal {A}_{\textrm{M}, 1}, \mathcal {A}_{\textrm{M}, 2}, \mathcal {A}_{\textrm{M}, 3} \}\) and \(P_{1}, P_{2} \in \mathbb {P}'_\textrm{M}\). Then \(P_{1} \sim _\textrm{MRB} P_{2}\) iff \(\mathcal {A}_\textrm{MRB} \vdash P_{1} = P_{2}\).    \(\blacksquare \)

4 Conclusions

In this paper, we have discovered the following asymmetries that shed light on forward bisimilarity, reverse bisimilarity, and forward-reverse bisimilarity:

  1. 1.

    In the nondeterministic case \(\sim _\textrm{FRB} \; = \; \sim _\textrm{FB}\) over initial processes only, while in the Markovian case \(\sim _\textrm{MFRB} \; = \; \sim _\textrm{MRB}\) over all reachable processes.

  2. 2.

    The insensitivity to the presence of the past breaks the compositionality of \(\sim _\textrm{FB}\), while the insensitivity to the presence of the future does not violate the compositionality of \(\sim _\textrm{RB}\). This does not happen in the Markovian case.

  3. 3.

    Forward bisimilarity needs explicit idempotency axioms, while reverse bisimilarity does not, especially in the nondeterministic case.

  4. 4.

    Any aggregated state resulting from an ordinary lumping is \(\sim _\textrm{MFB}\)-equivalent to each of the original states it contains, while this is not necessarily the case for exact lumping and \(\sim _\textrm{MRB}\), where \(\sim _\textrm{MRB}\)-equivalence certainly holds only among the original states contained in an aggregated state.

As future work, we plan to investigate logical characterizations of the same equivalences, along with what changes when admitting irreversible actions.