Book contents
- Frontmatter
- Dedication
- Contents
- Road map
- Acknowledgments
- 1 Introduction
- I Generic separation logic
- II Higher order separation logic
- III Separation logic for CompCert
- IV Operational semantics of CompCert
- V Higher-order semantic models
- 35 Indirection theory
- 36 Case study: Lambda-calculus with references
- 37 Higher-order Hoare logic
- 38 Higher-order separation logic
- 39 Semantic models of predicates-in-the-heap
- VI Semantic model and soundness of Verifiable C
- VII Applications
- Bibliography
- Index
36 - Case study: Lambda-calculus with references
from V - Higher-order semantic models
Published online by Cambridge University Press: 05 August 2014
- Frontmatter
- Dedication
- Contents
- Road map
- Acknowledgments
- 1 Introduction
- I Generic separation logic
- II Higher order separation logic
- III Separation logic for CompCert
- IV Operational semantics of CompCert
- V Higher-order semantic models
- 35 Indirection theory
- 36 Case study: Lambda-calculus with references
- 37 Higher-order Hoare logic
- 38 Higher-order separation logic
- 39 Semantic models of predicates-in-the-heap
- VI Semantic model and soundness of Verifiable C
- VII Applications
- Bibliography
- Index
Summary
Here we present a simple λ-calculus with references to illustrate the use of indirection theory. The λ-calculus is well understood and its type system presents no surprises, so it provides us as a nice vehicle for explaining how to apply indirection theory.
One reason this language is interesting, from our point of view, is that it was historically rather difficult to find a semantic theory for general references—that is, references that may contain data of any type, including quantified types. In contrast, the theory of references at base types (e.g., only containing integers) is much simpler. Tofte had an syntactic/operational theory of general references as early as 1990 [86], but it was not until the step-indexed model of Ahmed, Appel and Virga [4, 2] in 2003 that a semantic theory of general references was found. The model of Ahmed et al. was refined and generalized in the following years by Appel et al. [11], and then further refined by Hobor et al. [52] into the indirection theory that appears in this book.
The λ-calculus with references is a bit of a detour from our main aim in this book, which is building program logics for C. However, it provides a relatively simple, self-contained example that illustrates the techniques we will be using later in more complicated settings. In particular, we will use indirection theory to build the Hoare tuple for program logics for C along similar lines to how we construct the expression typing predicate in this chapter.
- Type
- Chapter
- Information
- Program Logics for Certified Compilers , pp. 316 - 339Publisher: Cambridge University PressPrint publication year: 2014