Trace Semantics for C++11 Memory Model

IF 1.4 4区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING
Lili Xiao, Huibiao Zhu, Sini Chen, Mengda He, Shengchao Qin
{"title":"Trace Semantics for C++11 Memory Model","authors":"Lili Xiao, Huibiao Zhu, Sini Chen, Mengda He, Shengchao Qin","doi":"10.1145/3670696","DOIUrl":null,"url":null,"abstract":"<p>The C and C++ languages introduced the relaxed-memory concurrency into the language specification for efficiency purposes in 2011. </p><p>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. </p><p>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 paper 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. </p><p>When considering this trace model, different accesses bring in their unique snapshots, and make distinguished effects on the production of the sequences. </p><p>For any given program, the proposed trace semantics in this paper produces all the valid traces directly. Further, 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.</p>","PeriodicalId":50432,"journal":{"name":"Formal Aspects of Computing","volume":null,"pages":null},"PeriodicalIF":1.4000,"publicationDate":"2024-06-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Formal Aspects of Computing","FirstCategoryId":"94","ListUrlMain":"https://doi.org/10.1145/3670696","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

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 paper 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 paper produces all the valid traces directly. Further, 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.

C++11 内存模型的跟踪语义
为了提高效率,C 和 C++ 语言于 2011 年在语言规范中引入了松弛内存并发性。跟踪语义可以为 C++11 内存模型的提出提供数学基础,而目前缺乏对 C++11 跟踪语义的研究。 Kang 等人的 Promising Semantics(PS)为 C++11 并发模型提供了标准的 SC 风格操作语义,其中 "SC "指的是 "顺序一致性"。受 PS 的启发,本文首先研究了 C++11 下松弛读写访问的跟踪语义,以表示式语义的方式进行。在我们的语义模型中,跟踪是快照序列的形式,快照记录了相关全局或局部变量以及线程视图的修改。此外,我们还基于分离的线程视图和新添加的消息视图,探讨了 C++11 下释放/获取访问的跟踪语义。在考虑这种跟踪模型时,不同的访问会带来各自独特的快照,并对序列的生成产生不同的影响。对于任何给定的程序,本文提出的跟踪语义都能直接生成所有有效的跟踪。此外,我们的跟踪语义与 TSO 和 MCA ARMv8 的跟踪语义一起,有可能成为弱内存模型跟踪语义元模型的基础。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Formal Aspects of Computing
Formal Aspects of Computing 工程技术-计算机:软件工程
CiteScore
3.30
自引率
0.00%
发文量
17
审稿时长
>12 weeks
期刊介绍: This journal aims to publish contributions at the junction of theory and practice. The objective is to disseminate applicable research. Thus new theoretical contributions are welcome where they are motivated by potential application; applications of existing formalisms are of interest if they show something novel about the approach or application. In particular, the scope of Formal Aspects of Computing includes: well-founded notations for the description of systems; verifiable design methods; elucidation of fundamental computational concepts; approaches to fault-tolerant design; theorem-proving support; state-exploration tools; formal underpinning of widely used notations and methods; formal approaches to requirements analysis.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信