Two for the Price of One: Lifting Separation Logic Assertions

Recently, data abstraction has been studied in the context of separation logic, with noticeable practical successes: the developed logics have enabled clean proofs of tricky challenging programs, such as subject-observer patterns, and they have become the basis of efficient verification tools for Java (jStar), C (VeriFast) and Hoare Type Theory (Ynot). In this paper, we give a new semantic analysis of such logic-based approaches using Reynolds's relational parametricity. The core of the analysis is our lifting theorems, which give a sound and complete condition for when a true implication between assertions in the standard interpretation entails that the same implication holds in a relational interpretation. Using these theorems, we provide an algorithm for identifying abstraction-respecting client-side proofs; the proofs ensure that clients cannot distinguish two appropriately-related module implementations.

[1]  Peter W. O'Hearn,et al.  Parametricity and local variables , 1995, JACM.

[2]  Lars Birkedal,et al.  BI Hyperdoctrines and Higher-Order Separation Logic , 2005, ESOP.

[3]  K. Rustan M. Leino,et al.  Data abstraction and information hiding , 2002, TOPL.

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

[5]  K. Rustan M. Leino,et al.  An Extended Static Checker for Modular-3 , 1998, CC.

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

[7]  Lars Birkedal,et al.  Abstract Predicates and Mutable ADTs in Hoare Type Theory , 2007, ESOP.

[8]  Nick Benton,et al.  Relational Reasoning in a Nominal Semantics for Storage , 2005, TLCA.

[9]  K. Rustan M. Leino,et al.  The Spec# Programming System: Challenges and Directions , 2005, VSTTE.

[10]  Anindya Banerjee,et al.  Ownership confinement ensures representation independence for object-oriented programs , 2002, JACM.

[11]  Shengchao Qin,et al.  Enhancing modular OO verification with separation logic , 2008, POPL '08.

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

[13]  Gavin M. Bierman,et al.  Separation logic and abstraction , 2005, POPL '05.

[14]  Frank Piessens,et al.  The VeriFast program verifier , 2008 .

[15]  Martín Abadi,et al.  A Logic for Parametric Polymorphism , 1993, TLCA.

[16]  Andrew M. Pitts,et al.  Observable Properties of Higher Order Functions that Dynamically Create Local Names, or What's new? , 1993, MFCS.

[17]  Matthew J. Parkinson,et al.  jStar: towards practical verification for java , 2008, OOPSLA.

[18]  Mark Lillibridge,et al.  Extended static checking for Java , 2002, PLDI '02.

[19]  Andrew W. Appel,et al.  A Fresh Look at Separation Algebras and Share Accounting , 2009, APLAS.

[20]  John C. Reynolds,et al.  Types, Abstraction and Parametric Polymorphism , 1983, IFIP Congress.

[21]  Bor-Yuh Evan Chang,et al.  Boogie: A Modular Reusable Verifier for Object-Oriented Programs , 2005, FMCO.

[22]  Lars Birkedal,et al.  BI-hyperdoctrines, higher-order separation logic, and abstraction , 2007, TOPL.

[23]  Anindya Banerjee,et al.  State Based Ownership, Reentrance, and Encapsulation , 2005, ECOOP.

[24]  Derek Dreyer,et al.  State-dependent representation independence , 2009, POPL '09.

[25]  Christopher Strachey,et al.  Fundamental Concepts in Programming Languages , 2000, High. Order Symb. Comput..

[26]  Peter W. O'Hearn,et al.  A Local Shape Analysis Based on Separation Logic , 2006, TACAS.

[27]  Hongseok Yang,et al.  Program Analysis for Overlaid Data Structures , 2011, CAV.

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

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

[30]  Stephen Brookes A semantics for concurrent separation logic , 2007, Theor. Comput. Sci..