Abstract
Reasoning about concurrent programs involves representing the information that concurrent processes manipulate disjoint portions of memory. In sophisticated applications, the division of memory between processes is not static. Through operations, processes can exchange the implied ownership of memory cells. In addition, processes can also share ownership of cells in a controlled fashion as long as they perform operations that do not interfere, e.g., they can concurrently read shared cells. Thus the traditional paradigm of distributed computing based on locations is replaced by a paradigm of concurrent computing which is more tightly based on program structure. Concurrent Separation Logic with Permissions, developed by O’Hearn, Bornat et al., is able to represent sophisticated transfer of ownership and permissions between processes. We demonstrate how these ideas can be used to reason about fine-grained concurrent programs which do not employ explicit synchronization operations to control interference but cooperatively manipulate memory cells so that interference is avoided. Reasoning about such programs is challenging and appropriate logical tools are necessary to carry out the reasoning in a reliable fashion. We argue that Concurrent Separation Logic with Permissions provides such tools. We illustrate the logical techniques by presenting the proof of a concurrent garbage collector originally studied by Dijkstra et al., and extended by Lamport to handle multiple user processes.
Similar content being viewed by others
References
Andrews, G. R. (1991). Concurrent programming: Principles and practice. Menlo Park: Addison Wesley.
Ashcroft, E. A. (1975). Proving assertions about parallel programs. Journal of Computer and System Sciences, 10(1), 110–135.
Ben-Ari, M. (1984). Algorithms for on-the-fly garbage collection. ACM Transactions on Programming Languages and Systems, 6(3), 333–344.
Bornat, R., Calcagno, C., O’Hearn, P. W., & Parkinson, M. (2005). Permission accounting in separation logic. In Symposium on principles of programming languages (pp. 59–70). ACM Press.
Boyland, J. (2003). Checking interference with fractional permissions. In R. Cousot (Ed.), Stat ic anlysis: 10th intern. symp.. Springer lecture notes in computer science (Vol. 2694, pp. 55–72). Springer.
Brinch Hansen, P. (1973). Operating system principles. Englewood Cliffs: Prentice-Hall.
Brookes, S. D. (2007). A semantics for concurrent separation logic. Theoretical Computer Science, 375(1–3), 227–270.
de Roever, W.-P. (2001). Concurrency verification: Introduction to compositional and noncompositional methods. Cambdridge: Cambridge University Press.
Dijkstra, E. W. (1968). Cooperating sequential processes. In F. Genuys (Ed.), Programming languages (pp. 43–112). New York: Academic Press.
Dijkstra, E. W., Lamport, L., Martin, A. J., Scholten, C. S., & Steffens, E. F. M. (1975). On-the-fly garbage collection: An exercise in cooperation. Technical Report EWD496B, University of Texas.
Dijkstra, E. W., Lamport, L., Martin, A. J., Scholten, C. S., & Steffens, E. F. M. (1978). On-the-fly garbage collection: An exercise in cooperation. Communications of the ACM, 21(11), 966–975.
Girard, J.-Y. (1987). Linear logic. Theoretical Computer Science, 50, 1–102.
Gries, D. (1977). An exercise in proving parallel programs correct. Communications of the ACM, 20(12), 921–930.
Hoare, C. A. R. (1969). An axiomatic basis for computer programming. Communications of the ACM, 12, 576–583.
Hoare, C. A. R. (1972). Towards a theory of parallel programming. In C. A. R. Hoare & R. H. Perrott (Eds.), Operating systems techniques (pp. 61–71). Academic Press.
Hoare, C. A. R. (1974). Monitors: An operating system structuring concept. Communications of the ACM, 17(10), 549–558.
Ishtiaq, S. S., & O’Hearn, P. W. (2001). BI as an assertion language for mutable data structures. In Symposium on principles of programming languages (pp. 14–26).
Lamport, L. (1976). Garbage collection with multiple processes: An exercise in parallelism. In Parallel processing (pp. 50–54).
Lamport, L. (1980). The “Hoare logic” of concurrent programs. Acta Informatica, 14, 21–37.
Prensa Nieto, L., & Esparza, J. (2000). Verifying single and multi-mutator garbage collectors with Owicki/Gries in Isabelle/HOL. In M. Nielson & B. Rovan (Eds.), MFCS. Springer lecture notes in computer science (Vol. 1893, pp. 619–628).
O’Hearn, P. W. (2007). Resources, concurrency and local reasoning. Theoretical Computer Science, 375(1–3), 271–307.
O’Hearn, P. W., & Pym, D. J. (1999). The logic of bunched implications. Bulletin Symbolic Logic, 5(2), 215–244.
Owicki, S., & Gries, D. (1976). Verifying properties of parallel programs: An axiomatic approach. Communications of the ACM, 19(5), 279–285.
Owicki, S. S., & Gries, D. (1976). An axiomatic proof technique for parallel programs. Acta Informatica, 6, 319–340.
Parkinson, M., Bornat, R., & O’Hearn, P. W. (2007). Modular verification of a non-blocking stack. In Principles of programming languages (pp. 297–302). ACM.
Pratt, V. R. (1976). Semantical considerations on Floyd–Hoare logic. In Proc. 17th symp. found. comp. sci. (pp. 109–121). IEEE.
Pym, D. J. (2002). The semantics and proof theory of the logic of the logic of bunched implications. Applied logic series (Vol. 26). Kluwer Academic Publishers.
Read, S. (1988). Relevant logic: A philosophical examination of inference. Basil Blackwell.
Reynolds, J. C. (2000). Intuitionistic reasoning about shared mutable data structure. In J. Davis, B. Roscoe, & J. Woodcock (Eds.), Millennial perspectives in computer science. Palgrave, Houndsmill, Hampshire.
Reynolds, J. C. (2002). Separation logic: A logic for shared mutable data structures. In LICS (pp. 55–74).
Russinoff, D. M. (1994). A mechanically verified incremental garbage collector. Formal Aspects Computing, 6(4), 359–390.
Torp-Smith, N., Birkedal, L., & Reynolds, J. C. (2008). Local reasoning about a copying garbage collector. ACM Transactions on Programming Lamguages and Systems, 30(4), 1–58.
Vafeiadis, V., & Parkinson, M., (2007). A marriage of rely/guarantee and separation logic. In CONCUR 2007. Springer lecture notes in computer science (Vol. 4703, pp. 256–271).
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Kapoor, K., Lodaya, K. & Reddy, U.S. Fine-grained Concurrency with Separation Logic. J Philos Logic 40, 583–632 (2011). https://doi.org/10.1007/s10992-011-9195-1
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10992-011-9195-1