Skip to main content Accessibility help
×
Hostname: page-component-5b777bbd6c-sbgtn Total loading time: 0 Render date: 2025-06-20T04:26:21.188Z Has data issue: false hasContentIssue false

16 - Interpreting Typed λ-calculi

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

In this chapter we show that the encodings of the previous chapter can be extended to encodings of typed λ-calculi. To do this we have to define translations on types to match those on terms. We analyse the case of the simply-typed λ-calculus in detail, and discuss subtyping and recursive types. For studies of other type systems, see the notes at the end of the Part.

16.1 Typed λ-calculus

In a core simplv-typed λ-calculus, types are built from basic types, such as integers and booleans, using the function type constructor. The syntax of terms is that of the untyped λ-calculus plus basic constants. Each constant has a unique predefined type. We use only constants of basic types: this is sufficient to have a non-empty set of (closed) well-typed terms. This simplv-typed λ-calculus is presented in Table 16.1. We write Λ{c} for the set of terms of the calculus. As usual, function type associates to the right, so TSU should be read T(SU). Basic types are ranged over by t, basic constants by c. The reduction relation and the reduction strategies are defined as for the untyped calculus; the only difference is that the set of values for a reduction strategy normally contains the constants. We call the typed versions of λV and λN simply-typed call-by-valueV) and simply-typed call-by-nameN), respectively.

We add the same basic constants and basic types to HOπ and π-calculus and repeat the diagram of Figure 15.1, this time for λV and λN. We show how to extend the encodings of λV and λN (from Sections 15.3 and 15.4), and their correctness results, to take account of types. The encodings in Sections 15.5-15.7 can be extended similarly.

Lemma 16.1.1 In the simplv-typed λ-calculus, for every Γ and M there is at most one T such that Γ M : T .

16.2 The interpretation of typed call-by-value

We begin with the left part of Figure 15.1, which concerns λV We follow a schema similar to that of Section 15.3, pointing out the main additions.

Type
Chapter
Information
The Pi-Calculus
A Theory of Mobile Processes
, pp. 469 - 476
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.

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.

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.

Available formats
×