class

Crowbar::Engine

Inherits Reference < Object

Central transformation engine orchestrating PRNG state, scoped targets, structure-preserving rules, adaptive mutator selection, and evolutionary feedback.

Constructors

new(seed : UInt64 = PRNG.default_seed)
Source

Class methods

detect_format?(buffer : Buffer) : Symbol | Nil

Auto-detects format/protocol of the given buffer

Source

Instance methods

add_fixup
Source
add_rule(rule : Rule)
Source
add_sample(sample : Buffer | Bytes | String) : Nil
Source
add_scope(scope : Scope)
Source
context
Source
detect_format?(buffer : Buffer) : Symbol | Nil
Source
evolution
Source
fixups
Source
frame?(name : String | Symbol) : FrameDefinition | Nil
Source
frames
Source
fuzz(input : Buffer | Bytes | String) : Buffer

Convenient alias

Source
fuzz_frame(name : String | Symbol) : Buffer

Fuzzes a declarative binary frame, automatically recomputing lengths and checksums

Source
generate(name : String | Symbol, start_symbol : Symbol = :start) : String

Generates a string using a defined generative grammar

Source
grammar?(name : String | Symbol) : GrammarDefinition | Nil
Source
grammars
Source
harvest(text : String) : Array(String)
Source
harvest_feedback(text : String) : Array(String)

Extracts diagnostic tokens from error messages into active dictionary

Source
last_metadata
Source
pattern
Source
pattern=(pattern : Pattern)
Source
pool
Source
register_frame(frame : FrameDefinition)
Source
register_grammar(grammar : GrammarDefinition)
Source
report(candidate : Buffer | Bytes | String, fitness : Float64, feature : String | Nil = nil, coverage_hash : UInt64 | Nil = nil)

Report feedback to evolutionary optimizer with optional feature & coverage hash telemetry

Source
report(candidate : Buffer | Bytes | String, success : Bool, feature : String | Nil = nil, coverage_hash : UInt64 | Nil = nil)
Source
rules
Source
scopes
Source
seed
Source
seed=(new_seed : UInt64)
Source
seek(offset : Int) : Nil
Source
template
Source
template=(template : String | Nil)
Source
transform(input : Buffer | Bytes | String) : Buffer

Core transform method: transforms an input buffer and returns mutated buffer

Source
uniqueness_filter
Source
uniqueness_filter=(uniqueness_filter : Evolution::UniquenessFilter | Nil)
Source