skip to main content
10.1145/2103656.2103711acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

A rely-guarantee-based simulation for verifying concurrent program transformations

Authors Info & Claims
Published:25 January 2012Publication History

ABSTRACT

Verifying program transformations usually requires proving that the resulting program (the target) refines or is equivalent to the original one (the source). However, the refinement relation between individual sequential threads cannot be preserved in general with the presence of parallel compositions, due to instruction reordering and the different granularities of atomic operations at the source and the target. On the other hand, the refinement relation defined based on fully abstract semantics of concurrent programs assumes arbitrary parallel environments, which is too strong and cannot be satisfied by many well-known transformations. In this paper, we propose a Rely-Guarantee-based Simulation (RGSim) to verify concurrent program transformations. The relation is parametrized with constraints of the environments that the source and the target programs may compose with. It considers the interference between threads and their environments, thus is less permissive than relations over sequential programs. It is compositional w.r.t. parallel compositions as long as the constraints are satisfied. Also, RGSim does not require semantics preservation under all environments, and can incorporate the assumptions about environments made by specific program transformations in the form of rely/guarantee conditions. We use RGSim to reason about optimizations and prove atomicity of concurrent objects. We also propose a general garbage collector verification framework based on RGSim, and verify the Boehm et al. concurrent mark-sweep GC.

Skip Supplemental Material Section

Supplemental Material

popl_7a_3.mp4

mp4

140.8 MB

