Skip to main content

Module shrink

Module shrink 

Source
Expand description

Delta-debugging minimizer: shrink a failing program to a minimal reproducer.

Generic over a fails predicate (typically “the Spike oracle, interpreter, and recompiler don’t all agree”), so this module stays portable — the engine plumbing lives in the caller (live.rs).

Functions§

shrink
Minimize prog while fails keeps returning true. The trailing signature epilogue (length sig_len) is treated as fixed and regenerated each trial; the body (everything before it) is shrunk by greedily removing instructions, then unneeded seed registers are dropped. fails re-runs the comparison and returns true iff the divergence still reproduces.