<p>This is a really interesting question and only partially understood.
The $
\newcommand{\OUT}[2]{\overline{#1} #2 }    
$ precise answer to such questions depends in subtle ways on exactly what the ambient $\pi$-calculus is and exactly what feature you are encoding. </p>

<p>For <strong>sums</strong>  you need to realise that there are different kinds of sums for example input guarded sums like $x(v).P + x(v).Q$ or $x(v).P + y(v).Q$, or 
mixed sums like $x(v).P + \OUT{y}{v}.Q$ or even $x(v).P + \OUT{y}{v}.Q + \tau.R$. What you can and cannot encode really depends on what sums you have. The groundbreaking study (1) gives hard limits to &#39;good&#39; encodings. Simplifying greatly, what (1) shows is that adding mixed sums to a calculus strictly increases expressivity. This it cannot be encoded (in a nice way). The reason is that mixed sums allow a certain form of symmetry breaking that is not achievable in conventional $\pi$-calculi without mixed choice.</p>

<p>With <strong>sequential composition</strong> $P; Q$ the situation is less complicated, but you need to be clear exactly what sequential means for parallel processes and replication/recursion:</p>

<ul>
<li><p>Should $R$ begin to execute when one or both of $P$ and $Q$ terminate in $(P|Q); R$?</p></li>
<li><p>What is the meaning of $(!x(v).P); R$?</p></li>
</ul>

<p>If $(P|Q); R$ means that both $P$ and $Q$ must terminate before $R$ goes to work, and if we disallow sequential composition like $(!x(v).P); R$ with replication, then $P; Q$ is easily encodable, and by (1) it cannot simulate general forms of sums that include mixed sums.</p>

<p><strong>The curse of Turing completeness.</strong> There is a further complication. Process calculi typically are  Turing-complete, hence any feature can be &#39;somehow&#39; be encoded. So you need to be very precise about what you mean when you ask if some calculus is &quot;equivalent&quot; to some other. The usual approach to making this precise is to constrain admissible encodings, e.g. to require them to be compositional, or preserve termination, or be closed under renaming, or any number of other interesting structural properties. For different concepts of admissible encoding you tend to get different answers.
None of this is germane to process calculi, Turing&#39;s curse affects all programming languages, but process calculi are especially subtle, since they can do so much more than mere sequential computation.</p>

<p>For an overview of the state-of-the art in process calculus expressivity, see (2, 3).</p>

<hr>

<p>(1) C. Palamidessi, <a href="http://arxiv.org/abs/1307.2062" rel="nofollow">Comparing the Expressive Power of the Synchronous and the Asynchronous π-Calculi</a>.</p>

<p>(2) D. Gorla, <a href="http://wwwusers.di.uniroma1.it/~gorla/papers/G-IC08.pdf" rel="nofollow">Comparing Communication Primitives via their Relative Expressive Power</a>.</p>

<p>(3) D. Gorla, <a href="http://wwwusers.di.uniroma1.it/~gorla/papers/G-DC10.pdf" rel="nofollow">A Taxonomy of Process Calculi for Distribution and Mobility</a>.</p>

CC BY-SA 3.0
2015-07-14T07:45:07.900Z
Martin, the first version of your answer was good, this one is awesome :) Thanks a lot! Now I only wonder whether $C$ is already Turing complete. I did find the definition of the $pi$ calculus only with $C$ in http://web.cs.ucdavis.edu/~su/teaching/ecs240-w15/readings/pierce-crchandbook.pdf, and it suggests being Turing complete, but it is not stated explicitly. Is it Turing complete?
DaveBall aka user750378
CC BY-SA 3.0
2015-07-14T09:21:44.190Z
I have checked (2), which talks about Turing completeness. It includes, however, conditional evaluation as basic operator. So I only know that $C$ with summation is Turing complete.
DaveBall aka user750378
CC BY-SA 3.0
2015-07-14T10:12:48.150Z
You mean the $\pi$-calculus in Figure 2 of Pierce's paper? Yes that's definitely Turing-complete. You can easily encode the $\lambda$-calculus in it, using the encoding from Milner's [Functions as processes](https://hal.inria.fr/inria-00075405/en/). You can code up if/then/else as pure interaction without sums.
Martin Berger
CC BY-SA 3.0
2015-07-13T16:29:58.357Z
2015-08-01T12:11:48.023Z
2015-08-01T12:11:48.023Z
Martin Berger
<p>There are several definitions of what basic operators constitute the pi calculus  (see papers from R. Milner, B.Pierce, J.Wing). </p>

<p>The common basic operators ($C$) are:</p>

<ul>
<li>the parallel composition </li>
<li>reading from a named channel</li>
<li>writing to a named channel</li>
<li>restriction to get a new named channel</li>
<li>replication to get an infinite number of parallel copies of a process</li>
<li>the inert process that does nothing.</li>
</ul>

<p>Sometimes, there is additionally one of the following two operator mentioned as basic operator:</p>

<ul>
<li>the sequential operator for sequential execution;</li>
<li>the summation operator to choose between processes.</li>
</ul>

<p>Is $C$ together with the sequential operator equivalent to $C$ with the summation operator? Are they even equivalent to $C$ without any further operator? Why (not)?</p>

<formal-modeling><process-algebra><pi-calculus>
Can choice or sequential execution be expressed with other basic operators of the pi calculus?
DaveBall aka user750378
# Can choice or sequential execution be expressed with other basic operators of the pi calculus?

(Asked by: username_0 on 2015-07-13)

There are several definitions of what basic operators constitute the pi calculus (see papers from R. Milner, B.Pierce, J.Wing).

The common basic operators ($C$) are:

* the parallel composition
* reading from a named channel
* writing to a named channel
* restriction to get a new named channel
* replication to get an infinite number of parallel copies of a process
* the inert process that does nothing.

Sometimes, there is additionally one of the following two operator mentioned as basic operator:

* the sequential operator for sequential execution;
* the summation operator to choose between processes.

Is $C$ together with the sequential operator equivalent to $C$ with the summation operator? Are they even equivalent to $C$ without any further operator? Why (not)?

**Tags:** formal-modeling, process-algebra, pi-calculus


---

## 1 answers

### Answer by username_1 on 2015-07-13. Score: 8 | Accepted answer

This is a really interesting question and only partially understood.
The $
\newcommand{\OUT}[2]{\overline{#1} #2 }
$ precise answer to such questions depends in subtle ways on exactly what the ambient $\pi$-calculus is and exactly what feature you are encoding.

For **sums** you need to realise that there are different kinds of sums for example input guarded sums like $x(v).P + x(v).Q$ or $x(v).P + y(v).Q$, or
mixed sums like $x(v).P + \OUT{y}{v}.Q$ or even $x(v).P + \OUT{y}{v}.Q + \tau.R$. What you can and cannot encode really depends on what sums you have. The groundbreaking study (1) gives hard limits to 'good' encodings. Simplifying greatly, what (1) shows is that adding mixed sums to a calculus strictly increases expressivity. This it cannot be encoded (in a nice way). The reason is that mixed sums allow a certain form of symmetry breaking that is not achievable in conventional $\pi$-calculi without mixed choice.

With **sequential composition** $P; Q$ the situation is less complicated, but you need to be clear exactly what sequential means for parallel processes and replication/recursion:

* Should $R$ begin to execute when one or both of $P$ and $Q$ terminate in $(P|Q); R$?
* What is the meaning of $(!x(v).P); R$?

If $(P|Q); R$ means that both $P$ and $Q$ must terminate before $R$ goes to work, and if we disallow sequential composition like $(!x(v).P); R$ with replication, then $P; Q$ is easily encodable, and by (1) it cannot simulate general forms of sums that include mixed sums.

**The curse of Turing completeness.** There is a further complication. Process calculi typically are Turing-complete, hence any feature can be 'somehow' be encoded. So you need to be very precise about what you mean when you ask if some calculus is "equivalent" to some other. The usual approach to making this precise is to constrain admissible encodings, e.g. to require them to be compositional, or preserve termination, or be closed under renaming, or any number of other interesting structural properties. For different concepts of admissible encoding you tend to get different answers.
None of this is germane to process calculi, Turing's curse affects all programming languages, but process calculi are especially subtle, since they can do so much more than mere sequential computation.

For an overview of the state-of-the art in process calculus expressivity, see (2, 3).

---

(1) C. Palamidessi, [Comparing the Expressive Power of the Synchronous and the Asynchronous π-Calculi](http://arxiv.org/abs/1307.2062).

(2) D. Gorla, [Comparing Communication Primitives via their Relative Expressive Power](http://wwwusers.di.uniroma1.it/~gorla/papers/G-IC08.pdf).

(3) D. Gorla, [A Taxonomy of Process Calculi for Distribution and Mobility](http://wwwusers.di.uniroma1.it/~gorla/papers/G-DC10.pdf).

> **Comments:**
> **username_0**: Martin, the first version of your answer was good, this one is awesome :) Thanks a lot! Now I only wonder whether $C$ is already Turing complete. I did find the definition of the $pi$ calculus only with $C$ in http://web.cs.ucdavis.edu/~su/teaching/ecs240-w15/readings/pierce-crchandbook.pdf, and it suggests being Turing complete, but it is not stated explicitly. Is it Turing complete?  
> **username_0**: I have checked (2), which talks about Turing completeness. It includes, however, conditional evaluation as basic operator. So I only know that $C$ with summation is Turing complete.  
> **username_1**: You mean the $\pi$-calculus in Figure 2 of Pierce's paper? Yes that's definitely Turing-complete. You can easily encode the $\lambda$-calculus in it, using the encoding from Milner's [Functions as processes](https://hal.inria.fr/inria-00075405/en/). You can code up if/then/else as pure interaction without sums.  

---

