skip to main content
research-article

A relational model of types-and-effects in higher-order concurrent separation logic

Published:01 January 2017Publication History
Skip Abstract Section

Abstract

Recently we have seen a renewed interest in programming languages that tame the complexity of state and concurrency through refined type systems with more fine-grained control over effects. In addition to simplifying reasoning and eliminating whole classes of bugs, statically tracking effects opens the door to advanced compiler optimizations.

In this paper we present a relational model of a type-and-effect system for a higher-order, concurrent program- ming language. The model precisely captures the semantic invariants expressed by the effect annotations. We demonstrate that these invariants are strong enough to prove advanced program transformations, including automatic parallelization of expressions with suitably disjoint effects. The model also supports refinement proofs between abstract data types implementations with different internal data representations, including proofs that fine-grained concurrent algorithms refine their coarse-grained counterparts. This is the first model for such an expressive language that supports both effect-based optimizations and data abstraction.

The logical relation is defined in Iris, a state-of-the-art higher-order concurrent separation logic. This greatly simplifies proving well-definedness of the logical relation and also provides us with a powerful logic for reasoning in the model.

References

  1. A. Ahmed, A. Appel, and R. Virga. A Stratified Semantics of General References. In LICS, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A. Ahmed, D. Dreyer, and A. Rossberg. State-dependent representation independence. In POPL, 2009. 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. N. Benton and P. Buchlovsky. Semantics of an effect analysis for exceptions. In TLDI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. N. Benton, A. Kennedy, M. Hofmann, and L. Beringer. Reading, writing and relations. In PLAS. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. N. Benton, A. Kennedy, L. Beringer, and M. Hofmann. Relational semantics for effect-based program transformations with dynamic allocation. In PPDP, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. N. Benton, A. Kennedy, L. Beringer, and M. Hofmann. Relational semantics for effect-based program transformations: higher-order store. In PPDP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. N. Benton, M. Hofmann, and V. Nigam. Abstract effects and proofrelevant logical relations. In POPL, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. N. Benton, M. Hofmann, and V. Nigam. Effect-dependent transformations for concurrent programs. In PPDP, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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
  11. L. Birkedal, F. Sieczkowski, and J. Thamsborg. A concurrent logical relation. In CSL, 2012.Google ScholarGoogle Scholar
  12. M. Botincan, M. Dodds, and S. Jagannathan. Proof-Directed Parallelization Synthesis by Separation Logic. TOPLAS, 35(2), 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. D. Dreyer, A. Ahmed, and L. Birkedal. Logical step-indexed logical relations. Logical Methods in Computer Science, 7(2), 2011.Google ScholarGoogle Scholar
  14. M. Fähndrich and R. DeLine. Adoption and focus: practical linear types for imperative programming. In PLDI, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. D. K. Gifford and J. M. Lucassen. Integrating functional and imperative programming. In LISP, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. N. Krishnaswami, P. Pradic, and N. Benton. Integrating linear and dependent types. In POPL, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. M. Krogh-Jespersen, K. Svendsen, and L. Birkedal. A Relational Model of Types-and-Effects in Higher-Order Concurrent Separation Logic: Technical Appendix. http://www.kasv.dk/ irisrelmodel-tr.pdf.Google ScholarGoogle Scholar
  19. J. M. Lucassen and D. K. Gifford. Polymorphic effect systems. In POPL, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. G. Morrisett, A. Ahmed, and M. Fluet. L3: A linear language with locations. In TLCA, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. A. Nanevski, G. Morrisett, and L. Birkedal. Polymorphism and separation in hoare type theory. In ICFP, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. G. Plotkin and M. Abadi. A logic for parametric polymorphism. In TLCA, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. F. Pottier. Hiding local state in direct style: a higher-order anti-frame rule. In LICS, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. F. Pottier and J. Protzenko. Programming with permissions in Mezzo. In ICFP, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. F. Pottier and J. Protzenko. A few lessons from the mezzo project. In SNAPL, 2015.Google ScholarGoogle Scholar
  26. M. Raza, C. Calcagno, and P. Gardner. Automatic Parallelization with Separation Logic. In ESOP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Rust Language. https://doc.rust-lang.org, 2016.Google ScholarGoogle Scholar
  28. F. Smith, D. Walker, and G. Morrisett. Alias types. In ESOP, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. J. Thamsborg and L. Birkedal. A kripke logical relation for effectbased program transformations. In ICFP, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. M. Tofte and J.-P. Talpin. Implementation of the typed call-by-value λ-calculus using a stack of regions. In POPL, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. A. Turon, D. Dreyer, and L. Birkedal. Unifying refinement and Hoarestyle reasoning in a logic for higher-order concurrency. In ICFP, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. A. Turon, J. Thamsborg, A. Ahmed, L. Birkedal, and D. Dreyer. Logical relations for fine-grained concurrency. In POPL, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A relational model of types-and-effects 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

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!