Bridging Causal Reversibility and Time Reversibility: A Stochastic Process Algebraic Approach

Causal reversibility blends reversibility and causality for concurrent systems. It indicates that an action can be undone provided that all of its consequences have been undone already, thus making it possible to bring the system back to a past consistent state. Time reversibility is instead considered in the field of stochastic processes, mostly for efficient analysis purposes. A performance model based on a continuous-time Markov chain is time reversible if its stochastic behavior remains the same when the direction of time is reversed. We bridge these two theories of reversibility by showing the conditions under which causal reversibility and time reversibility are both ensured by construction. This is done in the setting of a stochastic process calculus, which is then equipped with a variant of stochastic bisimilarity accounting for both forward and backward directions.


Introduction
The interest into computation reversibility dates back to the 60's, when it was observed that irreversible computations cause heat dissipation into circuits [Lan61].More precisely, Landauer's principle states that any logically irreversible manipulation of information, such as the erasure of bits or the merging of computation paths, must be accompanied by a corresponding entropy increase in non-information-bearing degrees of freedom of the information processing apparatus or its environment [Ben03].Hence, according to this principle, which has been recently verified in [BAP + 12] and given a physical foundation in [Fra18], any logically reversible computation, in which no information is erased, may be potentially carried out without releasing any heat.This suggested that low energy consumption could be achieved by resorting to reversible computing, in which there is no information loss [Ben73].Nowadays, reversible computing has several applications such as biochemical reaction modeling [PUY13,Pin17], parallel discrete-event simulation [PP14,SOJB18], robotics [LES18], control theory [SPP19], fault tolerant systems [DK05, dKH10, LLM + 13, VS18], and concurrent program debugging [GLM14,LNPV18a].
In a reversible system, we see two directions of computation: a forward one, coinciding with the normal way of computing, and a backward one, which is able to undo the effects of the forward one when needed.In the literature, there are different variants of reversibility.For instance, in a Petri net reversibility means that one can always reach the initial marking [BKMP18], while in a distributed system it stands for the capability of returning to a past consistent state [DK04,DK05].In contrast, in the performance evaluation field reversibility is related to time and is instrumental to develop efficient analysis methods [Kel79].
Our focus is on integrating causal reversibility and time reversibility.Causal reversibility describes the capability of going back to a past state that is consistent with the computational history of a system; in this setting, quantitative aspects have been totally disregarded.On the other hand, the theory of time reversibility studies the conditions under which the stochastic behavior of a system remains the same when the direction of time is reversed; unfortunately, it has been applied to concurrent systems without explicitly taking causality into account.In this paper, we aim at bridging these two theories by showing how causal reversibility and time reversibility can be jointly achieved.To this purpose, since process algebra constitutes a common ground for concurrency theory and probability theory [LS91,Hil96], we develop our proposal by considering a stochastic process calculus, in which actions are equipped with positive real numbers.Each of these numbers expresses the rate at which the corresponding action is executed and uniquely identifies the exponential distribution that quantifies the duration of the action, so that the stochastic process underlying such a calculus turns out to be a continuous-time Markov chain (CTMC) [KS60].
Ensuring that a system is both causally reversible and time reversible is not a trivial task.Consider for instance a system that can perform either action a at rate λ followed by action b at rate µ, or action c at rate γ.In stochastic process algebra terms, it would be represented as <a, λ>.<b, µ>.0 + <c, γ>.0 where "." is the action prefix operator, "+" is the choice operator, and 0 is the terminated process.The underlying labeled transition system is the action-labeled CTMC depicted in the leftmost part of Figure 1.This system is not reversible because, given a pair of states connected by a transition, it is not possible to go from the target state back to the source state.So the first step towards reversibility is to add a backward transition for each such pair of states, which is labeled with the same action as the forward transition together with a suitable backward rate.The resulting labeled transition system is the action-labeled CTMC depicted in the central part of Figure 1.However, this system is not causally reversible because after performing a and b (resp.c) the system could go back by undoing c (resp.b and a), i.e., the actions in the backward direction could be different from those in the forward direction.In order for this system to be time reversible, the product of the rates along any cycle should be the same when changing direction [Kel79].This holds for cycles of length 2 or 4 involving only actions a and b, whereas it is not the case in general with cycles of length 3 involving all the actions, unless λ • µ • γ = γ • μ • λ as happens, e.g., when λ = λ, µ = μ, and γ = γ, i.e., when every backward rate is equal to the corresponding forward rate.The version depicted in the rightmost part of Figure 1, which is obtained from <a, λ>.<b, µ>.0 + <c, γ>.0 by applying the approach we propose, is both causally reversible and time reversible.6:3 The contribution of this paper is threefold.Firstly, we apply for the first time the general methodology for reversing process calculi of [PU07] to a stochastic process calculus.In particular, we provide forward and backward operational semantic rules -featuring forward and backward actions and rates -and then we show that the resulting calculus is causally reversible.The latter is accomplished by importing from the reduction semantics setting of [DK04] the notion of concurrent transitions, which is new in the structural operational semantics framework of [PU07] and is then handled through the recent technique of [LPU20].
Secondly, we prove that time reversibility can be obtained by using in the operational semantic rules backward rates equal to the corresponding forward rates or by restricting the syntax in such a way that parallel composition cannot occur within the scope of action prefix or choice.This is quite different from the approach adopted for example in [Har03,MR15], where time reversibility is verified a posteriori, as we instead produce a calculus in which time reversibility can be guaranteed by construction.The difference in the approach does not prevent us from importing in our setting compositionality results from those works.
Thirdly, we address behavioral equivalences for our reversible stochastic process calculus, in order to provide a means to identify systems possessing the same functional and performance properties.In particular, we focus on Markovian bisimilarity [Hil96], which equates systems capable of stepwise mimicking each other's functional and performance behavior.We extend a result of [DMV90] to our stochastic setting by showing that a variant of Markovian bisimilarity on computations accounting for both forward and backward directions coincides with Markovian bisimilarity on states, thus inheriting the nice properties of the latter [Ber07].
This paper, which is a revised and enriched version of [BM20], is organized as follows.In Sections 2 and 3 we recall background notions about causal reversibility and time reversibility, respectively.In Section 4 we develop our proposal of integration for these two forms of reversibility in the setting of a CTMC-based process calculus, which is then equipped in Section 5 with a forward and backward Markovian bisimilarity.In Section 6 we provide some examples.Finally, in Section 7 we conclude with some directions for future work.

Causal Reversibility of Concurrent Systems
Reversibility in a computing system has to do with the possibility of reverting the last performed action.In a sequential system, this is very simple as there exists just one last action, hence the only challenge is how to store the information needed to reverse this last action.After Bennett [Ben73], several techniques have been developed to reverse the computations of a sequential program [Lee86, YG07, HGCH21, PV15].
In a concurrent system, the situation is much more complex as the last action may not be uniquely identifiable.Indeed, there might be several concurrent last actions.One could resort to timestamps to decide which action is the last one, but having synchronized clocks in a distributed system is rather difficult.A good approximation is to consider as last action every action that has not caused any other action yet.This is at the basis of the so called causal reversibility, which relates reversibility with causality [DK04,DK05].Intuitively, the definition states that, in a concurrent system, any executed action can be undone provided that all of its consequences, if any, have been undone beforehand.
In the process algebra literature, specifically for CCS [Mil89], two approaches have been developed to reverse a computation and to keep track of past actions: the dynamic approach of [DK04] and the static approach of [PU07].Despite these two approaches being quite different, they have been recently shown to be equivalent in terms of labeled transition system isomorphism [LMM21].On the application side, the former approach is more suitable for systems whose operational semantics is given in terms of reduction semantics, hence it is to be preferred in the case of very expressive calculi [LMS10, CKV13, LM20] as well as programming languages [LLMS12,LNPV18b].On the other hand, the latter approach is very handy when it comes to deal with labeled transition systems and basic process calculi.
The dynamic approach relies on RCCS [DK04], a variant of CCS that uses external memories attached to processes to record all the actions executed by the processes themselves.Every RCCS process is thus of the form m P , where m is a memory whilst P is a CCS process.At the beginning of the computation, if P is not sequential, i.e., it contains occurrences of the parallel composition operator, then an empty memory is distributed among all the sequential components.Every time that one of the sequential components performs an action, the action is pushed on top of the memory stack of the component as it is its last executed action.This construction is shown to allow a concurrent system to backtrack along any causally equivalent path in such a way that no previously inaccessible state is reached, which is the essence of causal reversibility.
In contrast, the static approach of [PU07] proposes a general method, of which CCSK is a result, to reverse process calculi whose operational semantic rules are expressed in the path format of [BV93].The basic idea of this method is to make all the operators of the calculus static and each executed action univocally identified by a communication key.In particular, since dynamic process algebraic operators like action prefix "." and choice "+" would disappear after a transition -thus causing information loss -all of them are kept within target processes of transitions.This is the approach that we will follow for defining our reversible stochastic process calculus in Section 4.
For example, consider the CCS process a.P + b.Q, which either performs action a and then behaves as process P , or performs action b and then behaves as process Q.In the CCS transition a.P + b.Q a − → P , both the executed action a and the discarded process b.Q are lost after performing the transition, hence it is not possible to get back to the initial state.In CCSK the same process evolves instead as a.P + b.Q Q behaves like P in further forward transitions while the colored parts can be seen as decorations of P to be used only in backward transitions.Alternatively, a[i].P + b.Q can be seen as C[P ], where P is the active part and C = a[i].• + b.Q is its dead context.In this way the use of external memories of [DK04] is avoided, because all the necessary information for enabling reversibility is syntactically maintained within processes.Note that action a is decorated with a fresh key [i] -e.g., a natural number -so as to distinguish among several actions executed in the past that have the same name.As we will see in Section 4, this is important for correctly managing communications when going backward.

Time Reversibility of Markov Chains
In the performance evaluation field, a different notion of reversibility, called time reversibility, is considered.We illustrate it in the specific case of continuous-time Markov chains, which are discrete-state stochastic processes characterized by the memoryless property [KS60].
A stochastic process describes the evolution of some random phenomenon over time through a set of random variables, one for each time instant.A stochastic process X(t) taking values from a discrete state space S for t ∈ R ≥0 is a continuous-time Markov chain (CTMC) iff for all n ∈ N, time instants t 0 < t 1 < • • • < t n < t n+1 ∈ R ≥0 , and states s 0 , s 1 , . . ., s n , s n+1 ∈ S it holds that Pr{X(t , 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 can be equivalently represented as a labeled transition system or as a stateindexed matrix.In the first case, each transition is labeled with some probabilistic information describing the evolution from the source state s to the target state s of the transition itself.In the second case, the same information is stored into an entry, indexed by those two states, of a square matrix.The value of this information is, in general, a function of time.
We restrict ourselves to time-homogeneous CTMCs, in which conditional probabilities of the form Pr{X(t+t ) = s | X(t) = s} do not depend on t, so that the information considered above is given by lim t →0 Pr{X(t+t )=s |X(t)=s} t . This limit yields a number called the rate at which the CTMC moves from state s to state s and characterizes the exponentially distributed random time taken by the considered move.It can be shown that the sojourn time in any state s ∈ S is exponentially distributed with rate given by the sum of the rates of the moves of s.The average sojourn time in s is the inverse of such a sum and the probability of moving from s to s is the ratio of the corresponding rate to the aforementioned sum.
A CTMC is irreducible iff each of its states is reachable from every other state with probability greater than 0. A state s ∈ S is recurrent iff the CTMC will eventually return to s with probability 1, in which case s is called 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, as they form a finite strongly connected component.
Every time-homogeneous and ergodic CTMC X(t) is stationary, which means that (X(t i + t )) 1≤i≤n has the same joint distribution as (X(t i )) 1≤i≤n for all n ∈ N ≥1 and t 1 < • • • < t n , t ∈ R ≥0 .In this case, X(t) has a unique steady-state probability distribution π = (π(s)) s∈S that fulfills π(s) = lim t→∞ Pr{X(t) = s | X(0) = s } for any s ∈ S because the CTMC has reached equilibrium.These probabilities are computed by solving the linear system of global balance equations π • Q = 0 subject to s∈S π(s) = 1 and π(s) ∈ R >0 for all s ∈ S. The infinitesimal generator matrix Q = (q s,s ) s,s ∈S 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 = − s =s q s,s for all s ∈ S, i.e., every diagonal element contains the opposite of the total exit rate of the corresponding state, so that each row of Q sums up to 0. Therefore π • Q = 0 means that, once reached equilibrium, for every state the incoming probability flux is equal to the outgoing probability flux.
Due to state space explosion and numerical stability problems, the calculation of the solution of the global balance equation system is not always feasible [Ste94].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≤i≤n has the same joint distribution as (X(t − t i )) 1≤i≤n for all n ∈ N ≥1 and t In this case X(t) and its reversed version X r (t) = X(−t), t ∈ R ≥0 , are stochastically identical, in particular they are stationary and share the same steady-state probability distribution π.In order for a stationary CTMC X(t) to be time reversible, it is necessary and sufficient that the partial balance equations π(s) • q s,s = π(s ) • q s ,s are satisfied for all s, s ∈ S such that s = s or, equivalently, that q s 1 ,s 2 • . . .• q s n−1 ,sn • q sn,s 1 = q s 1 ,sn • q sn,s n−1 • . . .• q s 2 ,s 1 for all n ∈ N ≥2 and distinct s 1 , . . ., s n ∈ S [Kel79].Note that the sum of the partial balance equations for s ∈ S yields the global balance equation π(s) • |q s,s | = s =s π(s ) • q s ,s .The time-reversed version X r (t) of a stationary CTMC X(t) can be defined even when X(t) is not reversible.As shown in [Kel79,Har03], this is accomplished by using the steadystate probability distribution π of X(t), with X r (t) turning out to be a CTMC too and having the same steady-state probability distribution π.More precisely, q r s j ,s i = π(s i ) π(s j ) • q s i ,s j for all s i = 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 π(s i ) to π(s j ).Note that the time-reversed version of X r (t) is X(t).

Integrating Causal Reversibility and Time Reversibility
In this section, we integrate the two concepts of causal reversibility and time reversibility recalled in the previous two sections by means of a simple calculus named RMPC -Reversible Markovian Process Calculus.We start with its syntax -where actions are paired with ratesand its semantics, which are inspired by [PU07].We then show that the reversibility induced by RMPC is consistent with causality by adapting the notion of concurrent transitions from [DK04] and exploiting the technique of [LPU20].Finally, we exhibit the conditions under which time reversibility is achieved too and we compare our setting, in which time reversibility is ensured by construction, with those of [Har03,MR15], in which time reversibility is verified a posteriori, and import from them some results enabling an efficient analysis of performance.
4.1.Syntax of RMPC.The syntax of RMPC is shown in Table 1.A standard forward process P can be one of the following: the terminated process 0; the action-prefixed process <a, λ>.P , which is able to perform an action a at rate λ -called an exponentially timed action as its duration follows an exponential distribution of parameter λ -and then continues as process P ; the choice P + Q between processes P and Q based on the rates of their initial actions; or the parallel composition P L Q, indicating that processes P and Q execute in parallel and must synchronize only on actions belonging to L.
A reversible process R is built on top of forward processes.As in [PU07], the syntax of reversible processes differs from the one of forward processes due to the fact that in the former each prefix <a, λ> can be decorated with a communication key i thus becoming <a, λ> [i].
A process of the form <a, λ>[i].R expresses that in the past the process synchronized with the environment and this synchronization was identified by key i.Keys are thus attached only to already executed actions; they are not needed in the absence of parallel composition, provided that executed actions are marked in some way.
Let A be a countable set of actions (ranged over by a, b), R = R >0 be a set of rates (ranged over by λ, µ), and K be a countable set of keys (ranged over by i, j).Let L = A×R×K be a set of labels each formed by an action, a rate, and a communication key (ranged over by ).Given a forward label = <a, λ>[i], we write = <a, λ>[i] for the corresponding backward label, where λ stands for the backward rate of the action -i.e., the rate at which the action is undone -whose value will be discussed later on.
Table 2: Structural operational semantic rules for RMPC We denote by P the set of processes generated by the production for R in Table 1, while we use predicate std( ) to identify the standard forward processes that can be derived from the production for P in the same table.For example, <a, λ>.<b, µ>.0 is a standard forward process that can perform action a at rate λ followed by action b at rate µ, while <a, λ>[i].<b,µ>.0 is a non-standard reversible process that can either undo action a at rate λ or perform action b at rate µ.Note that <a, λ>.<b, µ>[j].0/ ∈ P because a future action cannot precede a past action in the description of the behavior of a process.
The set key(R) of keys occurring in a process R ∈ P is inductively defined as follows: 4.2.Semantics for RMPC.The semantics for RMPC is the labeled transition system (P, L, − →).As in [PU07], the transition relation − → ⊆ P ×L×P is given by − → = − → ∪ , where the forward transition relation − → and the backward transition relation are the least relations respectively induced by the forward rules in the left part of Table 2 and by the backward rules in the right part of the same table.
Rule Act1 handles processes of the form <a, λ>.P , where P is written as R subject to std(R).In addition to transforming the action prefix into a transition label, it generates a key i that is bound to the action <a, λ> thus yielding the label <a, λ> [i].As can be noted, the prefix is not discarded by the application of the rule, instead it becomes a key-storing part of the target process that is necessary to offer again that action after coming back.Rule Act1 • reverts the action <a, λ>[i] of the process <a, λ> [i].R provided that R is a standard process, which ensures that <a, λ>[i] is the only past action that is left to undo.One of the main design choices of the entire framework is how the rate λ of the backward action is calculated.For the time being, we leave it unspecified in Act1 • as the value of this rate is not needed to prove the causal consistency part of reversibility; we will see later on that it may be important to achieve time reversibility.
The presence of rules Act2 and Act2 • is motivated by the fact that rule Act1 does not discard the executed prefix from the process it generates.In particular, rule Act2 allows a process <a, λ>[i].R to execute if R itself can execute provided that the action performed by R picks a key j different from i, so that all the action prefixes in a sequence are decorated with distinct keys.Rule Act2 • simply propagates the execution of backward actions from inner subprocesses that are not standard as long as key uniqueness is preserved, in such a way that past actions are overall undone from the most recent one to the least recent one.
Unlike the classical rules for the choice operator [Mil89], rule Cho does not discard the part of the overall process that has not contributed to the executed action.More in detail, if process R does an action, say <a, λ>[i], and becomes R , then the entire process R + S becomes R + S as the information about + S is necessary for offering again the original choice after coming back.Once the choice is made, only the non-standard process R can proceed further, with the standard process S constituting a dead context of R .Note that, in order to apply rule Cho, at least one of R and S has to be standard, meaning that it is impossible for two non-standard processes to execute if they are composed by a choice operator.Rule Cho • has precisely the same structure as rule Cho, but deals with the backward transition relation; if R is standard, then the dead context S will come into play again.For both rules, we omit their symmetric variants in which it is S to move.
The semantics of parallel composition is inspired by [Hoa85].Rule Par allows process R within R L S to individually perform an action <a, λ>[i] provided that a / ∈ L. It is also checked that the executing action is bound to a fresh key i / ∈ key(S), thus ensuring the uniqueness of communication keys across parallel composition too.Rule Coo instead allows both R and S to move by synchronizing on any action in the set L, provided that the communication key is the same on both sides, i.e., i ∈ key(R ) ∩ key(S ).The resulting cooperation action has the same name and the same key and is assumed to be exponentially distributed with rate given by the product of the rates of the two involved actions [Hil94].Rules Par • and Coo • respectively have the same structure as Par and Coo; the symmetric variants of Par and Par • are omitted.
In our stochastic setting, choice and parallel composition are not subject to nondeterminism.The decision of which action is chosen or which process advances is made probabilistically based on the rates of the actions that are ready to execute.This mechanism is called the race policy [Hil96] because the higher the rate, i.e., the faster the action, the higher its execution probability.This is consistent with the fact that the minimum of a set of exponentially distributed random variables is still exponentially distributed, from which it follows that, as already mentioned in Section 3, the sojourn time in any state of a CTMC is exponentially distributed with rate given by the sum of the rates of the outgoing transitions.The average sojourn time in that state is the inverse of such a sum and the probability of moving from that state to another one is the ratio of the rate of the corresponding transition to the aforementioned sum.
We further recall from [Hil96] that the race policy and the memoryless property of CTMCs allow the interleaving view of concurrency -typically employed in nondeterministic process calculi -to be adopted in the setting of a stochastic process calculus like RMPC.
Consider the standard process <a, λ>.0 ∅ <b, µ>.0.It can initially execute either action a at rate λ, which happens with probability λ λ+µ , or action b at rate µ, which happens with probability µ λ+µ ; the average sojourn time in the corresponding state is 1 λ+µ .Observing that the probability of simultaneous termination of the two actions is zero, suppose that a terminates first.In the state reached by the corresponding forward transition labeled with a and λ the execution of b is still in progress, so there will be an outgoing forward transition labeled with b and a parameter quantifying the residual duration of b.That parameter is still µ because, thanks to the memoryless property, the residual time to the termination of b is still exponentially distributed with rate µ (see the left part of the forthcoming Figure 3).4.3.Reachable Processes.The syntax in Table 1 prevents future actions from preceding past actions.However, this is not the only necessary limitation, because not all the processes generated by the considered grammar are semantically meaningful.On the one hand, in the case of a choice at least one of the two subprocesses must be standard, hence for instance <a, λ>[i].0+ <b, µ>[j].0 is not admissible as it indicates that both branches have been selected.On the other hand, key uniqueness must be enforced within non-standard processes, so for example <a, λ> In the rest of the paper, we thus consider only reachable processes, whose set we denote by P. They include processes from which a computation can start, i.e., standard forward processes, as well as processes that can be derived from the previous ones via finitely many applications of the rules for − → in Table 2. Given a reachable process R ∈ P, we observe that if std(R) then key(R) = ∅ while any other process R reachable from R is such that key(R ) = ∅, as at least one of the actions occurring in R has been executed and hence it has been equipped with a communication key inside R .4.4.Preliminary Reversibility Properties.A basic property in order for RMPC to be reversible, both in the causal sense and in the time one, is the so called loop lemma [DK04,PU07].This property states that each executed action can be undone and that any undone action can be redone.In other words, when considering the states associated with two arbitrary reachable processes, either there is no transition between them, or there is a pair of transitions such that one is a forward transition from the first state to the second state while the other is a backward transition from the second state to the first state.
Proof.By induction on the depth of the derivation of the considered transition by noting that each forward (resp.backward) rule has a corresponding backward (resp.forward) rule.

Given a sequence
The loop lemma thus generalizes as follows.
4.5.Causal Reversibility of RMPC.We now prove the causal reversibility of RMPC, which means that each of its reachable processes is able to backtrack correctly, i.e., without encountering previously inaccessible states, and flexibly, i.e., along any causally equivalent path.
To this purpose, we start by borrowing some machinery from [DK04], in particular the notion of concurrent transitions, that needs to be adapted because the reversing method of [PU07] we have followed is different from the one of [DK04] we are going to exploit.
Given a transition θ = R − → S with R, S ∈ P, we call R the source of θ and S its target.
If θ is a forward transition, i.e., θ = R − → S, we denote by θ = S R the corresponding backward transition.Two transitions are said to be coinitial if they have the same source and cofinal if they have the same target.Two transitions are composable when the target of the first transition coincides with the source of the second transition.A finite sequence of pairwise composable transitions is called a computation.We use for the empty computation and ω to range over computations, with |ω| denoting the length of ω expressed as the number of transitions constituting it.When ω is a forward computation, we denote by ω the corresponding backward computation.The notions of source, target, coinitiality, cofinality, and composability naturally extend to computations.We indicate with ω 1 ω 2 the composition of the two computations ω 1 and ω 2 when they are composable.
Before specifying when two transitions are concurrent, we need to present the set of causes -identified by keys -that lead to a given communication key, along with the notion of process context.
The causal set cau(R, i) of process R ∈ P until key i ∈ K is inductively defined as: , then cau(R, i) represents the set of keys in R that caused i, with cau(R, i) ⊂ key(R) because on the one hand i / ∈ cau(R, i) and on the other hand keys that are not causally related to i are not considered.A key j causes i if it appears syntactically before i in R or, said otherwise, i is inside the scope of j.
A process context is a process with a hole in it, generated by the grammar: to denote the process obtained from C by replacing its hole with R.
We are now in a position to define what we mean by concurrent transitions on the basis of the notion of conflicting transitions.The first condition below tells that a forward transition is in conflict with a backward one whenever the latter tries to undo a cause of the key of the former.The second condition below deems as conflictual two transitions respectively generated by the two subprocesses of a choice.Definition 4.3 (conflicting and concurrent transitions).Two coinitial transitions θ 1 and θ 2 from a process R ∈ P are in conflict iff one of the following two conditions holds: (1) S 2 with j ∈ cau(S 1 , i).
Two coinitial transitions are concurrent when they are not in conflict.Figure 2 shows two related examples.In the former, the process <b, µ>[j].<a,λ>.P can perform two transitions: a backward one and a forward one.They are in conflict according to the first condition of Definition 4.3 as the backward transition removes the key j that is in the causal set of i.In the latter, we have that process <a, λ>.P + <a, λ>.P is able to trigger two forward transitions.Since they arise from the same choice operator, they are in conflict according to the second condition of Definition 4.3.
Remark 4.4.In a stochastic process calculus like RMPC the semantic treatment of the choice operator is not trivial because for a process of the form <a, λ>.P + <a, λ>.P the operational rules should produce either a single a-transition whose rate is λ + λ, or two a-transitions each having rate λ that do not collapse into a single one [Hil96].In our reversible framework, two distinct transitions are naturally generated thanks to the fact that the key associated with the executed action and the discarded alternative subprocess are stored into the reached process, as shown in the bottom part of Figure 2.
We finally show that reversibility is causally consistent in our concurrent framework.This can be done in two ways: either by adapting the original proof of [DK04], as we did in [BM20], or by using the general technique recently provided by [LPU20].We opt for the latter, according to which causal consistency stems from the diamond propertywhich amounts to concurrent transitions being confluent -backward transition independence -which generalizes the concept of backward determinism used for reversible sequential languages [YG07] -and past well foundedness -which ensures that reachable processes have a finite past.
Concurrent transitions can commute as formally stated below by the diamond property (as an example see the left part of the forthcoming Figure 3), while conflicting ones cannot.Proof.The proof is by case analysis on the direction of θ 1 and θ 2 .We distinguish three cases according to whether the two transitions are both forward, both backward, or one forward and the other backward.Suppose that 1 = <a, λ>[i] and 2 = <b, µ>[j], with i = j otherwise θ 1 and θ 2 would be generated by the two subprocesses of a choice operator and hence could not be concurrent: • Suppose that θ 1 and θ 2 are both forward.Since θ 1 and θ 2 are concurrent, by virtue of Definition 4.3 the two transitions cannot originate from a choice operator.They must thus be generated by a parallel composition, but not through the Coo rule because θ 1 and θ 2 have different keys and hence cannot synchronize.Without loss of generality, By applying the Par rule, we have that • The case in which θ 1 and θ 2 are both backward is similar to the previous one.
• Suppose that θ 1 is forward and θ 2 is backward.Since θ 1 and θ 2 are concurrent, by virtue of Definition 4.3 the backward transition cannot remove a cause of the forward one.
Since either subprocess of a choice operator or a parallel composition cannot perform a forward transition and a backward transition without preventing the backward one from removing a cause of the forward one, and in the case of the choice operator only one of the two subprocesses can perform transitions, without loss of generality we can assume S 2 as well as a, b ∈ L so as to preserve causes.By applying the Par rule, we have that S 2 are concurrent.
Proof.Since by Definition 4.3 there is no case in which two backward transitions are conflicting, the property trivially holds.
Lemma 4.7 (past well foundedness).Let R 0 ∈ P. Then there is no infinite sequence of backward transitions such that R i i R i+1 for all i ∈ N.
Proof.It can be easily proved by induction on |key(R 0 )| by observing that a backward transition decreases by one the total number of keys of R 0 , with this number being finite.
Following [DK04,Lév76], we also define a notion of causal equivalence over computations, which abstracts from the order of concurrent transitions.In this way, computations obtained by swapping the order of their concurrent transitions are identified with each other (see for instance the left part of the forthcoming Figure 3) and the composition of a computation with its inverse is identified with the empty computation.Definition 4.8 (causal equivalence).Causal equivalence is the smallest equivalence relation on computations that is closed under composition and satisfies the following: (1) θ 1 θ 2 θ 2 θ 1 for any two coinitial concurrent transitions θ and any two cofinal transitions θ 2 = R 1 2 − → S and θ 1 = R 2 1 − → S respectively composable with the previous ones.
The further property below, called parabolic lemma in [LPU20], states that any computation can be seen as a backward computation followed by a forward computation.As observed in [DK04], up to causal equivalence one can always reach for the maximum freedom of choice among transitions by going backward and only then going forward (not the other way around).Intuitively, one could depict computations as parabolas: the system first draws potential energy from its memory, by undoing all the executed actions, and then restarts.Lemma 4.9 (parabolic lemma).For any computation ω, there exist two forward computations ω 1 and ω 2 such that ω ω 1 ω 2 and |ω 1 | + |ω 2 | ≤ |ω|.
Proof.It follows from the diamond property and backward transition independence thanks to [LPU20].
Proof.It follows from past well foundedness and the parabolic lemma thanks to [LPU20].
Theorem 4.10 shows that causal equivalence characterizes a space for admissible rollbacks that are (i) correct as they do not lead to states not reachable by some forward computation and (ii) flexible enough to allow undo operations to be rearranged with respect to the order in which the undone concurrent transitions were originally performed.This implies that the states reached by any backward computation could be reached by performing forward computations only.Therefore, we can conclude that RMPC meets causal reversibility.4.6.Time Reversibility of RMPC.The rules in Table 2 associate with any process R ∈ P a labeled transition system R = (P, L, − →, R) whose initial state corresponds to R. To investigate time reversibility, we have to derive from R the underlying CTMC M R and we have to specify the value of any rate λ labeling a backward transition.
First of all, we observe that every state of R with an outgoing forward transition actually has infinitely many copies of that transition.The motivation is that rules Act1 and Act2 generate a transition for each possible admissible key, with the key being part of both the label and the reached process.For example, <a, λ>.P has an outgoing forward transition towards <a, λ>[i].P for each i ∈ K; note that from each <a, λ>[i].P there is instead a single outgoing backward transition to <a, λ>.P .When building the CTMC underlying <a, λ>.P , only one of those outgoing forward transitions has to be considered, otherwise the corresponding state would have an infinite exit rate.
In the construction of M R we thus need to reason in terms of transition bundles.A transition bundle collects all the transitions departing from the same state and labeled with the same action, the same rate, and different keys, whose target states are syntactically identical up to keys in the same positions.To this purpose, we make use of contexts to introduce ≡ K as the smallest equivalence relation on P that satisfies the following: • If C does not contain occurrences of L with a ∈ L and i and j do not occur in C and R, then As for the second case, for instance <a, λ 1 >.P 1 {a} <a, λ 2 >.P 2 evolves to <a, λ 1 >[i].P 1 {a} <a, λ 2 >[i].P 2 for all i ∈ K, but we cannot replace <a, λ 1 >[i].P 1 with <a, λ 1 >[j].P 1 , unless we replace <a, λ 2 >[i].P 2 with <a, λ 2 >[j].P 2 too, because <a, λ 1 >[j].P 1 {a} <a, λ 2 >[i].P 2 has no backward transition to <a, λ 1 >.P 1 {a} <a, λ 2 >.P 2 when j = i.
Among the representations mentioned in Section 3, below we choose to formalize M R as a labeled transition system because this is closer to R obtained from the rules in Table 2. Definition 4.11 (underlying CTMC ).The CTMC underlying a process R ∈ P is the labeled transition system M R = (P/ ≡ K , A × R, − → K , [R] ≡ K ) where: • P/ ≡ K is the quotient set of ≡ K over P, i.e., the set of classes of ≡ K -equivalent processes, representing the set of states.
R, which simply is {R} when R is standard and hence contains no keys, representing the initial state.
S for some i ∈ K.
When moving from R to M R , individual states are thus replaced by classes of states that are syntactically identical up to keys in the same positions; moreover, keys are removed from transition labels.As a consequence, every state of M R turns out to have finitely many outgoing transitions.We also note that M R is an action-labeled CTMC, as each of its transitions is labeled not only with a rate but also with an action.
As a preliminary step towards time reversibility, we have to show that M R is stationary.It holds that M R is even ergodic thanks to the loop lemma.
Lemma 4.12.Let R ∈ P. Then M R is time homogeneous and ergodic.
Proof.The time homogeneity of M R is a straightforward consequence of the fact that its rates simply are positive real numbers, not time-dependent functions.The ergodicity of M R stems from the fact that the graph representing M R is a finite strongly connected component due to Corollary 4.2.
The proof of time reversibility exploits the necessary and sufficient condition based on partial balance equations [Kel79] (see Section 3).The loop lemma and the assumption λ = λ for all λ ∈ R >0 ensure that the steady-state probability distribution of M R is the uniform distribution.From this it immediately follows that the partial balance equations are satisfied, i.e., that time reversibility holds.Lemma 4.13.Let R ∈ P, S be the set of states of M R , and n = |S|.If every backward rate is equal to the corresponding forward rate, then the steady-state probability distribution π of M R satisfies π(s) = 1/n for all s ∈ S.
Proof.If n = 1, i.e., R is equal to 0 or to the parallel composition of several standard processes whose initial actions have to synchronize but are different from each other, then trivially π(s) = 1/n = 1 for the only state s ∈ S. Suppose now that n ≥ 2. From Lemma 4.12 it follows that M R has a unique steady-state probability distribution π.Due to Lemma 4.1, each outgoing forward/backward transition of an arbitrary state s ∈ S has a corresponding incoming backward/forward transition, hence the global balance equation for s reformulated in terms of transitions looks as follows, where s (resp., s ) is the target state of a forward (resp., backward) transition departing from s: Since every backward rate is equal to the corresponding forward rate, the global balance equation for s boils down to: Since the two summations related to s as well as the two summations related to s have the same number of summands, the equation above is satified when π(s) = π(s ) = π(s ) for each s reached by a forward transition of s and each s reached by a backward transition of s.All global balance equations are thus satisfied when π(s) = 1/n for all s ∈ S.
Theorem 4.14 (time reversibility 1 ).Let R ∈ P. If every backward rate is equal to the corresponding forward rate, then M R is time reversible.
Proof.Let S be the set of states of M R and n = |S|; to avoid trivial cases, suppose n ≥ 2. From Lemma 4.12 it follows that M R has a unique steady-state probability distribution π.Now consider s, s ∈ S with s = s connected by transitions.The proof resembles the one of Lemma 4.13, but focuses on partial balance equations rather than on global ones.Due to Lemma 4.1, the partial balance equation for s and s reformulated in terms of transitions looks as follows: Since every backward rate is equal to the corresponding forward rate, the partial balance equation for s and s boils down to: Since π(s) = π(s ) = 1/n due to Lemma 4.13 and the two left summations on both sides as well as the two right summations on both sides have the same number of summands, the equation above is satified.The result then follows from the fact that s and s are two arbitrary distinct states connected by transitions.
The result above holds under the assumption λ = λ for all λ ∈ R >0 .This constraint on rates can be relaxed if we exploit the structure of the graph representing M R .For example, it is well known that CTMCs in the form of stationary birth-death processes are time reversible [Kel79], where a birth-death process comprises a totally ordered set of states such that every state different from the final one has a (birth) transition to the next state and every state different from the initial one has a (death) transition to the previous state.Time reversibility extends to tree-like birth-death processes [Kel79], where each such variant comprises a partially ordered set of states such that every non-final state may have several birth transitions and every non-initial state has one death transition to its only parent state.
Lemma 4.15.Let R ∈ P. If parallel composition does not occur in R, then M R is a tree-like birth-death process.
Proof.The fragment of graph representing M R that includes only forward transitions, i.e., generated by applying only the rules in the left part of Table 2, is a tree in the absence of parallel composition inside R. In fact, observing that if R is 0 then the graph contains a single state with no transitions, in any state other than 0 there are two options: • The application of rule Act1 or Act2 yields a new transition towards a new state due to the generation of a fresh communication key that is stored within the new state.• The application of rule Cho yields a single new transition or two new transitionsdepending on whether a single subprocess is standard or both subprocesses are standardeach of which reaches a new state due to the generation of a fresh communication key that is stored within the new state and the fact that the dead context -i.e., the standard subprocess that stays idle -is stored within the new state too (this is important in order for the two new states to be different when the two subprocesses are standard and identical, see the bottom part of Figure 2).For each forward transition generated by one of the three forward rules mentioned above, the corresponding backward rule generates the corresponding backward transition.Therefore M R is a tree-like birth-death process.Theorem 4.16 (time reversibility 2 ).Let R ∈ P. If parallel composition does not occur in R, then M R is time reversible.
Proof.A straightforward consequence of Lemma 4.15 above and Lemma 1.5 of [Kel79] establishing the time reversibility of any stationary tree-like birth-death process.Note that unlike M R the graph mentioned in the latter lemma is not directed, i.e., each of its edges can be traversed in both directions, but this is the same as having two directed edges in opposite directions like a forward transition and the corresponding backward transition.
The time reversibility of CTMC-based compositional models of concurrent systems has already been investigated in [Har03].That work examines conditions relying on the conservation of total exit rates of states in addition to the conservation of products of rates around cycles [Kel79] (see Section 3), which support the hierarchical and compositional reversal of stochastic process algebra terms.These conditions also lead to the efficient calculation of steady-state probability distributions in a product form typical of queueing theory [Kle75], thus avoiding the need of solving the global balance equations of the entire system.More recently, in [MR15] similar conditions have been employed to characterize the class of ρ-reversible stochastic automata, which allow for state permutations.Under certain constraints, the joint steady-state probability distribution of the composition of two such automata is the product of the steady-state probability distributions of the two automata.
The main difference between our approach to time reversibility and the aforementioned ones is twofold.Firstly, our approach is part of a more general framework in which also causal reversibility is addressed.Secondly, our approach is inspired by the idea of [PU07] of developing a formalism in which it is possible to express models whose reversibility is guaranteed by construction, instead of building a posteriori the time-reversed version of a certain model like in [Har03] or verifying a posteriori whether a given model is time reversible or not like in [MR15].
It is worth noting that these methodological differences do not prevent us from importing in our setting some results from [Har03,MR15], although a few preliminary observations about notational differences are necessary.Both [Har03] and [MR15] make a distinction between active actions, each of which is given a rate, and passive actions, each of which is given a weight, with the constraint that, in case of synchronization, the rate of the active action is multiplied by the weight of the corresponding passive action.In RMPC there is no such distinction, however the same operation, i.e., multiplication, is applied to the rates of two synchronizing actions.A passive action can thus be rendered as an action with rate 1, while a set of alternative passive actions can be rendered as a set of actions whose rates sum up to 1.Moreover, in [MR15] synchronization is enforced between any active-passive pair of identical actions, whereas in RMPC the parallel composition operator is enriched with an explicit synchronization set L, which yields as a special case the aforementioned synchronization discipline when L is equal to the set A of all the actions.We can therefore conclude that our parallel composition operator is a generalization of those used in [Har03,MR15], hence the recalled notational differences do not hamper the transferral of results.
In [Har03] the compositionality of a CTMC-based stochastic process calculus is exploited to prove RCAT -Reversed Compound Agent Theorem, which establishes the conditions under which the time-reversed version of the cooperation of two processes is equal to the cooperation of the time-reversed versions of those two processes.The application of RCAT leads to product-form solution results from stochastic process algebraic models, including a new different proof of Jackson's theorem for product-form queueing networks [Jac63].
In [MR15] the notion of ρ-reversibility is introduced for stochastic automata, which are essentially action-labeled CTMCs.Function ρ is a state permutation that ensures (i) for each action the equality of the total exit rate of any state s and ρ(s) and (ii) the conservation of action-related rate products across cycles when considering states in the forward direction and their ρ-counterparts in the backward direction.For any ergodic ρ-reversible automaton, it turns out that π(s) = π(ρ(s)) for every state s.Moreover, the synchronization inspired by [Pla85] of two ρ-reversible stochastic automata is still ρ-reversible and, in case of ergodicity, under certain conditions the steady-state probability of any compound state is the product of the steady-state probabilities of the two constituent states.
Our time reversibility result for RMPC can be rephrased in the setting of [MR15] in terms of ρ-reversibility with ρ being the identity function over states.As a consequence, the following two results stem from Theorems 4.14 and 4.16 of the present paper and, respectively, Theorems 2 and 3 of [MR15].Corollary 4.17 (time reversibility closure).Let R 1 , R 2 ∈ P and L ⊆ A. Under the assumptions of Theorem 4.14 or Theorem 4.16, M R 1 L R 2 is time reversible too.
Corollary 4.18 (product form).Let R 1 , R 2 ∈ P and L ⊆ A. Under the assumptions of Theorem 4.14 or Theorem 4.16, if the set of states The product-form result above avoids the calculation of the global balance equations over M R 1 L R 2 , as π(s 1 , s 2 ) can simply be obtained by multiplying π R 1 (s 1 ) with π R 2 (s 2 ).However, the condition S = S R 1 × S R 2 requires to check that every state in the full Cartesian product is reachable from R 1 L R 2 .This means that no compound state is such that its constituent states enable some action but none of these enabled actions can be executed due to the constraints imposed by the synchronization set L. The condition S = S R 1 × S R 2 implies that M R 1 L R 2 is ergodic over the full Cartesian product of the two original state spaces, which is the condition used in [MR15].Although implicit in the statement of the corollary, the time reversibility of M R 1 L R 2 is essential for the product-form result.
We conclude by observing that an important consequence of time reversibility for processes without parallel composition, i.e., the result of Theorem 4.16, and time reversibility closure with respect to parallel composition, i.e., the result of Corollary 4.17, is the fact that time reversibility extends to the entire sublanguage P of RMPC in which parallel composition cannot occur within the scope of action prefix or choice.This is quite useful because systems are typically modeled as the parallel composition of a number of sequential processes, i.e., processes in which only action prefix and choice can occur.

Forward and Backward Markovian Bisimilarity
In this section, we equip RMPC with a notion of equivalence capable of identifying syntactically different processes that expose the same observable behavior in terms of executable actions and their rates.A well known behavioral equivalence for forward-only stochastic process calculi is Markovian bisimilarity [Hil96].It equates systems that stepwise mimic each other's functional and performance behavior and enjoys nice properties in terms of compositional reasoning as well as equational and logical characterizations [Ber07].We show below how it can be adapted to our reversible setting.
In the following, we work at the state space level, rather than at the linguistic level, because we address different variants of Markovian bisimilarity that are defined not only over states, with which process terms are naturally associated, but also over computations, which are more easily expressed through states and transitions.We thus consider an action-labeled CTMC (S, A × R, − →), where A is a countable set of actions while R = R >0 is a set of rates, which in the case of RMPC is obtained by collecting transitions into bundles as formalized in Definition 4.11.Moreover, we use symbols {| and |} as multiset parentheses.Following [PU07], we may adapt Markovian bisimilarity to our reversible calculus by means of two conditions like the one in the definition above, with the former referring to forward transitions and the latter referring to backward transitions.By so doing, we would end up with a very restrictive equivalence, as for instance <a, λ>.0 ∅ <b, µ>.0 and <a, λ>.<b, µ>.0 + <b, µ>.<a, λ>.0 would be told apart.As shown in Figure 3, in the former process from <a, λ>[i].0∅ <b, µ>[j].0 both a backward a-transition and a backward b-transition are enabled, whilst in the latter process from <a, λ>[i].<b,µ>[j].0+ <b, µ>.<a, λ>.0only a backward b-transition is enabled as well as from <a, λ>.<b, µ>.0 + <b, µ>[i].<a,λ>[j].0only a backward a-transition is enabled.In other words, the so-called expansion law [Mil89], which transforms a parallel composition into a choice among all of its possible interleaved computations, would not hold, because the two aforementioned transitions in the former process are concurrent and hence when going backward there is no obligation to follow the path traversed in the forward direction, whereas this is not the case with the latter process.
As recognized in [DMV90], in order to set up a more useful equivalence in a reversible setting, it is necessary to enforce not only causality but also history preservation.This means that, when going backward, a process can only move along the path representing the history that brought the process to the current state.For example, if <a, λ>.0 ∅ <b, µ>.0 performs a before b, then a and b can be undone in any order from <a, λ>[i].0∅ <b, µ>[j].0 because there is no causality constraint between the two actions, but history is preserved only if b is undone before a.To accomplish this, bisimilarity has to be defined over computations, not over states, and the notion of transition has to be suitably revised.We start by adapting the notation of the nondeterministic setting of [DMV90] to our stochastic setting.
In the considered action-labeled CTMC (S, A × R, − →), we work with the set U of runs in lieu of S. Furthermore, we view the transition relation − → as being symmetric with respect to source and target states, so that every transition can be traversed in both directions.In the setting of RMPC, this amounts to considering only the forward transition relation thanks to Lemma 4.1.Given a run ρ, an action a, and a bisimulation equivalence class C, based on [DMV90] we distinguish between the total rate of outgoing and incoming run transitions, respectively, when moving between ρ and C via a.Forward and backward Markovian bisimilarity thus relies on checking both outgoing and incoming rate equalities.Definition 5.4 (forward and backward Markovian bisimilarity).Two states s 1 , s 2 ∈ S are forward and backward Markovian bisimilar, written s 1 ∼ FBMB s 2 , iff there exists a forward and backward Markovian bisimulation B such that ((s 1 , ), (s 2 , )) ∈ B. An equivalence relation B over the set of runs U is a forward and backward Markovian bisimulation iff, whenever (ρ 1 , ρ 2 ) ∈ B, then for all actions a ∈ A and equivalence classes C ∈ U/B: Proof.This example suggests that rate-based quantitative aspects should be neglected when going backward.Indeed, summing up rates when considering transitions departing from the same state is consistent with the fact that the sojourn time in that state is exponentially distributed with rate given by the sum of the rates of the outgoing transitions.Operationally, as mentioned at the end of Section 4.2, this can be interpreted as if there were a race among those transitions to decide which one will be executed, with each transition having a winning probability proportional to its rate.This race interpretation no longer applies in the backward direction, as we sum up rates of transitions that may depart from different states.We therefore consider a variant of ∼ FBMB that abstracts from time when going backward.It is worth noting that, if it abstracted from time also when going forward, then we would precisely obtain the strong back and forth bisimilarity of [DMV90].We conclude by showing that ∼ FTABMB -which is defined on runs, compares for any action both outgoing total rates and the existence of incoming transitions, and preserves history when going backward even in the presence of concurrent transitions -coincides with the standard ∼ MB -which is defined on states and compares for any action only outgoing total rates -thus generalizing the first result of [DMV90] to our stochastic setting.As a consequence, when lifted to P, the former equivalence inherits the compositionality properties 7. Conclusions After Landauer [Lan61] and Bennett [Ben73], reversible computing has attracted a growing attention mainly for the possibility of building energy efficient circuits.Nowadays, the interest has spread into many application areas and hence reversible computing requires a deep investigation of its theoretical foundations in computer science.There exist different interpretations of reversibility in the literature.In this paper, we have addressed our research quest towards bridging causal reversibility [DK04, DK05] -developed in concurrency theory -and time reversibility [Kel79] -originated for the efficient analysis of stochastic processes.
We have accomplished this in the setting of process algebra because it constitutes a common ground for concurrency theory and probability theory [LS91,Hil96].Specifically, we have introduced the stochastic process calculus RMPC, whose syntax and semantics follow the approach of [PU07], with the aim of paving the way to concurrent system models that are causally reversible and time reversible by construction.Causal reversibility has been proved by exploiting the technique of [LPU20] after importing in the setting of [PU07] some notions coming from [DK04].Time reversibility has been shown under the constraint that every backward rate is equal to the corresponding forward rate -regardless of the syntactical structure of processes -or that parallel composition cannot occur within the scope of action prefix or choice -regardless of the values of backward rates -and has allowed us to inherit from [MR15] a product form result that enables the efficient calculation of performance measures.Finally, as far as Markovian bisimilarity [Hil96] is concerned, we have developed two forward and backward variants inspired by [DMV90], with the former preserving the expansion law and the latter preserving a stochastic variant of the idempotency law too.
There are several lines of research that we plan to undergo, ranging from the application of our results to case studies modeled with RMPC to the development of further theoretical results possibly admitting the presence of irreversible actions.In particular, we would like to investigate further conditions under which time reversibility is achieved.Our conjecture is that time reversibility should hold for the entire set of RMPC reachable processes regardless of their backward rates and syntactical structure.This would imply that the methodology of [PU07] for reversing process calculi -which we have followed in this paper -is fully robust not only with respect to causal reversibility, but also with respect to time reversibility.
Moreover, we wish to find a suitable way of adding recursion to the syntax of RMPC.From the point of view of the ergodicity of the underlying CTMC, the absence of recursion is not a problem because every forward transition has the corresponding backward transition by construction.However, there might be situations in which recursion is necessary to appropriately describe the behavior of a system.Because of the use of communication keys, a simple process of the form P <a, λ>.P , whose standard labeled transition system features a single state with a self-looping transition, produces a sequence of infinitely many distinct states even if we resort to transition bundles.Our claim is that the specific cooperation operator that we have considered may require a mechanism lighter than communication keys to keep track of past actions, which may avoid the generation of an infinite state space in the presence of recursion.