categories - Category Theory list
 help / color / mirror / Atom feed
* Categorical model for Floyd-Hoare logic?
@ 1998-02-15 14:48 Paul Taylor
  0 siblings, 0 replies; only message in thread
From: Paul Taylor @ 1998-02-15 14:48 UTC (permalink / raw)
  To: categories


I see Roy Crole has already answered this question on my behalf.
The paper to which he refers is called "An Exact Interpretation of While"
and is "while-1993.dvi.gz" on my page at Hypatia
	http://hypatia.dcs.qmw.ac.uk/author/TaylorP

Manes' appraoach, as I recall, looks a bit like matrix algebra,
with finite addition replaced by infinite union.  From a programming
point of view this seems to me like replacing a WHILE program (which
doesn't know a priori how many times it is going to go round) with
an infinite SWITCH/CASE statement indexed by the number of iterations.

My motication (in 1987 this was) was that it only takes finitely many
characters to write the program, so its semantics should be given
in a finitary form.  The bit of the (categorical) diagram which does
the work is a coequaliser, and Barry Jay observed independently that
this says in categorical language that the WHILE program is the
"universal loop invariant".

The coequaliser is not the whole story.  It does not say when to exit
the loop: some modifications to the diagram using pullbacks are needed.
Nor will coequalisers in any old category do (cd the need for at least
distributive and preferably extensive categories for if-then-else).
I spent a long time trying to formulate the need for "stable" coequalisers
correctly, but this never worked.  It was necessary to fall back on
stability of the formation of transitive or equivalence closures.

There is a completely rewritten account of my work on WHILE programs
in Section 6.4 of my book (not yet, I'm afraid, finished).

The category theory does not match up quite as nicely as one would like
("full abstraction") for WHILE or even IF-THEN-ELSE.  (The interpretation
is sound, but what I know about it falls short of the equivalence
which exists, for example, between lambda calculus and CCCs).

My treatment of Floyd-Hoare logic is done in the greatest detail for
what I call the direct declarative language (with assignments but no
conditionals or loops).  This is integrated with the categorical 
account of algebraic or finite-product theories.  I now think I can
motivate the definition of category and product EASIER on the basis
of programming than from traditional mathematics.

Floyd-Hoare logic & algebraic theories are in Chapter IV, conditionals
in Section 5.5.

Paul

PS Yes, I know I've got to get this book finished. There are just not
enough hours in the day!



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-02-15 14:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-15 14:48 Categorical model for Floyd-Hoare logic? Paul Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).