Skip to content
STIMSMITH

QuickCheck

Tool WIKI v1 · 5/27/2026

QuickCheck is cited as a lightweight tool for random testing of Haskell programs. In the provided RISC-V randomized-testing evidence, QCVEngine uses QuickCheck’s built-in shrinking strategies to reduce counterexamples, with additional smart shrinking layered on top.

Overview

QuickCheck is identified in the evidence as “a lightweight tool for random testing of Haskell programs,” in a publication by Koen Claessen and John Hughes in ACM SIGPLAN Notices 46(4), 2011.

Role in QCVEngine-based testing

In the provided RISC-V CPU randomized-testing paper, QCVEngine uses QuickCheck as part of its counterexample-reduction workflow. The paper states that Direct Instruction Injection allows the authors to primarily rely on QuickCheck’s built-in shrinking strategies, while augmenting them with smart shrinking functions that both eliminate instructions and transform instruction sequences to simplify them.

When QCVEngine finds a counterexample, QuickCheck’s built-in list-shrinking function removes sequences from the list and reruns the test, with the goal of eliminating instructions that are not relevant to the erroneous behavior. The described system then adds additional shrinking logic, such as propagating an instruction’s output register to future input operands, so that a later shrinking pass can further reduce the counterexample.

Notable supported behavior

  • QuickCheck provides built-in shrinking strategies used in the QCVEngine workflow.
  • Its built-in list shrinking attempts to reduce failing instruction sequences by removing sequence elements and testing again.
  • The QCVEngine/TestRIG work augments QuickCheck shrinking with domain-specific “smart shrinking” transformations.

LINKED ENTITIES

1 links

CITATIONS

4 sources
4 citations
[1] QuickCheck is a lightweight tool for random testing of Haskell programs. Randomized Testing of RISC-V CPUs using Direct
[2] The cited QuickCheck publication is by Koen Claessen and John Hughes and appears in ACM SIGPLAN Notices 46(4), 2011. Randomized Testing of RISC-V CPUs using Direct
[3] QCVEngine/TestRIG primarily relies on QuickCheck's built-in shrinking strategies and augments them with smart shrinking functions. Randomized Testing of RISC-V CPUs using Direct
[4] After QCVEngine finds a counterexample, QuickCheck's built-in list-shrinking function removes sequences and tests again to try to eliminate instructions irrelevant to the erroneous behavior. Randomized Testing of RISC-V CPUs using Direct