paperbot · PL 论文追踪

全部论文 待读 收藏

P2 ISA semantics for ARMv8-a, RISC-v, and CHERI-MIPS

ARMv8-A、RISC-V 和 CHERI-MIPS 的 ISA 语义
POPL 3(POPL)2019匹配度 3/10 · 论文属于形式化方法与程序语言语义的基础工作,与静态分析/形式验证的理论工程结合有一定关联;但完全不涉及用户核心关注的 LLM/Agent、浮点程序分析或贝叶斯程序分析。引用 131 inbox
Alasdair Armstrong, Thomas Bauereiss, Brian Campbell, Alastair Reid, Kathryn E. Gray, Robert M. Norton, Prashanth Mundkur, Mark Wassell, Jon French, Christopher Pulte, Shaked Flur, Ian Stark, Neel Krishnaswami, Peter Sewell
crossref: 2026-09-10

AI 速览

一句话:使用 Sail 语言为 ARMv8-A、RISC-V、MIPS 和 CHERI-MIPS 架构建立严谨的可执行语义模型,支持模拟器与证明助手代码生成。

架构规范通常以散文和伪代码形式存在,缺乏严谨性和可执行性,给软件开发和验证带来不确定性。本文使用自定义的 ISA 语义语言 Sail(具有轻量级依赖类型系统),为 ARMv8-A、RISC-V、MIPS 及研究性 CHERI-MIPS 架构的大型顺序行为片段建立了严谨语义模型。这些模型足以引导 Linux、FreeBSD 和 seL4 操作系统。Sail 支持自动生成 C 和 OCaml 模拟器代码,以及 Isabelle、HOL4、Coq 的证明助手定义。ARMv8-A 模型由 ARM 内部定义自动翻译而来,并通过 ARM 架构验证套件测试。我们还在 Isabelle 中证明了 ARMv8-A 地址翻译纯函数刻画的正确定性,将 RISC-V 模型集成到 RMEM 工具中,并在纸上证明了 Sail 核心类型系统的可靠性。

问题
主流架构规范多为散文和伪代码,缺乏严谨性和可执行性,阻碍了软件验证与推理。
方法
设计具有轻量级依赖类型的 ISA 语义语言 Sail,构建 ARMv8-A、RISC-V、MIPS 和 CHERI-MIPS 的顺序行为语义模型,并自动生成模拟器代码和证明助手定义。
评估
模型可启动 Linux/FreeBSD/seL4;ARMv8-A 模型经 ARM 架构验证套件测试;在 Isabelle 中证明地址翻译正确性,将 RISC-V 模型集成到 RMEM,并证明 Sail 类型系统可靠性。
原文摘要(Abstract)

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.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot639,
  title = {ISA semantics for ARMv8-a, RISC-v, and CHERI-MIPS},
  author = {Alasdair Armstrong and Thomas Bauereiss and Brian Campbell and Alastair Reid and Kathryn E. Gray and Robert M. Norton and Prashanth Mundkur and Mark Wassell and Jon French and Christopher Pulte and Shaked Flur and Ian Stark and Neel Krishnaswami and Peter Sewell},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {3},
  number = {POPL},
  year = {2019},
  doi = {10.1145/3290384}
}