Abstract
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).
Supplemental Material
- M. Abadi and L. Lamport. The existence of refinement mappings. Theoretical Computer Science, 82(2):253--284, 1991. Google Scholar
Digital Library
- A. Ahmed. Step-indexed syntactic logical relations for recursive and quantified types. In ESOP, 2006. Google Scholar
Digital Library
- A. Ahmed, D. Dreyer, and A. Rossberg. State-dependent representation independence. In POPL, 2009. Google Scholar
Digital Library
- L. Birkedal, B. Reus, J. Schwinghammer, K. Støvring, J. Thamsborg, and H. Yang. Step-indexed Kripke models over recursive worlds. In POPL, 2011. Google Scholar
Digital Library
- L. Birkedal, F. Sieczkowski, and J. Thamsborg. A concurrent logical relation. In CSL, Sept. 2012.Google Scholar
- S. Brookes. Full abstraction for a shared variable parallel language. Information and Computation, 127(2):145--163, 1996.Google Scholar
Cross Ref
- T. Dinsdale-Young, M. Dodds, P. Gardner, M. Parkinson, and V. Vafeiadis. Concurrent abstract predicates. In ECOOP, June 2010. Google Scholar
Digital Library
- M. Dodds, X. Feng, M. Parkinson, and V. Vafeiadis. Deny-guarantee reasoning. In ESOP, 2009. Google Scholar
Digital Library
- D. Dreyer, G. Neis, and L. Birkedal. The impact of higher-order state and control effects on local relational reasoning. In ICFP, 2010. Google Scholar
Digital Library
- D. Dreyer, G. Neis, A. Rossberg, and L. Birkedal. A relational modal logic for higher-order stateful ADTs. In POPL, 2010. Google Scholar
Digital Library
- T. Elmas, S. Qadeer, A. Sezgin, O. Subasi, and S. Tasiran. Simplifying linearizability proofs with reduction and abstraction. In TACAS, 2010. Google Scholar
Digital Library
- X. Feng. Local rely-guarantee reasoning. In POPL, pages 315--327. ACM, 2009. Google Scholar
Digital Library
- X. Feng, R. Ferreira, and Z. Shao. On the relationship between concurrent separation logic and assume-guarantee reasoning. In ESOP, 2007. Google Scholar
Digital Library
- I. Filipović, P. O'Hearn, N. Rinetzky, and H. Yang. Abstraction for concurrent objects. Theoretical Computer Science, 411, 2010. Google Scholar
Digital Library
- K. Fraser and T. Harris. Concurrent programming without locks. ACM Trans. Comput. Syst., 25(2), 2007. Google Scholar
Digital Library
- A. Gotsman and H. Yang. Linearizability with ownership transfer. In CONCUR, 2012. Google Scholar
Digital Library
- L. Groves and R. Colvin. Trace-based derivation of a scalable lock-free stack algorithm. Form. Asp. Comput., 21(1--2):187--223, 2009. Google Scholar
Cross Ref
- T. Harris, K. Fraser, and I. Pratt. A practical multi-word compare-and-swap operation. In DISC, 2002. Google Scholar
Digital Library
- D. Hendler, N. Shavit, and L. Yerushalmi. A scalable lock-free stack algorithm. In SPAA, 2004. Google Scholar
Digital Library
- M. Herlihy and N. Shavit. The Art of Multiprocessor Programming. Morgan Kaufmann, 2008. Google Scholar
Digital Library
- M. P. Herlihy and J. M. Wing. Linearizability: a correctness condition for concurrent objects. TOPLAS, 12(3):463--492, 1990. Google Scholar
Digital Library
- C. A. R. Hoare. Proof of correctness of data representations. Acta Informatica, 1(4):271--281, 1972.Google Scholar
Digital Library
- C. B. Jones. Tentative steps toward a development method for interfering programs. TOPLAS, 5(4):596--619, 1983. Google Scholar
Digital Library
- H. Liang and X. Feng. Modular verification of linearizability with non-fixed linearization points. Manuscript, July 2012.Google Scholar
- H. Liang, X. Feng, and M. Fu. A rely-guarantee-based simulation for verifying concurrent program transformations. In POPL, 2012. Google Scholar
Digital Library
- R. J. Lipton. Reduction: a method of proving properties of parallel programs. Commun. ACM, 18(12):717--721, 1975. Google Scholar
Digital Library
- J. Lucassen and D. Gifford. Polymorphic effect systems. In POPL, 1988. Google Scholar
Digital Library
- N. Lynch and F. Vaandrager. Forward and backward simulations I: untimed systems. Inf. Comput., 121(2):214--233, 1995. Google Scholar
Digital Library
- M. M. Michael and M. L. Scott. Nonblocking algorithms and preemption-safe locking on multiprogrammed shared memory multiprocessors. J. Parallel Distrib. Comput., 51(1):1--26, 1998. Google Scholar
Digital Library
- P. O'Hearn, N. Rinetzky, M. Vechev, E. Yahav, and G. Yorsh. Verifying linearizability with hindsight. In PODC, 2010. Google Scholar
Digital Library
- P. W. O'Hearn. Resources, concurrency, and local reasoning. Theor. Comput. Sci., 375(1--3):271--307, 2007. Google Scholar
Digital Library
- J. C. Reynolds. Types, Abstraction and Parametric Polymorphism. In Information Processing, 1983.Google Scholar
- J. C. Reynolds. Separation logic: A logic for shared mutable data structures. In LICS, 2002. Google Scholar
Digital Library
- R. Treiber. Systems programming: coping with parallelism. Technical report, Almaden Research Center, 1986.Google Scholar
- A. Turon, J. Thamsborg, A. Ahmed, L. Birkedal, and D. Dreyer. Logical relations for fine-grained concurrency (Technical appendix), 2012. URL:texttthttp://www.ccs.neu.edu/home/turon/relcon.Google Scholar
- A. Turon and M. Wand. A separation logic for refining concurrent objects. In POPL, 2011. Google Scholar
Digital Library
- V. Vafeiadis. Modular fine-grained concurrency verification. PhD thesis, University of Cambridge, 2008.Google Scholar
- V. Vafeiadis and M. Parkinson. A marriage of rely/guarantee and separation logic. In CONCUR, 2007. Google Scholar
Digital Library
- R. J. van Glabbeek. The linear time - branching time spectrum. In CONCUR, 1990. Google Scholar
Digital Library
Index Terms
Logical relations for fine-grained concurrency
Recommendations
Logical relations for fine-grained concurrency
POPL '13: Proceedings of the 40th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languagesFine-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 ...
Expressive modular fine-grained concurrency specification
POPL '11: Proceedings of the 38th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languagesCompared to coarse-grained external synchronization of operations on data structures shared between concurrent threads, fine-grained, internal synchronization can offer stronger progress guarantees and better performance. However, fully specifying ...
Proof Automation for Linearizability in Separation Logic
Recent advances in concurrent separation logic enabled the formal verification of increasingly sophisticated fine-grained (i.e., lock-free) concurrent programs. For such programs, the golden standard of correctness is linearizability, which expresses ...







Comments