Abstract

We introduce the notion of a connectivity graph —an abstract representation of the topology of concurrently interacting entities, which allows us to encapsulate generic principles of reasoning about deadlock freedom . Connectivity graphs are parametric in their vertices (representing entities like threads and channels) and their edges (representing references between entities) with labels (representing interaction protocols). We prove deadlock and memory leak freedom in the style of progress and preservation and use separation logic as a meta theoretic tool to treat connectivity graph edges and labels substructurally. To prove preservation locally, we distill generic separation logic rules for local graph transformations that preserve acyclicity of the connectivity graph. To prove global progress locally, we introduce a waiting induction principle for acyclic connectivity graphs. We mechanize our results in Coq, and instantiate our method with a higher-order binary session-typed language to obtain the first mechanized proof of deadlock and leak freedom.

Highlights

  • Binary session types [Honda 1993; Honda et al 1998] are a type discipline for specifying protocols of interactions in message-passing concurrent programs

  • We show how to use separation logic in a non-standard way as a language for linking our abstract connectivity graphs to a concrete language’s operational semantics and type system

  • The semantics of most constructs is standard, so we focus on the message passing constructs: 1Due to the session typing discipline, only one of the buffers is expected to be populated at any given time

Read more

Summary

INTRODUCTION

Binary session types [Honda 1993; Honda et al 1998] are a type discipline for specifying protocols of interactions in message-passing concurrent programs. As shown by the examples, connectivity graphs describe the types and abstract reference topology of a program’s execution configuration, but not the concrete expressions and values that constitute the threads and channels. All ingredients of our method (the definition of connectivity graph, the separation logic, the graph transformations, and waiting induction) are parametric in the vertices, edges and labels of the connectivity graph This is crucial for mechanization: we can encapsulate our proof method as a library that is independent of the concrete programming language. We show how to use separation logic in a non-standard way as a language for linking our abstract connectivity graphs to a concrete language’s operational semantics and type system. We use our connectivity graph library to obtain the first mechanized proof of deadlock and leak freedom for a binary session-typed λ-calculus with higher-order channels, recursive types, and unrestricted types. An archive of the Coq mechanization can be found at Jacobs et al [2021], and the most recent version at https://github.com/julesjacobs/cgraphs

LANGUAGE AND OPERATIONAL SEMANTICS
KEY IDEAS
Generalizing The Progress and Preservation Method
Generalizing Heap Typings to Connectivity Graphs
Run-Time Typing Judgment Using Separation Logic
Well-Formedness of Configurations Using Connectivity Graphs
Proving Preservation Using Local Connectivity Graph Transformations
Proving Progress Using Waiting Induction
CONNECTIVITY GRAPHS AND WAITING INDUCTION IN DETAIL
LOCAL GRAPH TRANSFORMATION RULES IN SEPARATION LOGIC
EXTENSIONS
Unrestricted Types
Equi-Recursive Types
Partial Deadlock and Memory Leak Freedom via Reachability
MECHANIZATION IN COQ
RELATED WORK
FUTURE WORK

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.