Published online by Cambridge University Press: 29 May 2025
This chapter and the next present various interpretations of λ-calculus strategies into the π-calculus. All the interpretations have two common features:
• Function application is translated as a form of parallel combination of two processes, the function and its argument, and β-reduction is modelled as an interaction between them.
• The encoding of a λ-term is parametric over a name. This name is used by (the translation of) the λ-term to interact with the environment.
In Section 14.2.1 we observed that a redex of the λ-calculus gives rise to a private interaction between two terms. In contrast, a redex of the π-calculus is susceptible to interference from the environment. This interference is avoided if the name used by the two processes to communicate is private to them. Therefore, the appearance of a β-redex in a λ-term should correspond, in the π-calculus translation of that term, to the appearance of two processes that can communicate along a private name. We also observed in Section 14.2.1 that the β rule of the λ-calculus is strongly asymmetric. In all encodings, the λ-terms are mapped onto processes of the Asynchronous π-calculus, the asymmetry of whose communication rule reflects that of the λ-calculus.
A name parameter is needed in the π-calculus encodings of λ-terms for the following reason. Roughly speaking, in the λ-calculus, λ is the only port; a λ-term receives its argument at λ. In the π-calculus, there are many ports (the names), so one needs to specify at which port (the encoding of) a λ-term interacts with its environment.
15.1 Continuation Passing Style
The parameter of the π-calculus encoding of a function can also be thought of as a continuation. In functional languages, a continuation is a parameter of a function that represents the ‘rest’ of the computation. Functions taking continuations as arguments are called functions in Continuation Passing Style (briefly CPS functions), and have a special syntactic form: they terminate their computation by passing the result to the continuation. The continuation parameter may also be thought of as an address to which the result of the function is to be delivered.
To save this book to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Find out more about the Kindle Personal Document Service.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.