Skip to content
STIMSMITH

Forvis

Tool WIKI v1 · 5/28/2026

Forvis is a Haskell-based RISC-V instruction-set simulator/formal ISA specification. A 2019 coverage-guided fuzzing study used it as a reference ISS and reported two Forvis issues involving privileged CSR access and RV32 REMU behavior.

Overview

Forvis is described in the RISC-V ISS fuzzing literature as an instruction set simulator (ISS) implemented in Haskell and intended to serve as a formal specification of the RISC-V ISA. The associated public GitHub repository is described as a "Formal specification of RISC-V Instruction Set" and is primarily Haskell.

Use in ISS verification research

The paper Verifying Instruction Set Simulators using Coverage-guided Fuzzing used Forvis as one of two reference ISSs, alongside Spike, in a RISC-V case study. The study built a coverage-guided fuzzing approach on top of libFuzzer and used it while verifying an RV32IMA ISS extracted from a RISC-V Virtual Prototype.

In that evaluation, the authors reported that errors were found not only in the ISS under test but also in both reference ISSs, including Forvis.

Reported issues

The study reported two Forvis-specific issues:

  • H1 — privileged CSR access: Forvis erroneously allowed access to CSRs representing hardware performance monitoring counters, such as the cycle CSR, from a lower privileged execution mode without first enabling access via the mcounteren and scounteren CSRs.
  • H2 — RV32 REMU behavior: Forvis's REMU instruction behavior failed in a 32-bit configuration because it performed a 64-bit operation even though the ISS was configured for 32-bit mode.

In the paper's evaluation table, RISC-V Torture test generation detected the Forvis H2 issue, while the coverage-guided fuzzing run detected both H1 and H2. The official RISC-V ISA tests reported no Forvis issue in that table.

Repository

The public repository listed for Forvis is rsnikhil/Forvis_RISCV-ISA-Spec, described as a formal specification of the RISC-V instruction set and implemented in Haskell.

CITATIONS

5 sources
5 citations
[1] Forvis is an ISS implemented in Haskell and intended as a formal specification of the RISC-V ISA. Verifying Instruction Set Simulators using Coverage-guided Fuzzing
[2] The public GitHub repository describes Forvis as a formal specification of the RISC-V instruction set and identifies Haskell as its language. rsnikhil/Forvis_RISCV-ISA-Spec
[3] The coverage-guided fuzzing paper used Forvis as a reference ISS alongside Spike in a RISC-V case study based on libFuzzer and an RV32IMA ISS. Verifying Instruction Set Simulators using Coverage-guided Fuzzing
[4] The study reported errors in Forvis, including H1 for privileged CSR access and H2 for REMU behavior in RV32 mode. Verifying Instruction Set Simulators using Coverage-guided Fuzzing
[5] In the evaluation table, RISC-V Torture detected Forvis H2, coverage-guided fuzzing detected Forvis H1 and H2, and the official RISC-V ISA tests reported no Forvis issue. Verifying Instruction Set Simulators using Coverage-guided Fuzzing