Rely/Guarantee Reasoning for Multicopy Atomic Weak Memory Models

被引:11
作者
Coughlin, Nicholas [1 ,2 ]
Winter, Kirsten [1 ,2 ]
Smith, Graeme [1 ,2 ]
机构
[1] Def Sci & Technol Grp, Brisbane, Qld, Australia
[2] Univ Queensland, Sch Informat Technol & Elect Engn, Brisbane, Qld, Australia
来源
FORMAL METHODS, FM 2021 | 2021年 / 13047卷
关键词
CORRECT;
D O I
10.1007/978-3-030-90870-6_16
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
Rely/guarantee reasoning provides a compositional approach to reasoning about concurrent programs. However, such reasoning traditionally assumes a sequentially consistent memory model and hence is unsound on modern hardware in the presence of data races. In this paper, we present a rely/guarantee-based approach for multicopy atomic weak memory models, i.e., where a thread's stores become observable to all other threads at the same time. Such memory models include those of the widely used x86-TSO and ARMv8 processor architectures, as well as the open-source RISC-V architecture. In this context, an operational semantics can be based on thread-local instruction reordering. We exploit this to provide an efficient compositional proof technique in which weak memory behaviour can be shown to preserve rely/guarantee reasoning on a sequentially consistent memory model. To achieve this, we introduce a side-condition, reordering interference freedom, reducing the complexity of weak memory to checks over pairs of reorderable instructions. To enable practical application, we also define a dataflow analysis capable of identifying a thread's reorderable instructions. All aspects of our approach have been encoded and proved sound in Isabelle/HOL.
引用
收藏
页码:292 / 310
页数:19
相关论文
共 34 条
  • [1] Optimal Stateless Model Checking for Reads-From Equivalence under Sequential Consistency
    Abdulla, Parosh Aziz
    Atig, Mohamed Faouzi
    Jonsson, Bengt
    Lang, Magnus
    Tuan Phong Ngo
    Sagonas, Konstantinos
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (OOPSLA):
  • [2] Context-Bounded Analysis for POWER
    Abdulla, Parosh Aziz
    Atig, Mohamed Faouzi
    Bouajjani, Ahmed
    Tuan Phong Ngo
    [J]. TOOLS AND ALGORITHMS FOR THE CONSTRUCTION AND ANALYSIS OF SYSTEMS, TACAS 2017, PT II, 2017, 10206 : 56 - 74
  • [3] Herding Cats: Modelling, Simulation, Testing, and Data Mining for Weak Memory
    Alglave, Jade
    Maranget, Luc
    Tautschnig, Michael
    [J]. ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2014, 36 (02):
  • [4] 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
  • [5] Boehm H, 2012, P 2012 ACM SIGPLAN W, P12, DOI [10.1145/2247684.2247688, DOI 10.1145/2247684.2247688]
  • [6] A Wide-Spectrum Language for Verification of Programs on Weak Memory Models
    Colvin, Robert J.
    Smith, Graeme
    [J]. FORMAL METHODS, 2018, 10951 : 240 - 257
  • [7] Dijkstra E.W., 1990, Texts and Monographs in Computer Science, DOI DOI 10.1007/978-1-4612-3228-5
  • [8] Modelling the ARMv8 Architecture, Operationally: Concurrency and ISA
    Flur, Shaked
    Gray, Kathryn E.
    Pulte, Christopher
    Sarkar, Susmit
    Sezgin, Ali
    Maranget, Luc
    Deacon, Will
    Sewell, Peter
    [J]. ACM SIGPLAN NOTICES, 2016, 51 (01) : 608 - 621
  • [9] BMC for Weak Memory Models: Relation Analysis for Compact SMT Encodings
    Gavrilenko, Natalia
    Ponce-de-Leon, Hernan
    Furbach, Florian
    Heljanko, Keijo
    Meyer, Roland
    [J]. COMPUTER AIDED VERIFICATION, CAV 2019, PT I, 2019, 11561 : 355 - 365
  • [10] AN AXIOMATIC BASIS FOR COMPUTER PROGRAMMING
    HOARE, CAR
    [J]. COMMUNICATIONS OF THE ACM, 1969, 12 (10) : 576 - &