Communicating State Transition Systems for Fine-Grained Concurrent Resources
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.
Unable to display preview. Download preview PDF.
- 1.Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development. Coq’Art: The Calculus of Inductive Constructions. Springer (2004)Google Scholar
- 2.Brookes, S.: A semantics for concurrent separation logic. Th. Comp. Sci. 375(1-3) (2007)Google Scholar
- 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
- 5.Feng, X.: Local rely-guarantee reasoning. In: POPL 2009 (2009)Google Scholar
- 7.Herlihy, M., Shavit, N.: The art of multiprocessor programming. M. Kaufmann (2008)Google Scholar
- 8.Jones, C.B.: Tentative steps toward a development method for interfering programs. ACM Trans. Prog. Lang. Syst. 5(4) (1983)Google Scholar
- 9.Kleymann, T.: Hoare logic and auxiliary variables. Formal Asp. Comput. 11(5) (1999)Google Scholar
- 10.Ley-Wild, R., Nanevski, A.: Subjective auxiliary state for coarse-grained concurrency. In: POPL 2013 (2013)Google Scholar
- 11.Nanevski, A., Ley-Wild, R., Sergey, I., Delbianco, G.A.: Supporting Material, http://software.imdea.org/~aleks/fcsl/
- 12.O’Hearn, P.W.: Resources, concurrency, and local reasoning. Th. Comp. Sci. 375(1-3) (2007)Google Scholar
- 13.Owicki, S.S., Gries, D.: Verifying properties of parallel programs: An axiomatic approach. Commun. ACM 19(5) (1976)Google Scholar
- 14.Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: LICS (2002)Google Scholar
- 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.The Coq Development Team. The Coq Proof Assistant Reference Manual - Version V8.4 (2012), http://coq.inria.fr/
- 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