Algebraic foundations of the Unifying Theories of Programming
Walter Guttmann · OPen Access Repositorium der Universität Ulm (OPARU) (Ulm University) · 2007
Hoare and He´s Unifying Theories of Programming take a relational view on semantics. The meaning of a non-deterministic, imperative program is described by "designs" composed of two relations. They represent terminating states and relate the initial and final values of the observable variables, respectively. Several "healthiness conditions" are imposed by the theory to obtain properties found in practice. This work determines the structure of designs and modifies the theory to support non-strict computations. It achieves these goals by identifying healthiness conditions and related axioms that involve unnecessary restrictions and subsequently removing them. The outcome provides a clear account of the algebraic foundations of the Unifying Theories of Programming. One of the results is a generalisation of designs by constructing them on semirings with ideals, structures having fewer axioms than relations. This clarifies the essential algebraic structure of designs, allows the reuse of existing mathematical theory and connects to further semantical approaches. The framework is extended by algebraic formulations of finite and infinite iteration, domain, pre-image, determinacy, invariants and convergence. Calculations and reasoning become simpler by the new, more abstract representation as is shown by applying the theory to investigate linear recursions. Another result is an extension of the Unifying Theories of Programming to deal with undefined values irrespective of non-termination. Besides being closer to practice, it forms the basis of a new theory of relations representing non-strict computations. They satisfy additional healthiness conditions that model dependence in computations in an elegant algebraic form. Programs can then be executed according to the principle of lazy evaluation, otherwise known from functional programming languages.