Communicating State Transition Systems for Fine-Grained Concurrent Resources

  • Aleksandar Nanevski
  • Ruy Ley-Wild
  • Ilya Sergey
  • Germán Andrés Delbianco
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8410)

Abstract

We present a novel model of concurrent computations with shared memory and provide a simple, yet powerful, logical framework for uniform Hoarestyle reasoning about partial correctness of coarse- and fine-grained concurrent programs. The key idea is to specify arbitrary resource protocols as communicating state transition systems (STS) that describe valid states of a resource and the transitions the resource is allowed to make, including transfer of heap ownership.

We demonstrate how reasoning in terms of communicating STS makes it easy to crystallize behavioral invariants of a resource. We also provide entanglement operators to build large systems from an arbitrary number of STS components, by interconnecting their lines of communication. Furthermore, we show how the classical rules from the Concurrent Separation Logic (CSL), such as scoped resource allocation, can be generalized to fine-grained resource management. This allows us to give specifications as powerful as Rely-Guarantee, in a concise, scoped way, and yet regain the compositionality of CSL-style resource management. We proved the soundness of our logic with respect to the denotational semantics of action trees (variation on Brookes’ action traces). We formalized the logic as a shallow embedding in Coq and implemented a number of examples, including a construction of coarse-grained CSL resources as a modular composition of various logical and semantic components.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development. Coq’Art: The Calculus of Inductive Constructions. Springer (2004)Google Scholar
  2. 2.
    Brookes, S.: A semantics for concurrent separation logic. Th. Comp. Sci. 375(1-3) (2007)Google Scholar
  3. 3.
    Dinsdale-Young, T., Birkedal, L., Gardner, P., Parkinson, M.J., Yang, H.: Views: compositional reasoning for concurrent programs. In: POPL 2013 (2013)Google Scholar
  4. 4.
    Dinsdale-Young, T., Dodds, M., Gardner, P., Parkinson, M.J., Vafeiadis, V.: Concurrent abstract predicates. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 504–528. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  5. 5.
    Feng, X.: Local rely-guarantee reasoning. In: POPL 2009 (2009)Google Scholar
  6. 6.
    Feng, X., Ferreira, R., Shao, Z.: On the relationship between concurrent separation logic and assume-guarantee reasoning. In: De Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 173–188. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  7. 7.
    Herlihy, M., Shavit, N.: The art of multiprocessor programming. M. Kaufmann (2008)Google Scholar
  8. 8.
    Jones, C.B.: Tentative steps toward a development method for interfering programs. ACM Trans. Prog. Lang. Syst. 5(4) (1983)Google Scholar
  9. 9.
    Kleymann, T.: Hoare logic and auxiliary variables. Formal Asp. Comput. 11(5) (1999)Google Scholar
  10. 10.
    Ley-Wild, R., Nanevski, A.: Subjective auxiliary state for coarse-grained concurrency. In: POPL 2013 (2013)Google Scholar
  11. 11.
    Nanevski, A., Ley-Wild, R., Sergey, I., Delbianco, G.A.: Supporting Material, http://software.imdea.org/~aleks/fcsl/
  12. 12.
    O’Hearn, P.W.: Resources, concurrency, and local reasoning. Th. Comp. Sci. 375(1-3) (2007)Google Scholar
  13. 13.
    Owicki, S.S., Gries, D.: Verifying properties of parallel programs: An axiomatic approach. Commun. ACM 19(5) (1976)Google Scholar
  14. 14.
    Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: LICS (2002)Google Scholar
  15. 15.
    Svendsen, K., Birkedal, L., Parkinson, M.: Modular reasoning about separation of concurrent data structures. In: Felleisen, M., Gardner, P. (eds.) ESOP 2013. LNCS, vol. 7792, pp. 169–188. Springer, Heidelberg (2013)Google Scholar
  16. 16.
    The Coq Development Team. The Coq Proof Assistant Reference Manual - Version V8.4 (2012), http://coq.inria.fr/
  17. 17.
    Turon, A., Dreyer, D., Birkedal, L.: Unifying refinement and Hoare-style reasoning in a logic for higher-order concurrency. In: ICFP 2013 (2013)Google Scholar
  18. 18.
    Vafeiadis, V., Parkinson, M.: A marriage of rely/guarantee and separation logic. In: Caires, L., Vasconcelos, V.T. (eds.) CONCUR 2007. LNCS, vol. 4703, pp. 256–271. Springer, Heidelberg (2007)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2014

Authors and Affiliations

  • Aleksandar Nanevski
    • 1
  • Ruy Ley-Wild
    • 2
  • Ilya Sergey
    • 1
  • Germán Andrés Delbianco
    • 1
  1. 1.IMDEA Software InstituteSpain
  2. 2.LogicBloxUSA

Personalised recommendations