Mathematizing C plus plus Concurrency

被引:10
|
作者
Batty, Mark [1 ]
Owens, Scott [1 ]
Sarkar, Susmit [1 ]
Sewell, Peter [1 ]
Weber, Tjark [1 ]
机构
[1] Univ Cambridge, Cambridge CB2 1TN, England
基金
英国工程与自然科学研究理事会;
关键词
Documentation; Languages; Reliability; Standardization; Theory; Verification; Relaxed Memory Models; Semantics;
D O I
10.1145/1925844.1926394
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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-memory 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.
引用
收藏
页码:55 / 66
页数:12
相关论文
共 50 条
  • [1] Mathematizing C plus plus Concurrency
    Batty, Mark
    Owens, Scott
    Sarkar, Susmit
    Sewell, Peter
    Weber, Tjark
    [J]. POPL 11: PROCEEDINGS OF THE 38TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, 2011, : 55 - 66
  • [2] Nitpicking C plus plus Concurrency
    Blanchette, Jasmin Christian
    Weber, Tjark
    Batty, Mark
    Owens, Scott
    Sarkar, Susmit
    [J]. PPDP 11 - PROCEEDINGS OF THE 2011 SYMPOSIUM ON PRINCIPLES AND PRACTICES OF DECLARATIVE PROGRAMMING, 2011, : 113 - 123
  • [3] Foundations of the C plus plus Concurrency Memory Model
    Boehm, Hans-J.
    Adve, Sarita V.
    [J]. PLDI'08: PROCEEDINGS OF THE 2008 SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN & IMPLEMENTATION, 2008, : 68 - 78
  • [4] An empirical study on C plus plus concurrency constructs
    Wu, Di
    Chen, Lin
    Zhou, Yuming
    Xu, Baowen
    [J]. 2015 ACM/IEEE INTERNATIONAL SYMPOSIUM ON EMPIRICAL SOFTWARE ENGINEERING AND MEASUREMENT (ESEM), 2015, : 257 - 266
  • [5] An extensive empirical study on C plus plus concurrency constructs
    Wu, Di
    Chen, Lin
    Zhou, Yuming
    Xu, Baowen
    [J]. INFORMATION AND SOFTWARE TECHNOLOGY, 2016, 76 : 1 - 18
  • [6] The Cilk plus plus Concurrency Platform
    Leiserson, Charles E.
    [J]. DAC: 2009 46TH ACM/IEEE DESIGN AUTOMATION CONFERENCE, VOLS 1 AND 2, 2009, : 522 - 527
  • [7] The Cilk plus plus concurrency platform
    Leiserson, Charles E.
    [J]. JOURNAL OF SUPERCOMPUTING, 2010, 51 (03): : 244 - 257
  • [8] CCmutator: A Mutation Generator for Concurrency Constructs in Multithreaded C/C plus plus Applications
    Kusano, Markus
    Wang, Chao
    [J]. 2013 28TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE), 2013, : 722 - 725
  • [9] Clarifying and Compiling C/C plus plus Concurrency: from C++11 to POWER
    Batty, Mark
    Memarian, Kayvan
    Owens, Scott
    Sarkar, Susmit
    Sewell, Peter
    [J]. POPL 12: PROCEEDINGS OF THE 39TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, 2012, : 509 - 520
  • [10] ARITHMETIC PLUS LOGIC PLUS GEOMETRY = CONCURRENCY
    PRATT, V
    [J]. LECTURE NOTES IN COMPUTER SCIENCE, 1992, 583 : 430 - 447