Struct libafl::mutators::tuneable::TuneableScheduledMutator
source · pub struct TuneableScheduledMutator<I, MT, S>where
MT: MutatorsTuple<I, S>,
S: HasRand,{ /* private fields */ }
Expand description
A Mutator
that schedules one of the embedded mutations on each call.
The index of the next mutation can be set.
Implementations§
source§impl<I, MT, S> TuneableScheduledMutator<I, MT, S>where
MT: MutatorsTuple<I, S>,
S: HasRand + HasMetadata,
impl<I, MT, S> TuneableScheduledMutator<I, MT, S>where
MT: MutatorsTuple<I, S>,
S: HasRand + HasMetadata,
sourcepub fn new(state: &mut S, mutations: MT) -> Self
pub fn new(state: &mut S, mutations: MT) -> Self
Create a new TuneableScheduledMutator
instance specifying mutations
source§impl<S> TuneableScheduledMutator<(), (), S>where
S: HasRand + HasMetadata,
impl<S> TuneableScheduledMutator<(), (), S>where
S: HasRand + HasMetadata,
sourcepub fn set_iters(state: &mut S, iters: u64)
pub fn set_iters(state: &mut S, iters: u64)
Sets the next iterations count, i.e., how many times to mutate the input
Using set_mutation_ids_and_iter
to set multiple values at the same time
will be faster than setting them individually
as it internally only needs a single metadata lookup
sourcepub fn set_mutation_ids(state: &mut S, mutations: Vec<MutationId>)
pub fn set_mutation_ids(state: &mut S, mutations: Vec<MutationId>)
Sets the mutation ids
sourcepub fn set_mutation_probabilities(
state: &mut S,
mutation_probabilities: Vec<f32>
)
pub fn set_mutation_probabilities(
state: &mut S,
mutation_probabilities: Vec<f32>
)
Sets the mutation probabilities.
The Vec
should ideally contain one value per MutationId
.
Setting the probabilities will remove the value set through set_mutation_ids
.
sourcepub fn set_mutation_ids_and_iters(
state: &mut S,
mutations: Vec<MutationId>,
iters: u64
)
pub fn set_mutation_ids_and_iters(
state: &mut S,
mutations: Vec<MutationId>,
iters: u64
)
mutation ids and iterations
sourcepub fn push_mutation_id(state: &mut S, mutation_id: MutationId)
pub fn push_mutation_id(state: &mut S, mutation_id: MutationId)
Appends a mutation id to the end of the mutations
Trait Implementations§
source§impl<I, MT, S> ComposedByMutations<I, MT, S> for TuneableScheduledMutator<I, MT, S>where
MT: MutatorsTuple<I, S>,
S: HasRand,
impl<I, MT, S> ComposedByMutations<I, MT, S> for TuneableScheduledMutator<I, MT, S>where
MT: MutatorsTuple<I, S>,
S: HasRand,
source§impl<I, MT, S> Debug for TuneableScheduledMutator<I, MT, S>where
MT: MutatorsTuple<I, S>,
S: HasRand,
impl<I, MT, S> Debug for TuneableScheduledMutator<I, MT, S>where
MT: MutatorsTuple<I, S>,
S: HasRand,
source§impl<I, MT, S> Mutator<I, S> for TuneableScheduledMutator<I, MT, S>where
MT: MutatorsTuple<I, S>,
S: HasRand + HasMetadata,
impl<I, MT, S> Mutator<I, S> for TuneableScheduledMutator<I, MT, S>where
MT: MutatorsTuple<I, S>,
S: HasRand + HasMetadata,
source§impl<I, MT, S> ScheduledMutator<I, MT, S> for TuneableScheduledMutator<I, MT, S>where
MT: MutatorsTuple<I, S>,
S: HasRand + HasMetadata,
impl<I, MT, S> ScheduledMutator<I, MT, S> for TuneableScheduledMutator<I, MT, S>where
MT: MutatorsTuple<I, S>,
S: HasRand + HasMetadata,
source§fn iterations(&self, state: &mut S, _: &I) -> u64
fn iterations(&self, state: &mut S, _: &I) -> u64
Compute the number of iterations used to apply stacked mutations
source§fn scheduled_mutate(
&mut self,
state: &mut S,
input: &mut I,
stage_idx: i32
) -> Result<MutationResult, Error>
fn scheduled_mutate(
&mut self,
state: &mut S,
input: &mut I,
stage_idx: i32
) -> Result<MutationResult, Error>
New default implementation for mutate.
Implementations must forward mutate() to this method
Auto Trait Implementations§
impl<I, MT, S> RefUnwindSafe for TuneableScheduledMutator<I, MT, S>where
I: RefUnwindSafe,
MT: RefUnwindSafe,
S: RefUnwindSafe,
impl<I, MT, S> Send for TuneableScheduledMutator<I, MT, S>where
I: Send,
MT: Send,
S: Send,
impl<I, MT, S> Sync for TuneableScheduledMutator<I, MT, S>where
I: Sync,
MT: Sync,
S: Sync,
impl<I, MT, S> Unpin for TuneableScheduledMutator<I, MT, S>where
I: Unpin,
MT: Unpin,
S: Unpin,
impl<I, MT, S> UnwindSafe for TuneableScheduledMutator<I, MT, S>where
I: UnwindSafe,
MT: UnwindSafe,
S: UnwindSafe,
Blanket Implementations§
source§impl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
§type PreprendResult = Tail
type PreprendResult = Tail
The Resulting
TupleList
, of an Prepend::prepend()
call,
including the prepended entry.source§fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
Prepend a value to this tuple, returning a new tuple with prepended value.