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.
- A. Ahmed, A. Appel, and R. Virga. A Stratified Semantics of General References. In LICS, 2002. Google Scholar
Digital Library
- A. Ahmed, D. Dreyer, and A. Rossberg. State-dependent representation independence. In POPL, 2009. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- N. Benton and P. Buchlovsky. Semantics of an effect analysis for exceptions. In TLDI, 2007. Google Scholar
Digital Library
- N. Benton, A. Kennedy, M. Hofmann, and L. Beringer. Reading, writing and relations. In PLAS. Springer, 2006. Google Scholar
Digital Library
- N. Benton, A. Kennedy, L. Beringer, and M. Hofmann. Relational semantics for effect-based program transformations with dynamic allocation. In PPDP, 2007. Google Scholar
Digital Library
- N. Benton, A. Kennedy, L. Beringer, and M. Hofmann. Relational semantics for effect-based program transformations: higher-order store. In PPDP, 2009. Google Scholar
Digital Library
- N. Benton, M. Hofmann, and V. Nigam. Abstract effects and proofrelevant logical relations. In POPL, 2014. Google Scholar
Digital Library
- N. Benton, M. Hofmann, and V. Nigam. Effect-dependent transformations for concurrent programs. In PPDP, 2016. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- L. Birkedal, F. Sieczkowski, and J. Thamsborg. A concurrent logical relation. In CSL, 2012.Google Scholar
- M. Botincan, M. Dodds, and S. Jagannathan. Proof-Directed Parallelization Synthesis by Separation Logic. TOPLAS, 35(2), 2013. Google Scholar
Digital Library
- D. Dreyer, A. Ahmed, and L. Birkedal. Logical step-indexed logical relations. Logical Methods in Computer Science, 7(2), 2011.Google Scholar
- M. Fähndrich and R. DeLine. Adoption and focus: practical linear types for imperative programming. In PLDI, 2002. Google Scholar
Digital Library
- D. K. Gifford and J. M. Lucassen. Integrating functional and imperative programming. In LISP, 1986. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- N. Krishnaswami, P. Pradic, and N. Benton. Integrating linear and dependent types. In POPL, 2015. Google Scholar
Digital Library
- 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 Scholar
- J. M. Lucassen and D. K. Gifford. Polymorphic effect systems. In POPL, 1988. Google Scholar
Digital Library
- G. Morrisett, A. Ahmed, and M. Fluet. L3: A linear language with locations. In TLCA, 2005. Google Scholar
Digital Library
- A. Nanevski, G. Morrisett, and L. Birkedal. Polymorphism and separation in hoare type theory. In ICFP, 2006. Google Scholar
Digital Library
- G. Plotkin and M. Abadi. A logic for parametric polymorphism. In TLCA, 1993. Google Scholar
Digital Library
- F. Pottier. Hiding local state in direct style: a higher-order anti-frame rule. In LICS, 2008. Google Scholar
Digital Library
- F. Pottier and J. Protzenko. Programming with permissions in Mezzo. In ICFP, 2013. Google Scholar
Digital Library
- F. Pottier and J. Protzenko. A few lessons from the mezzo project. In SNAPL, 2015.Google Scholar
- M. Raza, C. Calcagno, and P. Gardner. Automatic Parallelization with Separation Logic. In ESOP, 2009. Google Scholar
Digital Library
- Rust Language. https://doc.rust-lang.org, 2016.Google Scholar
- F. Smith, D. Walker, and G. Morrisett. Alias types. In ESOP, 2000. Google Scholar
Digital Library
- J. Thamsborg and L. Birkedal. A kripke logical relation for effectbased program transformations. In ICFP, 2011. Google Scholar
Digital Library
- M. Tofte and J.-P. Talpin. Implementation of the typed call-by-value λ-calculus using a stack of regions. In POPL, 1994. Google Scholar
Digital Library
- A. Turon, D. Dreyer, and L. Birkedal. Unifying refinement and Hoarestyle reasoning in a logic for higher-order concurrency. In ICFP, 2013. Google Scholar
Digital Library
- A. Turon, J. Thamsborg, A. Ahmed, L. Birkedal, and D. Dreyer. Logical relations for fine-grained concurrency. In POPL, 2013. Google Scholar
Digital Library
Index Terms
A relational model of types-and-effects in higher-order concurrent separation logic
Recommendations
Interactive proofs in higher-order concurrent separation logic
POPL '17: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming LanguagesWhen 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 ...
A relational model of types-and-effects in higher-order concurrent separation logic
POPL '17: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming LanguagesRecently 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 ...
Interactive proofs in higher-order concurrent separation logic
POPL '17When 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 ...







Comments