Repository logo
 

ISA semantics for ARMV8-A, RISC-V, and ChERI-MIPs

Accepted version
Peer-reviewed

Type

Conference Object

Change log

Authors

Armstrong, A 
Bauereiss, T 
Campbell, B 
Reid, A 
Gray, KE 

Abstract

jats:pArchitecture 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.</jats:p> jats:pIn 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.</jats:p> jats:pWe 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.</jats:p> jats:pWe thereby take a big step towards making the architectural abstraction actually well-defined, establishing foundations for verification and reasoning.</jats:p>

Description

Keywords

Instruction Set Architectures, Semantics, Theorem Proving

Journal Title

Proceedings of the ACM on Programming Languages

Conference Name

ACM SIGPLAN Symposium on Principles of Programming Languages

Journal ISSN

2475-1421
2475-1421

Volume Title

3

Publisher

Association for Computing Machinery (ACM)
Sponsorship
Engineering and Physical Sciences Research Council (EP/K008528/1)
European Research Council (789108)
EPSRC (EP/K503757/1)