Specifications An Introduction Summary: Chapter 3 Specifications An Introduction to Separation Logic c 2009 John C. Reynolds February 17, 2009 From assertions, we move on to specifications, which describe the behavior of commands. In this chapter, we will define the syntax and meaning of spec- ifications, give and illustrate inference rules for proving valid specifications, and define a compact form of proof called an "annotated specification". Since separation logic has been built upon it, we will review the basics of Hoare logic. Further descriptions of this logic, including many examples of proofs, have been given by the author [92, Chapters 1 and 2], [96, Chapters 3 and 4]. A more theoretical view appears in [97, Chapter 8]. The original papers by Hoare [15, 16], as well as earlier work by Naur [18] and Floyd [17], are still well worth reading. 3.1 Hoare Triples For much of these notes, the only kind of specification will be the Hoare triple, which consists of two assertions surrounding a command. More precisely, there are two forms of Hoare triple. Collections: Mathematics