ISA Semantics for ARMv8-A, RISC-V, and CHERI-MIPS

被引:67
作者
Armstrong, Alasdair [1 ]
Bauereiss, Thomas [1 ]
Campbell, Brian [2 ]
Reid, Alastair [3 ]
Gray, Kathryn E. [1 ]
Norton, Robert M. [1 ]
Mundkur, Prashanth [4 ]
Wassell, Mark [1 ]
French, Jon [1 ]
Pulte, Christopher [1 ]
Flur, Shaked [1 ]
Stark, Ian [2 ]
Krishnaswami, Neel [1 ]
Sewell, Peter [1 ]
机构
[1] Univ Cambridge, Cambridge, England
[2] Univ Edinburgh, Edinburgh, Midlothian, Scotland
[3] ARM Ltd, Cambridge, England
[4] SRI Int, 333 Ravenswood Ave, Menlo Pk, CA 94025 USA
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2019年 / 3卷 / POPL期
基金
欧洲研究理事会; 英国工程与自然科学研究理事会;
关键词
Instruction Set Architectures; Semantics; Theorem Proving;
D O I
10.1145/3290384
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Architecture specifications notionally define the fundamental interface between hardware and software: the envelope of allowed behaviour for processor implementations, and the basic assumptions for software development and verification. But in practice, they are typically prose and pseudocode documents, not rigorous or executable artifacts, leaving software and verification on shaky ground. In this paper, we present rigorous semantic models for the sequential behaviour of large parts of the mainstream ARMv8-A, RISC-V, and MIPS architectures, and the research CHERI-MIPS architecture, that are complete enough to boot operating systems, variously Linux, FreeBSD, or seL4. Our ARMv8-A models are automatically translated from authoritative ARM-internal definitions, and (in one variant) tested against the ARM Architecture Validation Suite. We do this using a custom language for ISA semantics, Sail, with a lightweight dependent type system, that supports automatic generation of emulator code in C and OCaml, and automatic generation of proof-assistant definitions for Isabelle, HOL4, and (currently only for MIPS) Coq. We use the former for validation, and to assess specification coverage. To demonstrate the usability of the latter, we prove (in Isabelle) correctness of a purely functional characterisation of ARMv8-A address translation. We moreover integrate the RISC-V model into the RMEM tool for (user-mode) relaxed-memory concurrency exploration. We prove (on paper) the soundness of the core Sail type system. We thereby take a big step towards making the architectural abstraction actually well-defined, establishing foundations for verification and reasoning.
引用
收藏
页数:31
相关论文
共 63 条
[11]  
Brumley David, 2011, Computer Aided Verification. Proceedings 23rd International Conference, CAV 2011, P463, DOI 10.1007/978-3-642-22110-1_37
[12]  
Chen H, 2016, ACM SIGPLAN NOTICES, V51, P431, DOI [10.1145/2980983.2908101, 10.1145/2908080.2908101]
[13]  
Chlipala A, 2013, ACM SIGPLAN NOTICES, V48, P391, DOI [10.1145/2544174.2500592, 10.1145/2500365.2500592]
[14]   Kami: A platform for high-Level parametric hardware specification and its modular verification [J].
Choi, Joonwon ;
Vijayaraghavan, Muralidaran ;
Sherman, Benjamin ;
Chlipala, Adam ;
Arvind .
Proceedings of the ACM on Programming Languages, 2017, 1 (ICFP)
[15]   Z3: An efficient SMT solver [J].
de Moura, Leonardo ;
Bjorner, Nikolaj .
TOOLS AND ALGORITHMS FOR THE CONSTRUCTION AND ANALYSIS OF SYSTEMS, 2008, 4963 :337-340
[16]  
Degenbaev Ulan, 2012, THESIS U SAARLANDES
[17]   Automatically Generating Instruction Selectors Using Declarative Machine Descriptions [J].
Dias, Joao ;
Ramsey, Norman .
POPL'10: PROCEEDINGS OF THE 37TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, 2010, :403-416
[18]   Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism [J].
Dunfield, Joshua ;
Krishnaswami, Neelakantan R. .
ACM SIGPLAN NOTICES, 2013, 48 (09) :429-441
[19]  
FLANAGAN C, 1993, SIGPLAN NOTICES, V28, P237, DOI 10.1145/173262.155113
[20]   Mixed-Size Concurrency: ARM, POWER, C/C++11, and SC [J].
Flur, Shaked ;
Sarkar, Susmit ;
Pulte, Christopher ;
Nienhuis, Kyndylan ;
Maranget, Luc ;
Gray, Kathryn E. ;
Sezgin, Ali ;
Batty, Mark ;
Sewell, Peter .
ACM SIGPLAN NOTICES, 2017, 52 (01) :429-442