【24h】

Mathematizing C++ Concurrency

机译:数学C ++并发

获取原文

摘要

Shared-memory concurrency in C and C++ is pervasive in systems programming, but has long been poorly defined. This motivated an ongoing shared effort by the standards committees to specify concurrent behaviour in the next versions of both languages. They aim to provide strong guarantees for race-free programs, together with new (but subtle) relaxed-inemory atomic primitives for high-performance concurrent code. However, the current draft standards, while the result of careful deliberation, are not yet clear and rigorous definitions, and harbour substantial problems in their details. In this paper we establish a mathematical (yet readable) semantics for C++ concurrency. We aim to capture the intent of the current ('Final Committee') Draft as closely as possible, but discuss changes that fix many of its problems. We prove that a proposed x86 implementation of the concurrency primitives is correct with respect to the x86-TSO model, and describe our Cppmem tool for exploring the semantics of examples, using code generated from our Isabelle/HOL definitions. Having already motivated changes to the draft standard, this work will aid discussion of any further changes, provide a correctness condition for compilers, and give a much-needed basis for analysis and verification of concurrent C and C++ programs.
机译:C和C ++中的共享内存并发在系统编程中是普遍存在的,但长期以来一直定义不足。这激发了标准委员会正在进行的共同努力,以指定两种语言的下一个版本的并发行为。他们的目标是为无竞争计划提供强有力的保障,以及用于高性能并发代码的新(但微妙)轻松的因素原始原语。但是,目前的标准草案,而仔细审议的结果尚未明确且严谨的定义,并在其细节中覆盖了大量问题。在本文中,我们为C ++并发建立了数学(又可读的)语义。我们的目标是尽可能地捕捉当前(“最终委员会)草案的意图,但讨论修复许多问题的变更。我们证明,关于X86-TSO模型的建议X86的并发原语的实现是正确的,并描述了我们使用Isabelle / HOL定义生成的代码来探索示例的语义的CPPMEM工具。说完就标准草案已经积极变化,这项工作将有助于讨论的进一步变化,提供了一个编译器正确性条件,并给出了分析和并发的C核查和C ++程序急需的基础。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号