An Algebraic Treatment of Recursion
Rob van Glabbeek

TL;DR
This paper reviews the main methods for defining recursion in process algebra and extends the algebraic approach to handle unguarded recursion, providing a comprehensive algebraic framework.
Contribution
It introduces an extension of the algebraic method to accommodate unguarded recursion in process algebra.
Findings
Extended algebraic approach to unguarded recursion
Unified view of denotational, operational, and algebraic methods
Enhanced algebraic framework for recursion
Abstract
I review the three principal methods to assign meaning to recursion in process algebra: the denotational, the operational and the algebraic approach, and I extend the latter to unguarded recursion.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Formal Methods in Verification · Logic, Reasoning, and Knowledge
An Algebraic Treatment of Recursion
Rob van Glabbeek Data61, CSIRO, Sydney, AustraliaSchool of Computer Science and Engineering, University of New South Wales, Sydney, Australia
Abstract
I review the three principal methods to assign meaning to recursion in process algebra: the denotational, the operational and the algebraic approach, and I extend the latter to unguarded recursion.
Jan Bergstra has put his mark on theoretical computer science by a consistent stream of original ideas, controversial opinions, and novel approaches. He sometimes reorganised the arena, enabling others to follow. I, for one, might never have entered computer science if it wasn’t for Jan’s support and encouragement, and will never forget the team spirit in the early days of process algebra in his group at CWI. This paper is dedicated to Jan, at the occasion of his 65th birthday and retirement.
1 Process Algebra
In process algebra, processes are often modelled as closed terms of single-sorted specification languages.
Definition 1.1**.**
signatures Let be a set of variables. A signature is a set of pairs of a function symbol and an arity . The set of terms over a signature is generated by:
- •
,
- •
if and then ,
- •
If , and , then \raisebox{0.0pt}[0.0pt][0.0pt]{\stackrel{{\scriptstyle\mbox{\tiny}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny}}}!!X|\mathcal{S}!!\stackrel{{\scriptstyle\mbox{\tiny}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny}}}}\in\mathbbm{T}(\Sigma).
A function as appears in the last clause is called a recursive specification. A recursive specification is often displayed as . An occurrence of a variable in a term is free if it does not occur in a subterm of the form \stackrel{{\scriptstyle\mbox{\tiny/}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny\backslash}}}\!\!X|\mathcal{S}\!\!\!\stackrel{{\scriptstyle\mbox{\tiny\backslash}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny/}}} with . A term is closed if it contains no free occurrences of variables.
The semantics of such a language is a function \mbox{[[}\,\_\,\mbox{]]}:\mathbbm{T}(\Sigma)\rightarrow(\mathbbm{D}^{\it Var}\rightarrow\mathbbm{D}). It assigns to every term its meaning \mbox{[[}\,t\,\mbox{]]}\in\mathbbm{D}^{\it Var}\!\rightarrow\mathbbm{D}. The meaning of a closed term is a value chosen from a class of values , called a domain. The meaning of an open term is a -ary operator on : a function of type . It associates a value \mbox{[[}\,t\,\mbox{]]}(\rho)\mathbin{\in}\mathbbm{D} to that depends on the choice of a valuation .
Sometimes, only a subset of is given a semantics, for instance by restricting to terms satisfying a syntactic criterion of guardedness.
Another approach lacks the recursion construct itself, but declares a single recursive specification for the entire language [5]. A term in such a language can be seen as a the term \stackrel{{\scriptstyle\mbox{\tiny/}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny\backslash}}}\!\!t|\mathcal{S}\!\!\stackrel{{\scriptstyle\mbox{\tiny\backslash}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny/}}}, obtained from by substituting, for each , \stackrel{{\scriptstyle\mbox{\tiny/}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny\backslash}}}\!\!Y|\mathcal{S}\!\!\stackrel{{\scriptstyle\mbox{\tiny\backslash}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny/}}} for each occurrence of . Conversely, each term in the general language of Definition LABEL:df:signatures can be converted into the form \stackrel{{\scriptstyle\mbox{\tiny/}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny\backslash}}}\!\!t|\mathcal{S}\!\!\stackrel{{\scriptstyle\mbox{\tiny\backslash}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny/}}} with and recursion-free.
2 Denotational, Operational and Algebraic Semantics
The standard (denotational) semantics assigns to each function an -ary operator . The semantics of a recursion-free expression is then given by
- •
\mbox{[[}\,X\,\mbox{]]}(\rho)=\rho(X) for , and
- •
\mbox{[[}\,f(t_{\_}1,\dots,t_{\_}n)\,\mbox{]]}(\rho)=f_{\_}n^{\mathbbm{D}}(\mbox{[[}\,t_{\_}1\,\mbox{]]}(\rho),\dots,\mbox{[[}\,t_{\_}n\,\mbox{]]}(\rho)) for .
Three approaches appear in the literature to give semantics to recursion.
The denotational approach [3] recognises \mbox{[[}\,\mathcal{S}\,\mbox{]]} as having type and defines \mbox{[[}\,\raisebox{0.0pt}[0.0pt][0.0pt]{\stackrel{{\scriptstyle\mbox{\tiny}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny}}}!!X|\mathcal{S}!!\stackrel{{\scriptstyle\mbox{\tiny}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny}}}}\,\mbox{]]}(\rho) for to be the -component of the least fixed point of \mbox{[[}\,\mathcal{S}\,\mbox{]]}(\rho). For this least fixed point to exists, either , equipped with a suitable preorder , needs to be a complete lattice, with the operators monotonic, or be a c.p.o., with the continuous, or be a complete metric space, with the contracting (or some variation on this theme).
The operational approach [5] is based on a set of inference rules that derive a collection of (labelled) transitions between closed terms. The semantic domain is now the collection of process graphs , with a set of states, a set of transitions between states, and an initial state, possibly subject to some cardinality restrictions. The operational semantics \mbox{[[}\,P\,\mbox{]]} of a closed term takes to be the set of closed terms, , and the derivable transitions. The semantics of open terms can be dealt with by encoding the process graphs for as constants in an appropriate extension of the process algebra. This approach covers the meaning of recursion constructs too.
Let guardedness be a criterion on recursive specifications, such that if is guarded then is has a unique solution, meaning that if for are valuations with for all , and \rho_{\_}i(X)=\mbox{[[}\,\mathcal{S}_{\_}X\,\mbox{]]}(\rho_{\_}i) for all , then for all . The algebraic approach [2] yields a semantics for terms with guarded recursion only, where \mbox{[[}\,\raisebox{0.0pt}[0.0pt][0.0pt]{\stackrel{{\scriptstyle\mbox{\tiny}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny}}}!!X|\mathcal{S}!!\stackrel{{\scriptstyle\mbox{\tiny}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny}}}}\,\mbox{]]}(\rho) for is the -component of the unique solution of \mbox{[[}\,\mathcal{S}\,\mbox{]]}(\rho).
3 Extending the Algebraic Approach to Unguarded Recursion
In [4] I proposed an extension of the algebraic approach to unguarded recursion. An expression \stackrel{{\scriptstyle\mbox{\tiny/}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny\backslash}}}\!\!X|\mathcal{S}\!\!\stackrel{{\scriptstyle\mbox{\tiny\backslash}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny/}}} is seen as a kind of variable, only ranging over the solutions of . Taking for example ACP [2], interpreted in a domain of process graphs modulo strong bisimilarity [2], then \stackrel{{\scriptstyle\mbox{\tiny/}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny\backslash}}}\!\!X|X=aX\!\!\stackrel{{\scriptstyle\mbox{\tiny\backslash}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny/}}} is a case of guarded recursion and denotes a specific process, namely an -loop. On the other hand, \stackrel{{\scriptstyle\mbox{\tiny/}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny\backslash}}}\!\!X|X=X\!\!\stackrel{{\scriptstyle\mbox{\tiny\backslash}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny/}}} is an unguarded recursion, and seen a variable ranging over all processes, just like itself. In between, \stackrel{{\scriptstyle\mbox{\tiny/}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny\backslash}}}\!\!X|X=X+aX\!\!\stackrel{{\scriptstyle\mbox{\tiny\backslash}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny/}}} is a case of unguarded recursion, and seen as a variable ranging over all processes of the form .
To avoid ambiguity in deciding when two, almost identical, processes \stackrel{{\scriptstyle\mbox{\tiny/}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny\backslash}}}\!\!X|\mathcal{S}\!\!\stackrel{{\scriptstyle\mbox{\tiny\backslash}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny/}}} denote the same variable or different ones, here I formalise this approach only for terms \stackrel{{\scriptstyle\mbox{\tiny/}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny\backslash}}}\!\!t|\mathcal{S}\!\!\stackrel{{\scriptstyle\mbox{\tiny\backslash}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny/}}} where no further recursion occurs in or , thus following the second approach of Section 1.
A valuation is compatible with a recursive specification iff \rho(Y)=\mbox{[[}\,\mathcal{S}_{\_}Y\,\mbox{]]}(\rho) for all . The meaning \mbox{[[}\,t\,\mbox{]]} of a recursion-free term in the context of a global recursive specification is now a function into from the set of compatible valuations only. It is obtained from the semantics of from Section 2 by restricting {\it dom}(\mbox{[[}\,t\,\mbox{]]}) to the compatible valuations.
In particular, an equation holds under this semantics iff \mbox{[[}\,t\,\mbox{]]}(\rho)=\mbox{[[}\,u\,\mbox{]]}(\rho) for all valuations compatible with . Hence it is equivalent to the conditional equation .
The laws of process algebra remain valid in this approach, including the congruence property for recursion: if \mbox{[[}\,\mathcal{S}_{\_}X\,\mbox{]]}(\rho)=\mbox{[[}\,\mathcal{S}^{\prime}_{\_}X\,\mbox{]]}(\rho) for all valuations , and all then \mbox{[[}\,\raisebox{0.0pt}[0.0pt][0.0pt]{\stackrel{{\scriptstyle\mbox{\tiny}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny}}}!!t|\mathcal{S}!!\stackrel{{\scriptstyle\mbox{\tiny}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny}}}}\,\mbox{]]}=\mbox{[[}\,\raisebox{0.0pt}[0.0pt][0.0pt]{\stackrel{{\scriptstyle\mbox{\tiny}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny}}}!!t|\mathcal{S}^{\prime}!!\stackrel{{\scriptstyle\mbox{\tiny}}}{{\raisebox{-1.29167pt}[1.29167pt]{\tiny}}}}\,\mbox{]]}.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1]
- 2[2] J.A. Bergstra & J.W. Klop (1986): Algebra of Communicating Processes . In de Bakker, Hazewinkel & Lenstra, editors: Mathematics & Computer Science I , CWI Monograph 1, North-Holland, pp. 89–138.
- 3[3] S.D. Brookes, C.A.R. Hoare & A.W. Roscoe (1984): A theory of communicating sequential processes . Journal of the ACM 31(3), pp. 560–599, 10.1145/828.833 . · doi ↗
- 4[4] R.J. van Glabbeek (1987): Bounded nondeterminism and the approximation induction principle in process algebra . In F. Brandenburg, G. Vidal-Naquet & M. Wirsing, editors: Proc. STACS’87, LNCS 247, Springer, pp. 336–347, 10.1007/B Fb 0039617 . · doi ↗
- 5[5] R. Milner (1989): Communication and Concurrency . Prentice Hall, Englewood Cliffs.
