Logical relations for fine-grained concurrency

Fine-grained concurrent data structures (or FCDs) reduce the granularity of critical sections in both time and space, thus making it possible for clients to access different parts of a mutable data structure in parallel. However, the tradeoff is that the implementations of FCDs are very subtle and tricky to reason about directly. Consequently, they are carefully designed to be contextual refinements of their coarse-grained counterparts, meaning that their clients can reason about them as if all access to them were sequentialized. In this paper, we propose a new semantic model, based on Kripke logical relations, that supports direct proofs of contextual refinement in the setting of a type-safe high-level language. The key idea behind our model is to provide a simple way of expressing the "local life stories" of individual pieces of an FCD's hidden state by means of protocols that the threads concurrently accessing that state must follow. By endowing these protocols with a simple yet powerful transition structure, as well as the ability to assert invariants on both heap states and specification code, we are able to support clean and intuitive refinement proofs for the most sophisticated types of FCDs, such as conditional compare-and-set (CCAS).

[1]  Xinyu Feng,et al.  Deny-Guarantee Reasoning , 2009, ESOP.

[2]  Maurice Herlihy,et al.  Linearizability: a correctness condition for concurrent objects , 1990, TOPL.

[3]  Aaron Turon,et al.  A separation logic for refining concurrent objects , 2011, POPL '11.

[4]  David K. Gifford,et al.  Polymorphic effect systems , 1988, POPL '88.

[5]  Xinyu Feng,et al.  A rely-guarantee-based simulation for verifying concurrent program transformations , 2012, POPL '12.

[6]  Robert Colvin,et al.  Trace-based derivation of a scalable lock-free stack algorithm , 2008, Formal Aspects of Computing.

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

[8]  P ? ? ? ? ? ? ? % ? ? ? ? , 1991 .

[9]  Viktor Vafeiadis,et al.  A Marriage of Rely/Guarantee and Separation Logic , 2007, CONCUR.

[10]  Maged M. Michael,et al.  Nonblocking Algorithms and Preemption-Safe Locking on Multiprogrammed Shared Memory Multiprocessors , 1998, J. Parallel Distributed Comput..

[11]  Peter W. O'Hearn,et al.  Resources, concurrency, and local reasoning , 2007 .

[12]  Rob J. van Glabbeek,et al.  The Linear Time - Branching Time Spectrum II , 1993, CONCUR.

[13]  C. A. R. Hoare,et al.  Proof of correctness of data representations , 1972, Acta Informatica.

[14]  Stephen D. Brookes Full Abstraction for a Shared-Variable Parallel Language , 1996, Inf. Comput..

[15]  Omer Subasi,et al.  Simplifying Linearizability Proofs with Reduction and Abstraction , 2010, TACAS.

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

[17]  Viktor Vafeiadis,et al.  Concurrent Abstract Predicates , 2010, ECOOP.

[18]  Richard J. Lipton,et al.  Reduction: a method of proving properties of parallel programs , 1975, CACM.

[19]  Nir Shavit,et al.  A scalable lock-free stack algorithm , 2010, J. Parallel Distributed Comput..

[20]  Xinyu Feng,et al.  On the Relationship Between Concurrent Separation Logic and Assume-Guarantee Reasoning , 2007, ESOP.

[21]  Maurice Herlihy,et al.  The art of multiprocessor programming , 2020, PODC '06.

[22]  Rob J. van Glabbeek,et al.  The Linear Time-Branching Time Spectrum (Extended Abstract) , 1990, CONCUR.

[23]  Eran Yahav,et al.  Verifying linearizability with hindsight , 2010, PODC.

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

[25]  Martín Abadi,et al.  The Existence of Refinement Mappings , 1988, LICS.

[26]  Xinyu Feng Local rely-guarantee reasoning , 2009, POPL '09.

[27]  Yu Zhang,et al.  Reasoning about Optimistic Concurrency Using a Program Logic for History , 2010, CONCUR.

[28]  Hongseok Yang,et al.  Linearizability with Ownership Transfer , 2012, CONCUR.

[29]  Keir Fraser,et al.  A Practical Multi-word Compare-and-Swap Operation , 2002, DISC.

[30]  Cliff B. Jones,et al.  Tentative steps toward a development method for interfering programs , 1983, TOPL.

[31]  Viktor Vafeiadis,et al.  Modular fine-grained concurrency verification , 2008 .

[32]  Nancy A. Lynch,et al.  Forward and Backward Simulations: I. Untimed Systems , 1995, Inf. Comput..

[33]  Xinyu Feng,et al.  Modular verification of linearizability with non-fixed linearization points , 2013, PLDI 2013.

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

[35]  Lars Birkedal,et al.  A Concurrent Logical Relation , 2012, CSL.

[36]  Peter W. O'Hearn,et al.  Abstraction for concurrent objects , 2009, Theor. Comput. Sci..

[37]  Amal Ahmed,et al.  Step-Indexed Syntactic Logical Relations for Recursive and Quantified Types , 2006, ESOP.

[38]  Lars Birkedal,et al.  The impact of higher-order state and control effects on local relational reasoning , 2012, J. Funct. Program..

[39]  Keir Fraser,et al.  Concurrent programming without locks , 2007, TOCS.

[40]  Rob J. van Glabbeek,et al.  The Linear Time - Branching Time Spectrum I , 2001, Handbook of Process Algebra.

[41]  Lars Birkedal,et al.  A relational modal logic for higher-order stateful ADTs , 2010, POPL '10.

[42]  R. J. vanGlabbeek The linear time - branching time spectrum , 1990 .