CS 641 meeting -*- Outline -*- * healthiness laws (3) the healthiness laws are postulates that form a "natural boundary" between the predicate-transformer semantics and the relational (i.e., denoational semantics). That is they follow from the denotational semantics, They also hold for all "practical imperative languages" idea of this short chapter is to: introduce the laws, informally justify them, see their consqeuences * conujunctivity (3.1) These are some definitions used to describe the healthiness laws. ---------------------------- def: f: |P -> |P is *finitely conjunctive* iff for all predicates p, q \in |P: f.(p /\ q) = f.p /\ f.q. def: f: |P -> |P is *universally conjunctive* iff for every set U \subseteq |P: f.(all p \in U :: p) = (all p \in U :: f.p) ---------------------------- note that universal conjunctivity is very strong. In particular, if f is universally conjunctive f.true = {calculus} f.(all p \in {} :: p) = {f is universally conjunctive} (all p \in {} :: f.p) = {calculus} true Q: So what are we saying about c if we require wp.c to be universally conjunctive? that wp.c.true = true, so c is guaranteed to terminate. Q: What if we require for all c, wp.c is universally conjunctive? then every command is guaranteed to terminate This motivates the weaker definition... --------------------------- def: f: |P -> |P is *positively conjunctive* iff for every set U \subseteq |P: ~(U = {}) ==> f.(all p \in U :: p) = (all p \in U :: f.p) --------------------------- positive conjunctivity differs from conjunctivity in that it doesn't require the formula for the empty set of predicates Thm: every finitely conjunctive predicate transformer is monotone. Note: If f is universally conjunctive, then it is positively conjunctive. If g is positively conjunctive, then it is finitely conjunctive.