Sequential reasoning for optimizing compilers under weak memory concurrency

Minki Cho, Sung Hwan Lee, Dongjae Lee, Chung Kil Hur, Ori Lahav

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

We formally show that sequential reasoning is adequate and sufficient for establishing soundness of various compiler optimizations under weakly consistent shared-memory concurrency. Concretely, we introduce a sequential model and show that behavioral refinement in that model entails contextual refinement in the Promising Semantics model, extended with non-atomic accesses for non-racy code. This is the first work to achieve such result for a full-fledged model with a variety of C11-style concurrency features. Central to our model is the lifting of the common data-race-freedom assumption, which allows us to validate irrelevant load introduction, a transformation that is commonly performed by compilers. As a proof of concept, we develop an optimizer for a toy concurrent language, and certify it (in Coq) while relying solely on the sequential model. We believe that the proposed approach provides useful means for compiler developers and validators, as well as a solid foundation for the development of certified optimizing compilers for weakly consistent shared-memory concurrency.

Original languageEnglish
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
Pages213-228
Number of pages16
ISBN (Electronic)9781450392655
DOIs
StatePublished - 9 Jun 2022
Event43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation, PLDI 2022 - Virtual, Online, United States
Duration: 13 Jun 202217 Jun 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
Period13/06/2217/06/22

Keywords

  • Compiler Optimizations
  • Operational Semantics
  • Relaxed Memory Concurrency

All Science Journal Classification (ASJC) codes

  • Software

Fingerprint

Dive into the research topics of 'Sequential reasoning for optimizing compilers under weak memory concurrency'. Together they form a unique fingerprint.

Cite this