Fall 98, CSE 520:
Lecture 25 (Oct 19)
The Honda-Tokoro encoding for the output prefix
Honda and Tokoro have proposed in 1993 a calculus similar
to what has been called later "the asynchronous pi-calculus",
and have shown that the output-prefix construct of the
pi-calculus can be encoded in their language.
We give here the version of their encoding adapted to the
syntax of the polyadic pi-calculus. "Polyadic" means that
the input and output actions can have 0, 1, or more
arguments. The arguments are passed all together at the
moment of the communication.
Intuitively, the encoding is based on the idea of
simulating synchronous communication via asynchronous
communication and acknowledgement messages: the sender
will first send its message (asynchronously), and then wait
for an acknowledgement from the receiver.
The encoding is compositional, i.e. the encoding of a compound
process is defined in terms of the encoding of the components.
Formally, the encoding is a mapping [[.]] from the
set of the pi-calculus processes (without "+") into the
set of the polyadic asynchronous pi-calculus processes.
It is defined compositionally as follows:
The interesting part of the encoding are the last two
formulas. The translated processes behave as follows:
the sender sends, together with
the intended name y, also a private name "a" which will be used
as the acknowledgement channel.
The sender will not proceed until it receives
the acknowledgement from the receiver,
thus simulating the behaviour of output prefix.
Correspondingly, the receiver has two parameters z and w;
z is for the intended name (y), w is for the acknowledgement
channel (a). After the receive action has taken place, the
receiver will send an acknowledgement in form of an output
action on w.
- [[ 0 ]] = 0
- [[ P|Q ]] = [[P]] | [[Q]]
- [[ C ]] = C and C =def= P becomes C =def= [[P]]
- [[ (x)P ]] = (x)[[P]]
- [[ [x=y]P ]] = [x=y][[P]]
- [[ x^y.P ]] = (a)(x^y a | a( ).[[P]])
- [[ x(z).Q ]] = x(z,w).( w^ | [[Q]] )
Note that in this encoding we use the restriction operator of
the pi-calculus, which has the possibility of enlarging the
scope during communication (scope extrusion).
Thanks to this mechanism, the process
((a)( x^y a | a( ).[[P]] )) | x(z,w).( w^ | [[Q]] )
(which represents the encoding of [[ x^y.P | x(z).Q ]])
will become, after communication,
(a) ( a( ).[[P]] | ( a^ | [[ Q[y/z] ]] )).
Note that it is important that "a" (the acknowledgement channel)
is private between the sender and the receiver, because we
don't want interference with other processes possibly present in the
environment and using the same name.
Note that the same encoding could not be written in CCS
(at least not compositionally) because of the impossibility of
expressing scope-extrusion in CCS.