Skip to main content

Module shrink

Module shrink 

Source

StructsΒ§

CallSequenceShrinker πŸ”’
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.

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.
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.
reset_shrink_progress πŸ”’
Resets the progress bar for shrinking.
shrink_sequence πŸ”’
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.