Nested Hoare Triples and Frame Rules for Higher-Order Store

Separation logic is a Hoare-style logic for reasoning about programs with heap-allocated mutable data structures. As a step toward extending separation logic to high-level languages with ML-style general (higher-order) storage, we investigate the compatibility of nested Hoare triples with several variations of higher-order frame rules. The interaction of nested triples and frame rules can be subtle, and the inclusion of certain frame rules is in fact unsound. A particular combination of rules can be shown consistent by means of a Kripke model where worlds live in a recursively defined ultrametric space. The resulting logic allows us to elegantly prove programs involving stored code. In particular, it leads to natural specifications and proofs of invariants required for dealing with recursion through the store.

[1]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[2]  Nobuko Yoshida,et al.  Logical Reasoning for Higher-Order Functions with Local State , 2007, Log. Methods Comput. Sci..

[3]  Lars Birkedal,et al.  A Step-Indexed Kripke Model of Hidden State via Recursive Properties on Recursively Defined Metric Spaces , 2010, FICS.

[4]  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).

[5]  M. Sørensen,et al.  Lectures on the Curry-Howard Isomorphism, Volume 149 (Studies in Logic and the Foundations of Mathematics) , 2006 .

[6]  Lars Birkedal,et al.  Realizability Semantics of Parametric Polymorphism, General References, and Recursive Types , 2009, FoSSaCS.

[7]  Thomas Streicher,et al.  Domain-theoretic foundations of functional programming , 2006 .

[8]  Gordon D. Plotkin,et al.  The category-theoretic solution of recursive domain equations , 1977, 18th Annual Symposium on Foundations of Computer Science (sfcs 1977).

[9]  François Pottier Three comments on the anti-frame rule , 2009 .

[10]  Nick Benton Abstracting Allocation , 2006, CSL.

[11]  François Pottier Hiding Local State in Direct Style: A Higher-Order Anti-Frame Rule , 2008, 2008 23rd Annual IEEE Symposium on Logic in Computer Science.

[12]  Hongseok Yang,et al.  A Semantic Foundation for Hidden State , 2010, FoSSaCS.

[13]  Pierre America,et al.  Solving Reflexive Domain Equations in a Category of Complete Metric Spaces , 1989, J. Comput. Syst. Sci..

[14]  Andrew M. Pitts,et al.  Relational Properties of Domains , 1996, Inf. Comput..

[15]  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).

[16]  Lars Birkedal,et al.  Ynot: dependent types for imperative programs , 2008, ICFP 2008.

[17]  Hongseok Yang,et al.  Relational Parametricity and Separation Logic , 2008, Log. Methods Comput. Sci..

[18]  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.

[19]  Peter W. O'Hearn,et al.  The Logic of Bunched Implications , 1999, Bulletin of Symbolic Logic.

[20]  Andrew W. Appel,et al.  An indexed model of recursive types for foundational proof-carrying code , 2001, TOPL.

[21]  Hongseok Yang,et al.  Step-indexed kripke models over recursive worlds , 2011, POPL '11.

[22]  Gavin M. Bierman,et al.  Separation logic, abstraction and inheritance , 2008, POPL '08.

[23]  John C. Reynolds,et al.  Idealized ALGOL and its specification logic , 1997 .

[24]  Peter W. O'Hearn,et al.  Possible worlds and resources: the semantics of BI , 2004, Theor. Comput. Sci..

[25]  Jan Schwinghammer,et al.  Separation Logic for Higher-Order Store , 2006, CSL.

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

[27]  Hongseok Yang,et al.  A Simple Model of Separation Logic for Higher-Order Store , 2008, ICALP.

[28]  Lars Birkedal,et al.  Idealized ML and Its Separation Logic , 2006 .