Predicate Transformers as Homomorphisms on Scott's Information Systems

  • Authors:
  • Roger L. Norton

  • Affiliations:
  • Marist College, Poughkeepsie, NY

  • Venue:
  • CSC '89 Proceedings of the 17th conference on ACM Annual Computer Science Conference
  • Year:
  • 1989

Quantified Score

Hi-index 0.00

Visualization

Abstract

Information systems were introduced by Dana Scott as a means of giving constructive definitions of domains, that is, consistently complete algebraic CPO's. Information systems posses a simple definition and make domains more accessible for applications. In this paper we investigate Dijkstra's weakest precondition predicate transformer on predicate logics considered as information systems. We utilize the expected properties of these transformers to define a new morphism on information systems, and show how these morphisms can be utilized in specifying the semantics of a general while-programming language. In the study of predicate logic one has to deal with the subject matter on two levels. The first level dealing with the study of predicates and the second level, the level of presentation, dealing with formulas. It is on the second level that much of the work in program verification takes place. Dealing with the first level, we can talk about the set of predicates concerning the set of states Σ by looking at the domain D consisting of all subsets of Σ ordered by reverse inclusion. We can then say that σ ε Σ satisfies the predicate p ε D iff σ Σ p. This approach has certain theoretical advantages but does not allow one the ability to get a handle on a particular predicate very easily, and thus one is hindered when dealing with more practical matters such as program specification and proofs of correctness. We therefore utilize some first order predicate logic with equality over a particular basis under an interpretation φ and show that such a presentation can be constructed as an information system, denoted IS(PL, φ). The question is how can we utilize this fact. A method of defining the semantics of programming languages that appears in the literature is through the use of predicate transformers. Here one associates with each program a function defined on predicates. An example of such a predicate transformer is Dijkstra's weakest precondition. Here, given a program S, one associates the predicate transformer wp(S) which assigns to each predicate p the predicate wp(S) (p) which satisfies the property that given any state of the computation σ, if one were to execute the program S starting in the state σ, then S would halt in some state σ' which satisfied the predicate p iff σ satisfied the predicate wp(S) (p). In this paper we look at the basic properties which are satisfied by Dijkstra's weakest precondition and define a homomorphism on first order predicate logic, considered as an information system, which satisfies these properties. We can thus consider the semantics of the primitive statements A of a WHILE-LANGUAGE L as having been defined by specifying homomorphisms τ(a):IS(PL,φ)←IS(PL,φ) for each a ε A. Giving this we investigate how one would go about defining the meaning of programs in L constructed from these primitive statements via various program constructors. As an example if b is a predicate formula and 's' a primitive statement then we define the semantics of 'While b do s' as τ(While b do s) (q) = F(q) = (Ej:j≥0:fj (q)) where we have [EQUATION] It is a relatively easy matter to show that F(q) is a homomorphism. However, we also have to show that F(q) is a predicate formula in our predicate logic. However, this does not have to be the case and in fact is only the case when our predicate logic is expressive with respect to our while programs. So what we need is a way to pass from formulas or sets of formulas to predicates, or more generally, a way to pass from transformers considered as homomorphisms on predicate logics considered as information systems to continuous functions on our predicate logics considered now as domains. We hence develop a theory relating our homomorphisms on information systems to continuous functions on domains. We succeed in defining the semantics of a general while-language utilizing the theory of homomorphisms developed in the paper. So what we have done is introduce a new mathematical structure, namely, information systems and homomorphisms, and have shown that the study of predicate transformers properly belongs within the study of this new structure. Thus, all of the theorems proven about information systems and homomorphisms immediately become theorems about predicate transformers.