Types and Programming Languages

by Pierce

ISBN: 9780262256810 | Copyright 2002

Click here to preview

Instructor Requests

Digital Exam/Desk Copy Print Desk Copy Ancillaries
Tabs

A type system is a syntactic method for automatically checking the absence of certain erroneous behaviors by classifying program phrases according to the kinds of values they compute. The study of type systems—and of programming languages from a type-theoretic perspective—has important applications in software engineering, language design, high-performance compilers, and security.

This text provides a comprehensive introduction both to type systems in computer science and to the basic theory of programming languages. The approach is pragmatic and operational; each new concept is motivated by programming examples and the more theoretical sections are driven by the needs of implementations. Each chapter is accompanied by numerous exercises and solutions, as well as a running implementation, available via the Web. Dependencies between chapters are explicitly identified, allowing readers to choose a variety of paths through the material.

The core topics include the untyped lambda-calculus, simple type systems, type reconstruction, universal and existential polymorphism, subtyping, bounded quantification, recursive types, kinds, and type operators. Extended case studies develop a variety of approaches to modeling the features of object-oriented languages.

Types are the leaven of computer programming; they make it digestible. This excellent book uses types to navigate the rich variety of programming languages, bringing a new kind of unity to their usage, theory, and implementation. Its author writes with the authority of experience in all three of these aspects.

Robin Milner Computer Laboratory, University of Cambridge

Written by an outstanding researcher, this book is well organized and very clear, spanning both theory and implementation techniques, and reflecting considerable experience in teaching and expertise in the subject.

John Reynolds School of Computer Science, Carnegie Mellon University

Types and Programming Languages is carefully written with a well-balanced choice of topics. It focusses on pragmatics, with the right level of necessary theory. The exercises in this book range from easy to challenging and provide stimulating material for beginning and advanced readers, both programmers and the more theoretically minded.

Henk Barendregt Faculty of Science, Mathematics, and Computer Science, University of Nijmegen, The Netherlands

Over the last two decades type theory has emerged as the central, unifying framework for research in programming languages. But these remarkable advances are not as well-known as they should be. The rapid advance of research on type systems for programming languages has far outpaced its dissemination to the rest of the field. No more. Pierce's book not only provides a comprehensive account of types for programming languages, but it does so in an engagingly elegant and concrete style that places equal emphasis on theoretical foundations and the practical problems of programming. This book will be the definitive reference for many years to come.

Robert Harper Professor, Computer Science Department, Carnegie Mellon University
Expand/Collapse All
Contents (pg. v)
Preface (pg. xiii)
1 Introduction (pg. 1)
2 Mathematical Preliminaries (pg. 15)
I Untyped Systems (pg. 21)
3 Untyped Arithmetic Expressions (pg. 23)
4 An ML Implementation of Arithmetic Expressions (pg. 45)
5 The Untyped Lambda-Calculus (pg. 51)
6 Nameless Representation of Terms (pg. 75)
7 An ML Implementation of the Lambda-Calculus (pg. 83)
II Simple Types (pg. 89)
8 Typed Arithmetic Expressions (pg. 91)
9 Simply Typed Lambda-Calculus (pg. 99)
10 An ML Implementation of Simple Types (pg. 113)
11 Simple Extensions (pg. 117)
12 Normalization (pg. 149)
13 References (pg. 153)
14 Exceptions (pg. 171)
III Subtyping (pg. 179)
15 Subtyping (pg. 181)
16 Metatheory of Subtyping (pg. 209)
17 An ML Implementation of Subtyping (pg. 221)
18 Case Study: Imperative Objects (pg. 225)
19 Case Study: Featherweight Java (pg. 247)
IV Recursive Types (pg. 265)
20 Recursive Types (pg. 267)
21 Metatheory of Recursive Types (pg. 281)
V Polymorphism (pg. 315)
22 Type Reconstruction (pg. 317)
23 Universal Types (pg. 339)
24 Existential Types (pg. 363)
25 An ML Implementation of System F (pg. 381)
26 Bounded Quantification (pg. 389)
27 Case Study: Imperative Objects, Redux (pg. 411)
28 Metatheory of Bounded Quantification (pg. 417)
VI Higher-Order Systems (pg. 437)
29 Type Operators and Kinding (pg. 439)
30 Higher-Order Polymorphism (pg. 449)
31 Higher-Order Subtyping (pg. 467)
32 Case Study: Purely Functional Objects (pg. 475)
Appendices (pg. 491)
A Solutions to Selected Exercises (pg. 493)
B Notational Conventions (pg. 565)
References (pg. 567)
Index (pg. 605)

Benjamin C. Pierce

Benjamin C. Pierce is Professor of Computer and Information Science at the University of Pennsylvania.


eTextbook
Go paperless today! Available online anytime, nothing to download or install.

Features

  • Bookmarking
  • Note taking
  • Highlighting