References

  1. M. Abadi and G. Plotkin. A model of cooperative threads. In Proc. 36th ACM Symp. on Principles of Prog. Lang. (POPL'09), pages 29--40. ACM Press, January 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. K. Barabash, O. Ben-Yitzhak, I. Goft, E. K. Kolodner, V. Leikehman, Y. Ossia, A. Owshanko, and E. Petrank. A parallel, incremental, mostly concurrent garbage collector for servers. ACM Trans. Program. Lang. Syst., 27 (6): 1097--1146, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. N. Benton. Simple relational correctness proofs for static analyses and program transformations. In Proc. 31th ACM Symp. on Principles of Prog. Lang. (POPL'04), pages 14--25. ACM Press, January 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. N. Benton and C.-K. Hur. Biorthogonality, step-indexing and compiler correctness. In Proc. 14th ACM Int'l Conf. on Functional Prog. (ICFP'09), pages 97--108. ACM Press, September 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. H.-J. Boehm. Threads cannot be implemented as a library. In Proc. 2005 ACM Conf. on Prog. Lang. Design and Impl. (PLDI'05), pages 261--268. ACM Press, June 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. H.-J. Boehm and S. V. Adve. Foundations of the C+ concurrency memory model. In Proc. 2008 ACM Conf. on Prog. Lang. Design and Impl. (PLDI'08), pages 68--78. ACM Press, June 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. H.-J. Boehm, A. J. Demers, and S. Shenker. Mostly parallel garbage collection. In Proc. 1991 ACM Conf. on Prog. Lang. Design and Impl. (PLDI'91), pages 157--164. ACM Press, June 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. S. D. Brookes. Full abstraction for a shared-variable parallel language. Inf. Comput., 127 (2): 145--163, 1996.Google ScholarGoogle ScholarCross RefCross Ref
  9. S. Burckhardt, M. Musuvathi, and V. Singh. Verifying local transformations on relaxed memory models. In Proc. 19th Int'l Conf. on Compiler Construction (CC'10), volume 6011 of Lecture Notes in Computer Science, pages 104--123. Springer, March 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Coq Development Team. The Coq proof assistant reference manual. The Coq release v8.3, October 2010.Google ScholarGoogle Scholar
  11. D. Dice, O. Shalev, and N. Shavit. Transactional locking II. In Proc. 20th Int'l Symp. on Distributed Computing (DISC'06), volume 4167 of Lecture Notes in Computer Science, pages 194--208. Springer, September 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. T. Elmas, S. Qadeer, A. Sezgin, O. Subasi, and S. Tasiran. Simplifying linearizability proofs with reduction and abstraction. In Proc. 16th Int'l Conf. on Tools and Algorithms for the Construction and Analysis of Systems (TACAS'10), volume 6015 of Lecture Notes in Computer Science, pages 296--311. Springer, March 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. I. Filipović, P. O'Hearn, N. Rinetzky, and H. Yang. Abstraction for concurrent objects. In Proc. 18th European Symp. on Prog. (ESOP'09), volume 5502 of Lecture Notes in Computer Science, pages 252--266. Springer, March 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. D. S. Gladstein and M. Wand. Compiler correctness for concurrent languages. In Proc. 1st Int'l Conf. on Coordination Languages and Models (COORDINATION'96), volume 1061 of Lecture Notes in Computer Science, pages 231--248. Springer, April 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. Herlihy and N. Shavit. The Art of Multiprocessor Programming. Morgan Kaufmann, April 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. C.-K. Hur and D. Dreyer. A Kripke logical relation between ML and assembly. In Proc. 38th ACM Symp. on Principles of Prog. Lang. (POPL'11), pages 133--146. ACM Press, January 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. C. B. Jones. Tentative steps toward a development method for interfering programs. ACM Trans. Program. Lang. Syst., 5 (4): 596--619, 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. K. Kapoor, K. Lodaya, and U. Reddy. Fine-grained concurrency with separation logic. J. Philosophical Logic, 40 (5): 583--632, 2011.Google ScholarGoogle ScholarCross RefCross Ref
  19. X. Leroy. A formally verified compiler back-end. J. Autom. Reason., 43 (4): 363--446, December 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. H. Liang, X. Feng, and M. Fu. A rely-guarantee-based simulation for verifying concurrent program transformations. Technical report (with Coq implementation), University of Science and Technology of China, October 2011. http://kyhcs.ustcsz.edu.cn/relconcur/rgsim.Google ScholarGoogle Scholar
  21. A. Lochbihler. Verifying a compiler for java threads. In Proc. 20th European Symp. on Prog. (ESOP'10), volume 6012 of Lecture Notes in Computer Science, pages 427--447. Springer, March 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. A. McCreight, Z. Shao, C. Lin, and L. Li. A general framework for certifying garbage collectors and their mutators. In Proc. 2007 ACM Conf. on Prog. Lang. Design and Impl. (PLDI'07), pages 468--479. ACM Press, June 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M. Parkinson, R. Bornat, and C. Calcagno. Variables as resource in Hoare logics. In Proc. 21th IEEE Symp. on Logic In Computer Science (LICS'06), pages 137--146. IEEE Computer Society, August 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. D. Pavlovic, P. Pepper, and D. R. Smith. Formal derivation of concurrent garbage collectors. In Proc. 10th Int'l Conf. on Mathematics of Program Construction (MPC'10), volume 6120 of Lecture Notes in Computer Science, pages 353--376. Springer, June 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. J. Sevcík, V. Vafeiadis, F. Z. Nardelli, S. Jagannathan, and P. Sewell. Relaxed-memory concurrency and verified compilation. In Proc. 38th ACM Symp. on Principles of Prog. Lang. (POPL'11), pages 43--54. ACM Press, January 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. R. K. Treiber. System programming: coping with parallelism. Technical Report RJ 5118, IBM Almaden Research Center, 1986.Google ScholarGoogle Scholar
  27. A. Turon and M. Wand. A separation logic for refining concurrent objects. In Proc. 38th ACM Symp. on Principles of Prog. Lang. (POPL'11), pages 247--258. ACM Press, January 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. V. Vafeiadis. Modular fine-grained concurrency verification. Technical Report UCAM-CL-TR-726, University of Cambridge, Computer Laboratory, July 2008.Google ScholarGoogle Scholar
  29. V. Vafeiadis and M. J. Parkinson. A marriage of rely/guarantee and separation logic. In Proc. 18th Int'l Conf. on Concurrency Theory (CONCUR'07), volume 4703, pages 256--271. Springer, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. M. T. Vechev, E. Yahav, and D. F. Bacon. Correctness-preserving derivation of concurrent garbage collection algorithms. In Proc. 2006 ACM Conf. on Prog. Lang. Design and Impl. (PLDI'06), pages 341--353. ACM Press, June 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. M. Wand. Compiler correctness for parallel languages. In Proc. Conf. on Functional Prog. Lang. and Computer Architecture (FPCA'95), pages 120--134. ACM Press, June 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. H. Yang. Relational separation logic. Theoretical Computer Science, 375 (1--3): 308--334, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A rely-guarantee-based simulation for verifying concurrent program transformations

            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
            • Published in

              cover image ACM Conferences
              POPL '12: Proceedings of the 39th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
              January 2012
              602 pages
              ISBN:9781450310833
              DOI:10.1145/2103656
              • cover image ACM SIGPLAN Notices
                ACM SIGPLAN Notices  Volume 47, Issue 1
                POPL '12
                January 2012
                569 pages
                ISSN:0362-1340
                EISSN:1558-1160
                DOI:10.1145/2103621
                Issue’s Table of Contents

              Copyright © 2012 ACM

              Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 25 January 2012

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • research-article

              Acceptance Rates

              Overall Acceptance Rate824of4,130submissions,20%

              Upcoming Conference

              POPL '25

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader