An Axiomatic Basis for Computer Programming on the Relaxed Arm-A Architecture: The AxSL Logic

被引:1
作者
Hammond, Angus [1 ]
Liu, Zongyuan [2 ]
Perami, Thibaut [1 ]
Sewell, Peter [1 ]
Birkedal, Lars [2 ]
Pichon-Pharabod, Jean [2 ]
机构
[1] Univ Cambridge, Comp Lab, JJ Thomson Ave, Cambridge CB3 0FD, England
[2] Aarhus Univ, Abogade 34, DK-8200 Aarhus, Denmark
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2024年 / 8卷 / POPL期
基金
欧洲研究理事会; “创新英国”项目;
关键词
relaxed memory models; program logic; separation logic; Arm; Iris; WEAK MEMORY; PROOF; CONSISTENCY; CONCURRENCY; SEMANTICS;
D O I
10.1145/3632863
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Very relaxed concurrency memory models, like those of the Arm-A, RISC-V, and IBM Power hardware architectures, underpin much of computing but break a fundamental intuition about programs, namely that syntactic program order and the reads-from relation always both induce order in the execution. Instead, out-of-order execution is allowed except where prevented by certain pairwise dependencies, barriers, or other synchronisation. This means that there is no notion of the 'current' state of the program, making it challenging to design (and prove sound) syntax-directed, modular reasoning methods like Hoare logics, as usable resources cannot implicitly flow from one program point to the next. We present AxSL, a separation logic for the relaxed memory model of Arm-A, that captures the fine-grained reasoning underpinning the low-overhead synchronisation mechanisms used by high-performance systems code. In particular, AxSL allows transferring arbitrary resources using relaxed reads and writes when they induce inter-thread ordering. We mechanise AxSL in the Iris separation logic framework, illustrate it on key examples, and prove it sound with respect to the axiomatic memory model of Arm-A. Our approach is largely generic in the axiomatic model and in the instruction-set semantics, offering a potential way forward for compositional reasoning for other similar models, and for the combination of production concurrency models and full-scale ISAs.
引用
收藏
页码:604 / 637
页数:34
相关论文
共 75 条
[1]  
Manerkar YA, 2016, Arxiv, DOI arXiv:1611.01507
[2]   Armed Cats: Formal Concurrency Modelling at Arm [J].
Alglave, Jade ;
Deacon, Will ;
Grisenthwaite, Richard ;
Hacquard, Antoine ;
Maranget, Luc .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2021, 43 (02)
[3]  
Alglave J, 2018, ACM SIGPLAN NOTICES, V53, P405, DOI [10.1145/3173162.3177156, 10.1145/3296957.3177156]
[4]   Ogre and Pythia: An Invariance Proof Method for Weak Consistency Models [J].
Alglave, Jade ;
Cousot, Patrick .
ACM SIGPLAN NOTICES, 2017, 52 (01) :3-18
[5]   Herding Cats: Modelling, Simulation, Testing, and Data Mining for Weak Memory [J].
Alglave, Jade ;
Maranget, Luc ;
Tautschnig, Michael .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2014, 36 (02)
[6]   Fences in Weak Memory Models [J].
Alglave, Jade ;
Maranget, Luc ;
Sarkar, Susmit ;
Sewell, Peter .
COMPUTER AIDED VERIFICATION, PROCEEDINGS, 2010, 6174 :258-+
[7]  
[Anonymous], 1967, P S APPL MATH, DOI DOI 10.1090/PSAPM/019/0235771
[8]  
Arm Ltd, 2023, ARM DDI 0487J.a (ID042523)
[9]   Isla: Integrating Full-Scale ISA Semantics and Axiomatic Concurrency Models [J].
Armstrong, Alasdair ;
Campbell, Brian ;
Simner, Ben ;
Pulte, Christopher ;
Sewell, Peter .
COMPUTER AIDED VERIFICATION (CAV 2021), PT I, 2021, 12759 :303-316
[10]   The Problem of Programming Language Concurrency Semantics [J].
Batty, Mark ;
Memarian, Kayvan ;
Nienhuis, Kyndylan ;
Pichon-Pharabod, Jean ;
Sewell, Peter .
PROGRAMMING LANGUAGES AND SYSTEMS, 2015, 9032 :283-307