Trait libafl::feedbacks::Feedback [−][src]
pub trait Feedback<I, S>: Named where
I: Input, { fn is_interesting<EM, OT>(
&mut self,
state: &mut S,
manager: &mut EM,
input: &I,
observers: &OT,
exit_kind: &ExitKind
) -> Result<bool, Error>
where
EM: EventFirer<I, S>,
OT: ObserversTuple<I, S>; fn append_metadata(
&mut self,
_state: &mut S,
_testcase: &mut Testcase<I>
) -> Result<(), Error> { ... } fn discard_metadata(
&mut self,
_state: &mut S,
_input: &I
) -> Result<(), Error> { ... } }
Expand description
Feedbacks evaluate the observers. Basically, they reduce the information provided by an observer to a value, indicating the “interestingness” of the last run.
Required methods
fn is_interesting<EM, OT>(
&mut self,
state: &mut S,
manager: &mut EM,
input: &I,
observers: &OT,
exit_kind: &ExitKind
) -> Result<bool, Error> where
EM: EventFirer<I, S>,
OT: ObserversTuple<I, S>,
fn is_interesting<EM, OT>(
&mut self,
state: &mut S,
manager: &mut EM,
input: &I,
observers: &OT,
exit_kind: &ExitKind
) -> Result<bool, Error> where
EM: EventFirer<I, S>,
OT: ObserversTuple<I, S>,
is_interesting
return if an input is worth the addition to the corpus
Provided methods
Append to the testcase the generated metadata in case of a new corpus item
Implementations on Foreign Types
Hack to use () as empty Feedback
fn is_interesting<EM, OT>(
&mut self,
_state: &mut S,
_manager: &mut EM,
_input: &I,
_observers: &OT,
_exit_kind: &ExitKind
) -> Result<bool, Error> where
EM: EventFirer<I, S>,
OT: ObserversTuple<I, S>,
Implementors
impl<A, B, I, S, FL> Feedback<I, S> for CombinedFeedback<A, B, I, S, FL> where
A: Feedback<I, S>,
B: Feedback<I, S>,
FL: FeedbackLogic<A, B, I, S>,
I: Input,
impl<I, FT, O, R, S, T> Feedback<I, S> for MapFeedback<FT, I, O, R, S, T> where
T: Integer + Default + Copy + 'static + Serialize + DeserializeOwned,
R: Reducer<T>,
O: MapObserver<T>,
I: Input,
S: HasFeedbackStates<FT>,
FT: FeedbackStatesTuple,
impl<I, O, S> Feedback<I, S> for ReachabilityFeedback<O> where
I: Input,
O: MapObserver<usize>,