Skip to main content Accessibility help
×
Hostname: page-component-5b777bbd6c-gcwzt Total loading time: 0 Render date: 2025-06-19T10:46:13.369Z Has data issue: false hasContentIssue false

9 - Groundwork

Published online by Cambridge University Press:  29 May 2025

Davide Sangiorgi
Affiliation:
Institut National de Recherche en Informatique et en Automatique (INRIA), Rocquencourt
David Walker
Affiliation:
University of Oxford
Get access

Summary

9.1 Using types to obtain encapsulation

It is desirable that a language, whether sequential or parallel, should have facilities for encapsulation, that is, features that make it possible to constrain access to components such as data and resources. The need for encapsulation led to the development of abstract data types. Encapsulation is also a key feature of objects in object-oriented languages.

In CCS, encapsulation is achieved by the restriction operator. Restricting a name x on a process P, written (using π-calculus notation) vx P, guarantees that interactions along x between subcomponents of P occur without interference from outside. For instance, suppose we have two 1-place buffers, Buf1 and Buf2. Suppose Buf1 receives values along a name x and resends them along y, whereas Buf2 receives at y and resends at z. They can be composed into a 2-place buffer that receives at x and resends at z thus: vy (Buf1 | Buf2). Here, the restriction ensures that actions at y from Buf1 and Buf2 are not consumed by the external environment. With the formal definitions of Buf1 and Buf2 at hand, one can indeed prove that the system vy (Buf1 | Buf2) is behaviourally equivalent to a 2-place buffer.

The restriction operator provides a quite satisfactory level of protection in CCS, where the visibility of names in processes is fixed. By contrast, restriction alone is very often not satisfactory in the π-calculus, where the visibility of names can change dynamically. Here are two examples.

Example 9.1.1 (A printer with mobile ownership) Consider a situation in which several client processes cooperate in the use of a shared resource such as a printer. Data are sent for printing by the client processes along a name p. Clients can also communicate name p so that new clients can get access to the printer. Suppose that initially there are two clients

and therefore, writing P for the printer process, the initial system is

One might wish to prove that when Cl's print jobs, represented by j1 and j2, are delivered, they are received and processed in that order by the printer.

Type
Chapter
Information
The Pi-Calculus
A Theory of Mobile Processes
, pp. 313 - 328
Publisher: Cambridge University Press
Print publication year: 2001

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Book purchase

Temporarily unavailable

Save book to Kindle

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.

  • Groundwork
  • Davide Sangiorgi, Institut National de Recherche en Informatique et en Automatique (INRIA), Rocquencourt, David Walker, University of Oxford
  • Book: The Pi-Calculus
  • Online publication: 29 May 2025
  • Chapter DOI: https://doi.org/10.1017/9781316134924.019
Available formats
×

Save book 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 Dropbox.

  • Groundwork
  • Davide Sangiorgi, Institut National de Recherche en Informatique et en Automatique (INRIA), Rocquencourt, David Walker, University of Oxford
  • Book: The Pi-Calculus
  • Online publication: 29 May 2025
  • Chapter DOI: https://doi.org/10.1017/9781316134924.019
Available formats
×

Save book to Google Drive

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.

  • Groundwork
  • Davide Sangiorgi, Institut National de Recherche en Informatique et en Automatique (INRIA), Rocquencourt, David Walker, University of Oxford
  • Book: The Pi-Calculus
  • Online publication: 29 May 2025
  • Chapter DOI: https://doi.org/10.1017/9781316134924.019
Available formats
×