We use cookies to distinguish you from other users and to provide you with a better experience on our websites. Close this message to accept cookies or find out how to manage your cookie settings.
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 .
To save content items 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.
In Chapter 2 a number of techniques for setting up algebraic specifications were given. Now we want to do the same for state-based specifications. Recall that a state-based specification serves to describe a system whose model is a ‘class’. A class is a kind of state-machine where each state has an algebra associated with it. Because each such algebra can be viewed as a static world model, classes with their state transitions can be viewed to model dynamic systems. Special language constructs to specify these systems were introduced, such as procedures and the operators of dynamic logic. It is typical for these language constructs that they leave the sort of states implicit.
Therefore the techniques of Chapter 2 are mostly useful for describing the static aspects of states, whereas we need complementary guidelines for dealing with the dynamic aspects of a system. This is the main topic of this chapter. Key notions are that of precondition, postcondition and invariant.
In practice it turns out that there are certain patterns that occur quite often in state-based specifications, providing methodological guidelines for systematically setting up state-based specifications. In this chapter we shall do this, focusing on the axioms, and we adopt a classification distinguishing four distinct roles an axiom can play. These roles correspond to typical syntactic patterns. We shall refer to these by saying that there are four kinds of axioms:
properties of all states;
invariance properties;
properties of the initial state;
properties of state transitions including pre- and postcondition axioms and termination axioms.
It is always exciting and fruitful when two disparate scientific fields are found to have much in common. Each field is enriched by the different perspective and insights of the other. This has happened recently with category theory and theoretical computer science.
The relations between category theory and computer science constitute an extremely active area of research at the moment. Some evidence of this is given in the short list of references at the end of the book. Among the many places where research is being done are: Aarhus, Carnegie-Mellon, Cambridge, Edinburgh, Glasgow, London, Milan, Oxford, Paris, Pennsylvania, Pisa, Stanford, and Sydney. Topics of current interest include the connections between category theory and functional programming, polymorphism, concurrency, abstract data structures, object-oriented programming, and hardware design.
This book is an introduction to category theory in which several of the connections with computer science are discussed in sufficient detail to give the reader some technical expertise and a feeling for the rich possibilities arising from the happy connection between these two subjects.
What is category theory?
The notion of function is one of the most fundamental in mathematics and science. Functions are used to model variation — for example, the motion of a particle in space; the variation of a quantity like temperature over a space; the symmetries of a geometric object, or of physical laws; the variation of the state of a system over time.