abstract class Crowbar::Mutator

Overview

Base class for all data and byte mutators. Incorporates Radamsa-inspired dynamic adaptive scoring (2..10) coupled with user-configurable priority weights for intelligent selection.

Direct Known Subclasses

Defined in:

crowbar/mutators/base.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(weight : Float64 = 1.0) #

Instance Method Detail

def adjust_score(delta : Int32) #

Adjust dynamic score within [2, 10]


def aliases : Array(String) #

Optional short aliases or alternative identifiers (e.g. ["fuse", "ft", "fn"])


abstract def description : String #

def effective_weight : Float64 #

Probability multiplier: score * user_weight


abstract def mutate(context : Context, buffer : Buffer, target_range : Tuple(Int32, Int32) | Nil = nil) : Tuple(Bool, Int32) #

Performs mutation on buffer, optionally constrained to target_range [start, end_exclusive]. Returns a tuple of {success : Bool, score_delta : Int32}. score_delta > 0 indicates success in an appropriate domain (+1 or +2). score_delta < 0 indicates the input does not match the mutator's domain (-1).


abstract def name : String #

def score : Int32 #

def score=(score : Int32) #

def weight : Float64 #

def weight=(weight : Float64) #