Published online by Cambridge University Press: 11 March 2010
In this chapter, we start again from scratch. Now the meaning of a command is not defined by means of the functions wp and wlp, but by means of the input–output relation of a command. This point of view is closer to the intuitive ideas of most programmers, but —in our view— it is less adequate for program development.
The relational point of view is useful for the analysis of special properties of commands such as totality, termination and determinacy. It provides easy definitions or characterizations of composition, nondeterminate choice, guards and assertions. All these concepts can therefore be treated in this chapter.
When the relational point of view is used in the analysis of repetitions or recursive procedures, one needs to consider finite and infinite sequences of states, usually accompanied by many case distinctions. Such operational reasoning can be useful or necessary, but it is preferable to avoid it whenever possible. We introduce some of the necessary techniques in Chapter 9. It is used only in Chapters 14 and 15.
Although we use the definitions of Section 1.1 and some other concepts introduced in Chapters 1 and 3, this chapter is largely independent of the previous chapters. In fact, it can be read to support them.
In Section 6.1, we introduce (input–output) relations and their weakest preconditions, and we show that relations when interpreted as commands satisfy the healthiness laws introduced in Section 3.2. In Section 6.2, we give the relational interpretation of guards, sequential composition and nondeterminate choice.
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.
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.
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.