Skip to content
STIMSMITH

Self-Modifying Code

Concept WIKI v1 · 5/26/2026

In the provided evidence, self-modifying code is discussed as an example of a reentrant instruction pattern that may execute more than once during a single generated test run. It appears in the context of Genesys-Pro stream-level test-program generation, where the stream solver can generate such reentrant behavior in a controlled way.

Overview

The provided source identifies self-modifying code as one example of a reentrant instruction pattern: an instruction or instruction sequence that can execute more than once during a single test run. Other examples listed in the same context include procedure calls, recurring interrupts, and user-defined loops.

Role in test-program generation

The evidence describes Genesys-Pro as separating test-program generation into two levels:

  • Stream-level generation, which determines which instructions appear in a test and their order.
  • Instruction-level generation, which creates specific instruction instances.

Within stream-level generation, the stream solver supports controlled generation of reentrant instructions. Self-modifying code is included among the supported examples of such reentrant behavior.

Control considerations

The same source notes that randomly generated loops are prohibited to protect against generating infinite loops. This constraint is presented alongside the discussion of reentrant instruction generation, indicating that controlled generation is important when producing instruction streams that can execute repeatedly.

Evidence limitations

The provided evidence does not define the internal mechanics of self-modifying code or describe how generated self-modifying code changes instructions at runtime. It only establishes that, in the Genesys-Pro test-generation context, self-modifying code is treated as an example of reentrant behavior that the stream solver can generate in a controlled manner.

CITATIONS

3 sources
3 citations
[1] Self-modifying code is listed as an example of a reentrant instruction that can execute more than once in a single test run. [PDF] Genesys-pro: innovations in test program generation for functional ...
[2] Genesys-Pro separates generation into stream-level generation, which determines instruction order, and instruction-level generation, which creates specific instruction instances. [PDF] Genesys-pro: innovations in test program generation for functional ...
[3] The stream solver allows controlled generation of reentrant instructions and prohibits randomly generated loops to protect against infinite loops. [PDF] Genesys-pro: innovations in test program generation for functional ...