class Crowbar::Minimizer::Reducer

Overview

Anomaly-preserving test case minimizer and delta debugger. Employs hierarchical delta debugging (bisection chunk slicing, line trimming, and byte simplification) while strictly preserving syntax anomalies such as duplicate keys, malformed grammar boundaries, and protocol discrepancies.

Defined in:

crowbar/minimizer/reducer.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(command : String | Nil = nil, predicate : Proc(Buffer, Bool) | Nil = nil, match_regex : Regex | Nil = nil, timeout_ms : Int32 = 1000, progress_callback : Proc(Int32, Int32, Int32, Nil) | Nil = nil) #

Instance Method Detail

def command : String | Nil #

def command=(command : String | Nil) #

def match_regex : Regex | Nil #

def match_regex=(match_regex : Regex | Nil) #

def predicate : Proc(Buffer, Bool) | Nil #

def predicate=(predicate : Proc(Buffer, Bool) | Nil) #

def progress_callback : Proc(Int32, Int32, Int32, Nil) | Nil #

def progress_callback=(progress_callback : Proc(Int32, Int32, Int32, Nil) | Nil) #

def reduce(input : Buffer) : Buffer #

Core reduction loop: reduces input buffer down to minimal reproducer


def test_candidate(candidate : Buffer) : Bool #

Tests whether a candidate buffer still reproduces the failure predicate


def timeout_ms : Int32 #

def timeout_ms=(timeout_ms : Int32) #