Abstract
Compared 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 operations that perform internal synchronization modularly is a hard, open problem. The state of the art approaches, based on linearizability or on concurrent abstract predicates, have important limitations on the expressiveness of specifications. Linearizability does not support ownership transfer, and the concurrent abstract predicates-based specification approach requires hardcoding a particular usage protocol. In this paper, we propose a novel approach that lifts these limitations and enables fully general specification of fine-grained concurrent data structures. The basic idea is that clients pass the ghost code required to instantiate an operation's specification for a specific client scenario into the operation in a simple form of higher-order programming.
We machine-checked the theory of the paper using the Coq proof assistant. Furthermore, we implemented the approach in our program verifier VeriFast and used it to verify two challenging fine-grained concurrent data structures from the literature: a multiple-compare-and-swap algorithm and a lock-coupling list.
Supplemental Material
- Richard Bornat, Cristiano Calcagno, Peter O'Hearn, and Matthew Parkinson. Permission accounting in separation logic. In POPL, 2005. Google ScholarDigital Library
- Markus Dahlweid, Michal Moskal, Thomas Santen, Stephan Tobies, and Wolfram Schulte. VCC: Contract-based modular verification of concurrent C. In ICSE, 2009.Google ScholarCross Ref
- Thomas Dinsdale-Young, Mike Dodds, Philippa Gardner, Matthew Parkinson, and Viktor Vafeiadis. Concurrent abstract predicates. In ECOOP, 2010. Google ScholarDigital Library
- Alexey Gotsman, Josh Berdine, Byron Cook, Noam Rinetzky, and Mooly Sagiv. Local reasoning for storable locks and threads. In APLAS, 2007. Google ScholarDigital Library
- Tim Harris, Keir Fraser, and Ian A. Pratt. A practical multi-word compare-and-swap operation. In 16th International Symposium on Distributed Computing, 2002. Google ScholarDigital Library
- Maurice Herlihy and Jeanette Wing. Linearizability: A correctness condition for concurrent objects. ACM TOPLAS, 12(3), 1990. Google ScholarDigital Library
- Bart Jacobs and Frank Piessens. Expressive modular fine-grained concurrency specification (extended version). Technical Report CW590, Dept. CS, K. U. Leuven, 2010.Google Scholar
- Bart Jacobs, Jan Smans, and Frank Piessens. A quick tour of the VeriFast program verifier. In APLAS, 2010. Google ScholarDigital Library
- C. B. Jones. Specification and design of (parallel) programs. In IFIP Congress, 1983.Google Scholar
- K. Rustan M. Leino, Peter Müller, and Jan Smans. Foundations of Security Analysis and Design V, FOSAD 2007/2008/2009 Tutorial Lectures, volume 5705 of LNCS, chapter Verification of concurrent programs with Chalice. Springer, 2009. Google ScholarDigital Library
- Peter W. O'Hearn, John Reynolds, and Hongseok Yang. Local reasoning about programs that alter data structures. In CSL, 2001. Google ScholarCross Ref
- Susan Owicki and David Gries. Verifying properties of parallel programs: An axiomatic approach. CACM, 19(5):279--285, May 1976. Google ScholarDigital Library
- Susan Owicki and David Gries. An axiomatic proof technique for parallel programs i. Acta Inf., 6, 1976.Google Scholar
- J. C. Reynolds. Separation logic: a logic for shared mutable data structures. In LICS, 2002. Google ScholarDigital Library
- Viktor Vafeiadis. Modular fine-grained concurrency verification. PhD thesis, Computer Laboratory, University of Cambridge, July 2007.Google Scholar
- Viktor Vafeiadis. Automatically proving linearizability. In CAV, 2010. Google ScholarDigital Library
- Viktor Vafeiadis and Matthew Parkinson. A marriage of rely/guarantee and separation logic. In CONCUR, 2007. Google ScholarDigital Library
Index Terms
- Expressive modular fine-grained concurrency specification
Recommendations
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 ...
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 ...
Logical relations for fine-grained concurrency
POPL '13Fine-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 ...
Comments