StructsΒ§
- Check
Sequence Options - Options controlling how
check_sequenceevaluates a candidate call sequence. - Check
Sequence Outcome - Outcome from replaying an invariant call sequence through
check_sequence. - Handler
Replay Outcome - Result of a strict handler-bug replay: anchor asserts, no earlier call asserts, and the recomputed edge fingerprint identifies which path the assertion took.
- Sequence
Shrink - Shrinker for a call sequence failure. Iterates sequence call sequence top down and removes calls one by one. If the failure is still reproducible with removed call then moves to the next one. If the failure is not reproducible then restore removed call and moves to next one.
- Shrink
Candidate Keys - Shared key set for shrinkers that need to skip duplicate concrete replays.
- Shrink
Progress π - Live shrink progress display. The progress bar itself is owned by forgeβs test runner; this type only formats the transient message shown while invariant shrinking is active.
- Shrink
Run - Shared shrink attempt driver.
- Shrink
RunStats - Attempt counters collected while trying shrink candidates.
- Shrunk
Sequence
EnumsΒ§
- Check
Sequence Failure Site - Concrete failure site observed while replaying a sequence through
check_sequence. - Replay
Decision π - Per-call decision returned by callbacks driving
replay_sequence.Continuehands the result back so non-reverted calls auto-commit;Stopshort-circuits. - Shrink
Error πPolicy - How
run_shrink_loophandles a predicate error. - Terminal
Failure πSite
ConstantsΒ§
FunctionsΒ§
- apply_
warp_ πroll - Applies accumulated warp/roll to a call, returning a modified copy.
- apply_
warp_ πroll_ to_ env - Applies warp/roll adjustments directly to the executorβs environment.
- assertion_
failure_ πreason - build_
shrunk_ πsequence - Builds the final shrunk sequence from the shrinker state.
- call_
failure_ πreason - check_
sequence - Checks if the given call sequence breaks the invariant.
- check_
sequence_ value - Executes a call sequence and returns the optimization value (int256) from the invariant function. Used during shrinking for optimization mode.
- finish_
sequence_ πcheck - format_
shrink_ πprogress_ message - handler_
sequence_ πstill_ triggers_ bug - Shrink predicate: anchor asserts on the same path as the originally recorded bug.
- push_
shrink_ πprogress_ call - replay_
handler_ failure_ sequence - Replays a handler-bug sequence and returns whether the anchor still asserts on the same path. Rejects sequences with a pre-anchor assertion (would be a different bug).
- replay_
sequence π - Replays
sequence(indices intocalls) againstexecutor. Whenaccumulate_warp_rollis set, warp/roll from skipped calls is folded into the next included call.on_callmay stop early; otherwise non-reverted calls are committed. - reset_
shrink_ πprogress - Resets the progress bar before each shrink.
position = Some((i, N))renders[i/N] Shrink: <label>for multi-invariant campaigns. - run_
shrink_ πloop - Shared shrink loop driver. Tries to drop each call;
predicatereturns whether the candidate still triggers the bug. - selector_
from_ πcalldata - sequence_
call_ πfailure_ site - shrink_
handler_ πsequence - Shrinks a handler-bug sequence to the shortest prefix that still asserts on the anchor AND keeps the same edge fingerprint (so we donβt change bug identity).
- shrink_
sequence π - shrink_
sequence_ by_ removing - Shared sequence shrinker. Tries to drop each call;
predicatedecides whether the candidate should be accepted, rejected, or skipped without spending a replay attempt. - shrink_
sequence_ πvalue - Shrinks a call sequence to the shortest sequence that still produces the target optimization value. This is specifically for optimization mode where we want to find the minimal sequence that achieves the maximum value.
- terminal_
failure_ πsite