skip to main content
research-article

Logical relations for fine-grained concurrency

Published:23 January 2013Publication History
Skip Abstract Section

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).

Skip Supplemental Material Section

Supplemental Material

r1d2_talk9.mp4

References

  1. M. Abadi and L. Lamport. The existence of refinement mappings. Theoretical Computer Science, 82(2):253--284, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A. Ahmed. Step-indexed syntactic logical relations for recursive and quantified types. In ESOP, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. A. Ahmed, D. Dreyer, and A. Rossberg. State-dependent representation independence. In POPL, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. L. Birkedal, F. Sieczkowski, and J. Thamsborg. A concurrent logical relation. In CSL, Sept. 2012.Google ScholarGoogle Scholar
  6. S. Brookes. Full abstraction for a shared variable parallel language. Information and Computation, 127(2):145--163, 1996.Google ScholarGoogle ScholarCross RefCross Ref
  7. T. Dinsdale-Young, M. Dodds, P. Gardner, M. Parkinson, and V. Vafeiadis. Concurrent abstract predicates. In ECOOP, June 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. Dodds, X. Feng, M. Parkinson, and V. Vafeiadis. Deny-guarantee reasoning. In ESOP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. D. Dreyer, G. Neis, and L. Birkedal. The impact of higher-order state and control effects on local relational reasoning. In ICFP, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. D. Dreyer, G. Neis, A. Rossberg, and L. Birkedal. A relational modal logic for higher-order stateful ADTs. In POPL, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. T. Elmas, S. Qadeer, A. Sezgin, O. Subasi, and S. Tasiran. Simplifying linearizability proofs with reduction and abstraction. In TACAS, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. X. Feng. Local rely-guarantee reasoning. In POPL, pages 315--327. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. X. Feng, R. Ferreira, and Z. Shao. On the relationship between concurrent separation logic and assume-guarantee reasoning. In ESOP, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. I. Filipović, P. O'Hearn, N. Rinetzky, and H. Yang. Abstraction for concurrent objects. Theoretical Computer Science, 411, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. K. Fraser and T. Harris. Concurrent programming without locks. ACM Trans. Comput. Syst., 25(2), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. A. Gotsman and H. Yang. Linearizability with ownership transfer. In CONCUR, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarCross RefCross Ref
  18. T. Harris, K. Fraser, and I. Pratt. A practical multi-word compare-and-swap operation. In DISC, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. D. Hendler, N. Shavit, and L. Yerushalmi. A scalable lock-free stack algorithm. In SPAA, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. M. Herlihy and N. Shavit. The Art of Multiprocessor Programming. Morgan Kaufmann, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. M. P. Herlihy and J. M. Wing. Linearizability: a correctness condition for concurrent objects. TOPLAS, 12(3):463--492, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. C. A. R. Hoare. Proof of correctness of data representations. Acta Informatica, 1(4):271--281, 1972.Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. C. B. Jones. Tentative steps toward a development method for interfering programs. TOPLAS, 5(4):596--619, 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. H. Liang and X. Feng. Modular verification of linearizability with non-fixed linearization points. Manuscript, July 2012.Google ScholarGoogle Scholar
  25. H. Liang, X. Feng, and M. Fu. A rely-guarantee-based simulation for verifying concurrent program transformations. In POPL, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. R. J. Lipton. Reduction: a method of proving properties of parallel programs. Commun. ACM, 18(12):717--721, 1975. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. J. Lucassen and D. Gifford. Polymorphic effect systems. In POPL, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. N. Lynch and F. Vaandrager. Forward and backward simulations I: untimed systems. Inf. Comput., 121(2):214--233, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  30. P. O'Hearn, N. Rinetzky, M. Vechev, E. Yahav, and G. Yorsh. Verifying linearizability with hindsight. In PODC, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. P. W. O'Hearn. Resources, concurrency, and local reasoning. Theor. Comput. Sci., 375(1--3):271--307, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. J. C. Reynolds. Types, Abstraction and Parametric Polymorphism. In Information Processing, 1983.Google ScholarGoogle Scholar
  33. J. C. Reynolds. Separation logic: A logic for shared mutable data structures. In LICS, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. R. Treiber. Systems programming: coping with parallelism. Technical report, Almaden Research Center, 1986.Google ScholarGoogle Scholar
  35. 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 ScholarGoogle Scholar
  36. A. Turon and M. Wand. A separation logic for refining concurrent objects. In POPL, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. V. Vafeiadis. Modular fine-grained concurrency verification. PhD thesis, University of Cambridge, 2008.Google ScholarGoogle Scholar
  38. V. Vafeiadis and M. Parkinson. A marriage of rely/guarantee and separation logic. In CONCUR, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. R. J. van Glabbeek. The linear time - branching time spectrum. In CONCUR, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Logical relations for fine-grained concurrency

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!