skip to main content
research-article

Interactive proofs in higher-order concurrent separation logic

Published:01 January 2017Publication History
Skip Abstract Section

Abstract

When using a proof assistant to reason in an embedded logic -- like separation logic -- one cannot benefit from the proof contexts and basic tactics of the proof assistant. This results in proofs that are at a too low level of abstraction because they are cluttered with bookkeeping code related to manipulating the object logic.

In this paper, we introduce a so-called proof mode that extends the Coq proof assistant with (spatial and non-spatial) named proof contexts for the object logic. We show that thanks to these contexts we can implement high-level tactics for introduction and elimination of the connectives of the object logic, and thereby make reasoning in the embedded logic as seamless as reasoning in the meta logic of the proof assistant. We apply our method to Iris: a state of the art higher-order impredicative concurrent separation logic.

We show that our method is very general, and is not just limited to program verification. We demonstrate its generality by formalizing correctness proofs of fine-grained concurrent algorithms, derived constructs of the Iris logic, and a unary and binary logical relation for a language with concurrency, higher-order store, polymorphism, and recursive types. This is the first formalization of a binary logical relation for such an expressive language. We also show how to use the logical relation to prove contextual refinement of fine-grained concurrent algorithms.

References

  1. A. Ahmed. Semantics of Types for Mutable State. PhD thesis, Princeton University, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A. Ahmed. Step-indexed syntactic logical relations for recursive and quantified types. In ESOP, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. A. Appel, P.-A. Melliès, C. Richards, and J. Vouillon. A very modal model of a modern, major, general type system. In POPL, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. A. W. Appel. Tactics for Separation Logic, 2006. Available at http://www.cs.princeton.edu/~appel/papers/septacs.pdf.Google ScholarGoogle Scholar
  5. A. W. Appel, editor. Program Logics for Certified Compilers. Cambridge University Press, 2014. Google ScholarGoogle ScholarCross RefCross Ref
  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. J. Berdine, C. Calcagno, and P. W. O’Hearn. Symbolic Execution with Separation Logic. In APLAS, volume 3780 of LNCS, pages 52–68, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. L. Birkedal, B. Reus, J. Schwinghammer, K. Støvring, J. Thamsborg, and H. Yang. Step-indexed Kripke models over recursive worlds. In POPL, 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. Coq Development Team. The Coq Proof Assistant Reference Manual, 2016. Available at https://coq.inria.fr/doc/.Google ScholarGoogle Scholar
  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. D. Delahaye. A Tactic Language for the System Coq. In LPAR, volume 1955 of LNCS, pages 85–95, 2000. 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. D. Dreyer. ERC Project “RustBelt”, 2016. Available at http://plv.mpi-sws.org/rustbelt/.Google ScholarGoogle Scholar
  15. D. Dreyer, A. Ahmed, and L. Birkedal. Logical step-indexed logical relations. LMCS, 7(2:16), 2011.Google ScholarGoogle Scholar
  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. M. Gordon and T. Melham, editors. Introduction to HOL. Cambridge University Press, 1993.Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. M. J. C. Gordon, R. Milner, and C. P. Wadsworth. Edinburgh LCF, volume 78 of LNCS. Springer, 1979.Google ScholarGoogle ScholarCross RefCross Ref
  21. B. Jacobs, J. Smans, P. Philippaerts, F. Vogels, W. Penninckx, and F. Piessens. VeriFast: A Powerful, Sound, Predictable, Fast Verifier for C and Java. In NFM, volume 6617 of LNCS, pages 41–55, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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
  23. R. Jung, R. Krebbers, L. Birkedal, and D. Dreyer. Higher-order ghost state. In ICFP, pages 256–269, 2016. 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. R. Krebbers, R. Jung, A. Bizjak, J.-H. Jourdan, D. Dreyer, and L. Birkedal. The Essence of Higher-Order Concurrent Separation Logic, 2016. Draft.Google ScholarGoogle Scholar
  27. M. Krogh-Jespersen, K. Svendsen, and L. Birkedal. A Logical Account of a Type-and-Effect System. In POPL, 2017.Google ScholarGoogle Scholar
  28. G. Malecha and J. Bengtson. Extensible and Efficient Automation Through Reflective Tactics. In ESOP, volume 9632 of LNCS, pages 532–559, 2016.Google ScholarGoogle Scholar
  29. A. McCreight. Practical Tactics for Separation Logic. In TPHOLs, volume 5674 of LNCS, pages 343–358, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. H. Nakano. A modality for recursion. In LICS, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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
  32. A. Nanevski, V. Vafeiadis, and J. Berdine. Structuring the verification of heap-manipulating programs. In POPL, pages 261–274, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. A. Pilkiewicz and F. Pottier. The essence of monotonic state. In TLDI, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. G. Plotkin and M. Abadi. A logic for parametric polymorphism. In TLCA, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. S. Schäfer, T. Tebbi, and G. Smolka. Autosubst: Reasoning with de Bruijn Terms and Parallel Substitutions. In ITP, volume 9236 of LNCS, pages 359–374, 2015.Google ScholarGoogle Scholar
  36. 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
  37. 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
  38. M. Sozeau and N. Oury. First-Class Type Classes. In TPHOLs, volume 5170 of LNCS, pages 278–293, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. B. Spitters and E. van der Weegen. Type classes for mathematics in type theory. MSCS, 21(4):795–825, 2011.Google ScholarGoogle Scholar
  40. K. Svendsen and L. Birkedal. Impredicative concurrent abstract predicates. In ESOP, pages 149–168, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. 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
  42. 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
  43. V. Vafeiadis and M. Parkinson. A marriage of rely/guarantee and separation logic. In CONCUR, pages 256–271, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. M. Wildmoser and T. Nipkow. Certifying Machine Code Safety: Shallow Versus Deep Embedding. In TPHOLs, volume 3223 of LNCS, pages 305–320, 2004.Google ScholarGoogle Scholar

Index Terms

  1. Interactive proofs in higher-order concurrent separation logic

          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

          Full Access

          • Published in

            cover image ACM SIGPLAN Notices
            ACM SIGPLAN Notices  Volume 52, Issue 1
            POPL '17
            January 2017
            901 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/3093333
            Issue’s Table of Contents
            • cover image ACM Conferences
              POPL '17: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages
              January 2017
              901 pages
              ISBN:9781450346603
              DOI:10.1145/3009837

            Copyright © 2017 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: 1 January 2017

            Check for updates

            Qualifiers

            • research-article

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader