A flexible type system for fearless concurrency

Mae Milano, Joshua Turcotti, Andrew C. Myers

Research output: Chapter in Book/Report/Conference proceedingConference contribution

7 Scopus citations

Abstract

This paper proposes a new type system for concurrent programs, allowing threads to exchange complex object graphs without risking destructive data races. While this goal is shared by a rich history of past work, existing solutions either rely on strictly enforced heap invariants that prohibit natural programming patterns or demand pervasive annotations even for simple programming tasks. As a result, past systems cannot express intuitively simple code without unnatural rewrites or substantial annotation burdens. Our work avoids these pitfalls through a novel type system that provides sound reasoning about separation in the heap while remaining flexible enough to support a wide range of desirable heap manipulations. This new sweet spot is attained by enforcing a heap domination invariant similarly to prior work, but tempering it by allowing complex exceptions that add little annotation burden. Our results include: (1) code examples showing that common data structure manipulations which are difficult or impossible to express in prior work are natural and direct in our system, (2) a formal proof of correctness demonstrating that well-typed programs cannot encounter destructive data races at run time, and (3) an efficient type checker implemented in Gallina and OCaml.

Original languageEnglish (US)
Title of host publicationPLDI 2022 - Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation
EditorsRanjit Jhala, Isil Dillig
PublisherAssociation for Computing Machinery
Pages458-473
Number of pages16
ISBN (Electronic)9781450392655
DOIs
StatePublished - Jun 9 2022
Externally publishedYes
Event43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation, PLDI 2022 - Virtual, Online, United States
Duration: Jun 13 2022Jun 17 2022

Publication series

NameProceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI)

Conference

Conference43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation, PLDI 2022
Country/TerritoryUnited States
CityVirtual, Online
Period6/13/226/17/22

All Science Journal Classification (ASJC) codes

  • Software

Keywords

  • aliasing
  • concurrency
  • type systems

Fingerprint

Dive into the research topics of 'A flexible type system for fearless concurrency'. Together they form a unique fingerprint.

Cite this