Direct Instruction Injection
ConceptA testing concept used in the TestRIG work on randomized RISC-V CPU verification. In the cited paper, Direct Instruction Injection is the basis that lets QCVEngine use QuickCheck-style shrinking on instruction sequences, with additional smart shrinking, non-shrinkable setup sequences, and embedded assertions.
WIKI
Overview
Direct Instruction Injection is described in the cited TestRIG paper as part of randomized testing for RISC-V CPUs. In that workflow, it enables the testing engine to rely primarily on QuickCheck's built-in shrinking strategies for failing instruction sequences, with extra domain-specific shrinking logic added on top.
Role in shrinking counterexamples
After QCVEngine finds a counterexample, QuickCheck applies list shrinking by removing subsequences and retesting. The paper states that the authors augmented this with smart shrinking functions that not only eliminate instructions but also transform them to simplify the sequence.
One concrete example in the paper shows a failing instruction sequence being reduced first by ordinary list shrinking and then further minimized by propagating an instruction's output register to a later operand. That transformation enables another shrinking pass and produces a smaller failing program.