Dependent type theory of stateful higher-order functions

We present a dependent Hoare Type Theory (HTT) which provides support for reasoning about programs with higherorder functions and effects, including non-termination, state with aliasing and pointer arithmetic. The type structure encapsulates effectful commands using a monad indexed by preand post-conditions in the style of Hoare logic. The theory carefully distinguishes between an appropriate notion of definitional equality and propositional equality, in order to maintain the relative decidability of

[1]  Simon L. Peyton Jones,et al.  Imperative functional programming , 1993, POPL '93.

[2]  Michael Mendler,et al.  Propositional Lax Logic , 1997, Inf. Comput..

[3]  Furio Honsell,et al.  A framework for defining logics , 1993, JACM.

[4]  Stephen A. Cook,et al.  Soundness and Completeness of an Axiom System for Program Verification , 1978, SIAM J. Comput..

[5]  John C. Reynolds,et al.  Separation logic: a logic for shared mutable data structures , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[6]  Robert Cartwright,et al.  Unrestricted procedure calls in Hoare's logic , 1978, POPL '78.

[7]  Peter W. O'Hearn,et al.  Local Reasoning about Programs that Alter Data Structures , 2001, CSL.

[8]  VytiniotisDimitrios,et al.  Practical type inference for arbitrary-rank types , 2007 .

[9]  Wolfram Pohlers Proof Theory: An Introduction , 1990 .

[10]  Natasha Alechina,et al.  Categorical and Kripke Semantics for Constructive S4 Modal Logic , 2001, CSL.

[11]  Frank Pfenning,et al.  Intensionality, extensionality, and proof irrelevance in modal type theory , 2001, Proceedings 16th Annual IEEE Symposium on Logic in Computer Science.

[12]  John McCarthy,et al.  Towards a Mathematical Science of Computation , 1962, IFIP Congress.

[13]  Thierry Coquand,et al.  The Calculus of Constructions , 1988, Inf. Comput..

[14]  James Cheney,et al.  Cyclone: A Safe Dialect of C , 2002, USENIX Annual Technical Conference, General Track.

[15]  Martín Abadi,et al.  A Logic of Object-Oriented Programs , 1997, Verification: Theory and Practice.

[16]  Zhong Shao,et al.  Certified assembly programming with embedded code pointers , 2006, POPL '06.

[17]  David Walker,et al.  An effective theory of type refinements , 2003, ACM SIGPLAN Notices.

[18]  K. Rustan M. Leino,et al.  ESC/Java User's Manual , 2000 .

[19]  Nobuko Yoshida,et al.  An observationally complete program logic for imperative higher-order functions , 2005, 20th Annual IEEE Symposium on Logic in Computer Science (LICS' 05).

[20]  G. Gentzen New version of the consistency proof for elementary number theory , 1969 .

[21]  Edmund M. Clarke,et al.  Programming Language Constructs for Which It Is Impossible To Obtain Good Hoare Axiom Systems , 1979, JACM.

[22]  Joseph Y. Halpern A good Hoare axiom system for an ALGOL-like language , 1984, POPL '84.

[23]  Simon L. Peyton Jones,et al.  Practical type inference for arbitrary-rank types , 2007, Journal of Functional Programming.

[24]  Frank Pfenning,et al.  A judgmental reconstruction of modal logic , 2001, Mathematical Structures in Computer Science.

[25]  Zhong Shao,et al.  Interfacing Hoare Logic and Type Systems for Foundational Proof-Carrying Code , 2004, TPHOLs.

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

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

[28]  P. Martin-Löf On the meanings of the logical constants and the justi cations of the logical laws , 1996 .

[29]  Nick Benton,et al.  Computational types from a logical perspective , 1998, Journal of Functional Programming.

[30]  J. Girard,et al.  Proofs and types , 1989 .

[31]  Hongseok Yang,et al.  Semantics of separation-logic typing and higher-order frame rules , 2005, 20th Annual IEEE Symposium on Logic in Computer Science (LICS' 05).

[32]  K. Rustan M. Leino,et al.  Extended static checking , 1998, PROCOMET.

[33]  Peter W. O'Hearn,et al.  Separation and information hiding , 2004, POPL.

[34]  Hongwei Xi,et al.  Safe Programming with Pointers Through Stateful Views , 2005, PADL.

[35]  Hongwei Xi,et al.  Applied Type System: Extended Abstract , 2003, TYPES.

[36]  C. A. R. HOARE,et al.  An axiomatic basis for computer programming , 1969, CACM.

[37]  Simon L. Peyton Jones,et al.  State in Haskell , 1995, LISP Symb. Comput..

[38]  Nobuko Yoshida,et al.  A logical analysis of aliasing in imperative higher-order functions , 2007, J. Funct. Program..

[39]  David Walker,et al.  A Concurrent Logical Framework: The Propositional Fragment , 2003, TYPES.

[40]  Robert Cartwright,et al.  The logic of aliasing , 1981, Acta Informatica.

[41]  Benjamin C. Pierce,et al.  Local type inference , 1998, POPL '98.

[42]  Philip Wadler,et al.  The marriage of effects and monads , 1998, ICFP '98.

[43]  M. Hofmann Extensional concepts in intensional type theory , 1995 .

[44]  John C. Mitchell,et al.  Foundations for programming languages , 1996, Foundation of computing series.

[45]  Peyton Jones,et al.  Haskell 98 language and libraries : the revised report , 2003 .