skip to main content
10.1145/2951913.2951943acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Higher-order ghost state

Published:04 September 2016Publication History

ABSTRACT

The development of concurrent separation logic (CSL) has sparked a long line of work on modular verification of sophisticated concurrent programs. Two of the most important features supported by several existing extensions to CSL are higher-order quantification and custom ghost state. However, none of the logics that support both of these features reap the full potential of their combination. In particular, none of them provide general support for a feature we dub "higher-order ghost state": the ability to store arbitrary higher-order separation-logic predicates in ghost variables.

In this paper, we propose higher-order ghost state as a interesting and useful extension to CSL, which we formalize in the framework of Jung et al.'s recently developed Iris logic. To justify its soundness, we develop a novel algebraic structure called CMRAs ("cameras"), which can be thought of as "step-indexed partial commutative monoids". Finally, we show that Iris proofs utilizing higher-order ghost state can be effectively formalized in Coq, and discuss the challenges we faced in formalizing them.

References

  1. Higher-Order Ghost State: Appendix and Coq development. Available on the Iris project website at http://plv.mpi-sws.org/iris/.Google ScholarGoogle Scholar
  2. P. America and J. Rutten. Solving reflexive domain equations in a category of complete metric spaces. JCSS, 39(3):343–375, 1989.Google ScholarGoogle ScholarCross RefCross Ref
  3. A. Appel and D. McAllester. An indexed model of recursive types for foundational proof-carrying code. TOPLAS, 23(5):657–683, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. A. W. Appel, editor. Program Logics for Certified Compilers. Cambridge University Press, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. A. Asperti, W. Ricciotti, C. S. Coen, and E. Tassi. Hints in unification. In TPHOLs, volume 5674 of LNCS, pages 84–98, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. J. Bengtson, J. B. Jensen, and L. Birkedal. Charge! - A Framework for Higher-Order Separation Logic in Coq. In ITP, volume 7406 of LNCS, pages 315–331, 2012.Google ScholarGoogle Scholar
  7. L. Birkedal, K. Støvring, and J. Thamsborg. The category-theoretic solution of recursive metric-space equations. TCS, 411(47):4102–4122, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. A. Buisse, L. Birkedal, and K. Støvring. Step-indexed Kripke model of separation logic for storable locks. ENTCS, 276:121–143, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. A. Chlipala. The Bedrock structured programming system: combining generative metaprogramming and Hoare logic in an extensible program verifier. In ICFP, pages 391–402, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. E. Cohen, E. Alkassar, V. Boyarinov, M. Dahlweid, U. Degenbaev, M. Hillebrand, B. Langenstein, D. Leinenbach, M. Moskal, S. Obua, W. Paul, H. Pentchev, E. Petrova, T. Santen, N. Schirmer, S. Schmaltz, W. Schulte, A. Shadrin, S. Tobies, A. Tsyban, and S. Tverdyshev. Invariants, modularity, and rights. In PSI, volume 5947 of LNCS, pages 43–55, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. P. da Rocha Pinto, T. Dinsdale-Young, and P. Gardner. TaDA: A logic for time and data abstraction. In ECOOP, pages 207–231, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. T. Dinsdale-Young, L. Birkedal, P. Gardner, M. J. Parkinson, and H. Yang. Views: Compositional reasoning for concurrent programs. In POPL, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. T. Dinsdale-Young, M. Dodds, P. Gardner, M. Parkinson, and V. Vafeiadis. Concurrent abstract predicates. In ECOOP, pages 504–528, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. R. Dockins, A. Hobor, and A. W. Appel. A fresh look at separation algebras and share accounting. In APLAS, pages 161–177, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. Dodds, S. Jagannathan, M. J. Parkinson, K. Svendsen, and L. Birkedal. Verifying custom synchronization constructs using higher-order separation logic. TOPLAS, 38(2):4, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. X. Feng. Local rely-guarantee reasoning. In POPL, pages 315–327, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. X. Feng, R. Ferreira, and Z. Shao. On the relationship between concurrent separation logic and assume-guarantee reasoning. In ESOP, pages 173–188, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. M. Fu, Y. Li, X. Feng, Z. Shao, and Y. Zhang. Reasoning about optimistic concurrency using a program logic for history. In CONCUR, pages 388–402, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. F. Garillot, G. Gonthier, A. Mahboubi, and L. Rideau. Packaging mathematical structures. In TPHOLs, volume 5674 of LNCS, pages 327–342, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. A. Gotsman, J. Berdine, B. Cook, N. Rinetzky, and M. Sagiv. Local reasoning for storable locks and threads. In APLAS, pages 19–37, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. A. Hobor, A. Appel, and F. Zappa Nardelli. Oracle semantics for concurrent separation logic. In ESOP, pages 353–367, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. A. Hobor, R. Dockins, and A. Appel. A theory of indirection via approximation. In POPL, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. J. B. Jensen, N. Benton, and A. Kennedy. High-level separation logic for low-level code. In POPL, pages 301–314, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. R. Jung, D. Swasey, F. Sieczkowski, K. Svendsen, A. Turon, L. Birkedal, and D. Dreyer. Iris: Monoids and invariants as an orthogonal basis for concurrent reasoning. In POPL, pages 637–650, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. R. Krebbers. The C standard formalized in Coq. PhD thesis, Radboud University, 2015.Google ScholarGoogle Scholar
  26. G. Malecha and J. Bengtson. Easy and efficient automation through reflective tactics. In ESOP, 2016.Google ScholarGoogle Scholar
  27. A. Nanevski, R. Ley-Wild, I. Sergey, and G. A. Delbianco. Communicating state transition systems for fine-grained concurrent resources. In ESOP, pages 290–310, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. P. O’Hearn. Resources, concurrency, and local reasoning. TCS, 375(1):271–307, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. S. Owicki and D. Gries. Verifying properties of parallel programs: An axiomatic approach. CACM, 19(5):279–285, 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. F. Pottier. Syntactic soundness proof of a type-and-capability system with hidden state. JFP, 23(1):38–144, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. I. Sergey, A. Nanevski, and A. Banerjee. Mechanized verification of fine-grained concurrent programs. In PLDI, pages 77–87, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. F. Sieczkowski, A. Bizjak, and L. Birkedal. ModuRes: A Coq library for modular reasoning about concurrent higher-order imperative programming languages. In ITP, volume 9236 of LNCS, pages 375– 390, 2015.Google ScholarGoogle Scholar
  33. M. Sozeau. A new look at generalized rewriting in type theory. JFR, 2(1):41–62, 2009.Google ScholarGoogle Scholar
  34. B. Spitters and E. van der Weegen. Type classes for mathematics in type theory. MSCS, 21(4):795–825, 2011.Google ScholarGoogle Scholar
  35. K. Svendsen and L. Birkedal. Impredicative concurrent abstract predicates. In ESOP, pages 149–168, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. K. Svendsen, L. Birkedal, and M. J. Parkinson. Modular reasoning about separation of concurrent data structures. In ESOP, pages 169– 188, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. H. Tuch, G. Klein, and M. Norrish. Types, bytes, and separation logic. In POPL, pages 97–108, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. A. Turon, D. Dreyer, and L. Birkedal. Unifying refinement and Hoarestyle reasoning in a logic for higher-order concurrency. In ICFP, pages 377–390, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. A. Turon, V. Vafeiadis, and D. Dreyer. GPS: navigating weak memory with ghosts, protocols, and separation. In OOPSLA, pages 691–707, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. V. Vafeiadis and M. Parkinson. A marriage of rely/guarantee and separation logic. In CONCUR, pages 256–271, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Higher-order ghost state

          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
            ICFP 2016: Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming
            September 2016
            501 pages
            ISBN:9781450342193
            DOI:10.1145/2951913

            Copyright © 2016 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 the author(s) 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: 4 September 2016

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article

            Acceptance Rates

            Overall Acceptance Rate333of1,064submissions,31%

            Upcoming Conference

            ICFP '24

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader