[Paper Review] A Multipurpose Formal RISC-V Specification.
This paper presents a multipurpose, formal RISC-V specification in Haskell that uses extensible 'holes' to support diverse formal-methods projects—such as processor- and compiler-correctness proofs—by enabling customizable instantiation. It is the first RISC-V specification to unify multiple formal verification efforts without requiring new domain-specific tools.
RISC-V is a relatively new, open instruction set architecture with a mature ecosystem and an official formal machine-readable specification. It is therefore a promising playground for formal-methods research. However, we observe that different formal-methods research projects are interested in different aspects of RISC-V and want to simplify, abstract, approximate, or ignore the other aspects. Often, they also require different encoding styles, resulting in each project starting a new formalization from-scratch. We set out to identify the commonalities between projects and to represent the RISC-V specification as a program with holes that can be instantiated differently by different projects. Our formalization of the RISC-V specification is written in Haskell and leverages existing tools rather than requiring new domain-specific tools, contrary to other approaches. To our knowledge, it is the first RISC-V specification able to serve as the interface between a processor-correctness proof and a compiler-correctness proof, while supporting several other projects with diverging requirements as well.
Motivation & Objective
- To address the fragmentation in formal-methods research on RISC-V, where each project re-implements the specification from scratch due to differing needs.
- To identify common abstractions across formal verification projects targeting RISC-V.
- To design a single, extensible formal specification that supports multiple projects with divergent requirements.
- To avoid building new domain-specific tools by reusing existing Haskell-based formalization tools.
- To create a unified interface between processor-correctness and compiler-correctness proofs in RISC-V verification.
Proposed method
- The specification is encoded in Haskell using a program-with-holes abstraction, where holes represent configurable or abstracted components.
- The approach leverages existing formal tools rather than introducing new domain-specific languages or verification frameworks.
- Different projects instantiate the holes with varying levels of detail, enabling simplification, abstraction, or approximation as needed.
- The specification is designed to be both precise enough for correctness proofs and flexible enough to support diverse formal-methods use cases.
- The formalization is structured to serve as an interoperable interface between processor and compiler verification efforts.
Experimental results
Research questions
- RQ1How can a single formal RISC-V specification support multiple, divergent formal-methods projects?
- RQ2What abstractions are common across processor-correctness and compiler-correctness proofs in RISC-V?
- RQ3Can a unified specification be built without requiring new domain-specific tools?
- RQ4How can formal specifications be made extensible enough to support both low-level processor verification and high-level compiler verification?
- RQ5What role do extensible 'holes' play in enabling reuse and customization across formal verification projects?
Key findings
- The proposed specification successfully serves as a unified interface between processor-correctness and compiler-correctness proofs in RISC-V.
- The use of holes enables different projects to customize the level of abstraction and detail without rewriting the core specification.
- The approach avoids the need for new domain-specific tools by reusing existing Haskell-based formalization infrastructure.
- The specification is the first to support multiple formal-methods projects with divergent requirements using a single, extensible formalization.
- The method reduces duplication in formal verification efforts by enabling shared, modular specification development.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.