Trace Semantics for C++11 Memory Model

Author:

Xiao Lili1ORCID,Zhu Huibiao2ORCID,Chen Sini2ORCID,He Mengda3ORCID,Qin Shengchao4ORCID

Affiliation:

1. School of Computer Science and Technology, Donghua University, Shanghai, China

2. Shanghai Key Laboratory of Trustworthy Computing, East China Normal University, Shanghai, China

3. Teesside University, Middlesbrough, United Kingdom

4. Xidian University, Xi'an, China

Abstract

The C and C++ languages introduced the relaxed-memory concurrency into the language specification for efficiency purposes in 2011. Trace semantics can provide the mathematical foundation for the proposed C++11 memory model, and there is a lack of investigation of trace semantics for C++11. The Promising Semantics (PS) of Kang et al. provides the standard SC-style operational semantics for the C++11 concurrency model, where “SC” refers to “Sequential Consistency”. Inspired by PS, in this article we first investigate the trace semantics for the relaxed read and write accesses under C++11, acting in the denotational semantics style. In our semantic model, a trace is in the form of a sequence of snapshots, and the snapshots record the modification in the relevant global or local variables, and the thread view. Moreover, the trace semantics for the release/acquire accesses under C++11 is also explored, based on the separated thread views and newly added message views. When considering this trace model, different accesses bring in their unique snapshots, and make distinguished effects on the production of the sequences. For any given program, the proposed trace semantics in this article produces all the valid traces directly. Furthermore, our trace semantics, together with that for TSO and MCA ARMv8, has the possibility to be the foundation of the meta model of the trace semantics for weak memory models.

Funder

National Natural Science Foundation of China

“Digital Silk Road” Shanghai International Joint Lab of Trustworthy Intelligent Software

Shanghai Trusted Industry Internet Software Collaborative Innovation Center

Publisher

Association for Computing Machinery (ACM)

Reference32 articles.

1. Mark Batty, Scott Owens, Susmit Sarkar, Peter Sewell, and Tjark Weber. 2011. Mathematizing C++ concurrency. In Proceedings of the 38th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2011, Austin, TX, USA, January 26–28, 2011.Thomas Ball and Mooly Sagiv (Eds.), ACM, 55–66.

2. Mark John Batty. 2015. The C11 and C++11 Concurrency Model. Ph.D. Dissertation. University of Cambridge, UK.

3. Full Abstraction for a Shared-Variable Parallel Language

4. The Safety-Critical Java memory model formalised

5. Sadegh Dalvandi, Simon Doherty, Brijesh Dongol, and Heike Wehrheim. 2020. Owicki-gries reasoning for C11 RAR. In Proceedings of the 34th European Conference on Object-Oriented Programming, ECOOP 2020, November 15–17, 2020, Berlin, Germany (Virtual Conference).Robert Hirschfeld and Tobias Pape (Eds.), Vol. 166, Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 11:1–11:26.

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3