Partial Hyperdoctrines: Categorical Models for Partial Function Logic and Hoare Logic

In this paper we provide a categorical interpretation of the first-order Hoare logic of a small programming language by giving a weakest precondition semantics for the language. To this end, we extend the well-known notion of a (first-order) hyperdoctrine to include partial maps. The most important new aspect of the resulting partial (first-order) hyperdoctrine is a different notion of morphism between the fibres. We also use this partial hyperdoctrine to give a model for Beeson's Partial Function Logic such that (a version of) his axiomatization is complete with respect to this model. This shows the usefulness of the notion, independent of its intended use as a model for Hoare logic.

[1]  Edsger W. Dijkstra,et al.  A Discipline of Programming , 1976 .

[2]  Eric G. Wagner,et al.  A Categorical Treatment of Pre- and Post Conditions , 1986, CAAP.

[3]  F. William Lawvere,et al.  Adjointness in Foundations , 1969 .

[4]  D. Scott Identity and existence in intuitionistic logic , 1979 .

[5]  Michael Beeson,et al.  Proving Programs and Programming Proofs , 1986 .

[6]  Adam Obtułowicz The logic of categories of partial functions and its applications , 1986 .

[7]  D. Scott,et al.  Applications of sheaves , 1979 .

[8]  J. Van Leeuwen,et al.  Handbook of theoretical computer science - Part A: Algorithms and complexity; Part B: Formal models and semantics , 1990 .

[9]  Krzysztof R. Apt,et al.  Ten Years of Hoare's Logic: A Survey Part II: Nondeterminism , 1984, Theor. Comput. Sci..

[10]  S. Lane Categories for the Working Mathematician , 1971 .

[11]  R. D. Tennent,et al.  A Note on Undefined Expression Values in Programming Logics , 1987, Inf. Process. Lett..

[12]  Patrick Suppes,et al.  Logic, Methodology and Philosophy of Science , 1963 .

[13]  Andrew M. Pitts,et al.  Conceptual Completeness for First-Order Intuitionistic Logic: An Application of Categorical Logic , 1989, Ann. Pure Appl. Log..

[14]  M. Makkai,et al.  First order categorical logic , 1977 .

[15]  Krzysztof R. Apt,et al.  Ten Years of Hoare's Logic: A Survey—Part I , 1981, TOPL.

[16]  Alex Heller,et al.  Dominical categories: recursion theory without elements , 1987, Journal of Symbolic Logic.

[17]  Andre Scedrov,et al.  Categories, allegories , 1990, North-Holland mathematical library.

[18]  Edmund Robinson,et al.  Categories of Partial Maps , 1988, Inf. Comput..

[19]  Eugenio Moggi,et al.  Notions of Computation and Monads , 1991, Inf. Comput..

[20]  S. Maclane,et al.  Categories for the Working Mathematician , 1971 .

[21]  Patrick Cousot,et al.  Methods and Logics for Proving Programs , 1990, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.