A formal specification of the RISC-V instruction set architectures (RV32I, RV64I) and extensions (A, M) written in the Coq proof assistant.
riscv-coq is a formal, machine-checked specification of the RISC-V instruction set architecture written in the Coq proof assistant. It mathematically defines the behavior of RISC-V instructions (RV32I, RV64I) and extensions (A, M), enabling precise reasoning about programs and hardware. This specification serves as a foundation for verifying correctness in systems built for RISC-V.
Researchers and engineers working on formal verification of RISC-V processors, compilers, or low-level software, as well as those developing high-assurance systems or theorem-proving tools targeting RISC-V.
It provides a rigorous, executable specification that can be used for machine-checked proofs, reducing the risk of errors in critical systems. Being derived from a Haskell semantics and integrated with Coq's ecosystem, it bridges high-level semantics with formal verification.
RISC-V Specification in Coq
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides a mathematically precise definition of RISC-V instructions, enabling rigorous verification of hardware and software as stated in the project description, reducing human error.
Designed as a library for larger Coq projects like bedrock2, facilitating reuse in verification efforts and ensuring compatibility with existing Coq tools.
Largely auto-generated from Haskell semantics using hs-to-coq, reducing manual effort and potential inconsistencies in the specification.
Supports RV32I and RV64I with atomic (A) and multiplication/division (M) extensions, covering essential instruction sets for many verification tasks.
Only covers A and M extensions, missing others like F, D, or C, which limits its utility for full RISC-V implementations or applications requiring floating-point operations.
Requires manual cloning and building of dependencies like coqutil, and the README notes potential build failures, adding overhead and frustration for users.
Assumes proficiency in Coq and formal methods, making it inaccessible for developers without a background in theorem proving or functional programming.