Relations
The most basic UTP theory is the alphabetised predicate calculus, which has no alphabet restrictions or healthiness conditions. The theory of relations is slightly more specialised, since a relation's alphabet may consist of only:
- undecorated variables, modelling an observation of the program at the start of its execution; and
- primed variables, modelling an observation of the program at a later stage of its execution.
Some common language constructs can be defined in the theory of relations as follows:
- The skip statement, which does not alter the program state in any way, is modelled as the relational identity:
- The assignment of value to a variable is modelled as setting to and keeping all other variables (denoted by ) constant:
- The sequential composition of two programs is just relational composition of intermediate state:
- Non-deterministic choice between programs is their greatest lower bound:
- Conditional choice between programs is written using infix notation:
- A semantics for recursion is given by the least fixed point of a monotonic predicate transformer :
Read more about this topic: Unifying Theories Of Programming
Famous quotes containing the word relations:
“Major [William] McKinley visited me. He is on a stumping tour.... I criticized the bloody-shirt course of the canvass. It seems to me to be bad politics, and of no use.... It is a stale issue. An increasing number of people are interested in good relations with the South.... Two ways are open to succeed in the South: 1. A division of the white voters. 2. Education of the ignorant. Bloody-shirt utterances prevent division.”
—Rutherford Birchard Hayes (18221893)
“I only desire sincere relations with the worthiest of my acquaintance, that they may give me an opportunity once in a year to speak the truth.”
—Henry David Thoreau (18171862)