TY - GEN
T1 - Sequential reasoning for optimizing compilers under weak memory concurrency
AU - Cho, Minki
AU - Lee, Sung Hwan
AU - Lee, Dongjae
AU - Hur, Chung Kil
AU - Lahav, Ori
N1 - Publisher Copyright: © 2022 ACM.
PY - 2022/6/9
Y1 - 2022/6/9
N2 - 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.
AB - 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.
KW - Compiler Optimizations
KW - Operational Semantics
KW - Relaxed Memory Concurrency
UR - https://www.scopus.com/pages/publications/85132245189
U2 - 10.1145/3519939.3523718
DO - 10.1145/3519939.3523718
M3 - Conference contribution
T3 - Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI)
SP - 213
EP - 228
BT - PLDI 2022 - Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation
A2 - Jhala, Ranjit
A2 - Dillig, Isil
PB - Association for Computing Machinery
T2 - 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation, PLDI 2022
Y2 - 13 June 2022 through 17 June 2022
ER -