Trait Feedback

Source
pub trait Feedback<EM, I, OT, S>: StateInitializer<S> + Named {
    // Required method
    fn last_result(&self) -> Result<bool, Error>;

    // Provided methods
    fn is_interesting(
        &mut self,
        _state: &mut S,
        _manager: &mut EM,
        _input: &I,
        _observers: &OT,
        _exit_kind: &ExitKind,
    ) -> Result<bool, Error> { ... }
    fn is_interesting_introspection(
        &mut self,
        state: &mut S,
        manager: &mut EM,
        input: &I,
        observers: &OT,
        exit_kind: &ExitKind,
    ) -> Result<bool, Error>
       where S: HasClientPerfMonitor { ... }
    fn append_hit_feedbacks(
        &self,
        list: &mut Vec<Cow<'static, str>>,
    ) -> Result<(), Error> { ... }
    fn append_metadata(
        &mut self,
        _state: &mut S,
        _manager: &mut EM,
        _observers: &OT,
        _testcase: &mut Testcase<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§

Source

fn last_result(&self) -> Result<bool, Error>

CUT MY LIFE INTO PIECES; THIS IS MY LAST Feedback::is_interesting run

Provided Methods§

Source

fn is_interesting( &mut self, _state: &mut S, _manager: &mut EM, _input: &I, _observers: &OT, _exit_kind: &ExitKind, ) -> Result<bool, Error>

is_interesting return if an input is worth the addition to the corpus

Source

fn is_interesting_introspection( &mut self, state: &mut S, manager: &mut EM, input: &I, observers: &OT, exit_kind: &ExitKind, ) -> Result<bool, Error>

Returns if the result of a run is interesting and the value input should be stored in a corpus. It also keeps track of introspection stats.

Source

fn append_hit_feedbacks( &self, list: &mut Vec<Cow<'static, str>>, ) -> Result<(), Error>

Append this Feedback’s name if Feedback::last_result is true If you have any nested Feedbacks, you must call this function on them if relevant. See the implementations of CombinedFeedback

Source

fn append_metadata( &mut self, _state: &mut S, _manager: &mut EM, _observers: &OT, _testcase: &mut Testcase<I>, ) -> Result<(), Error>

Append to the testcase the generated metadata in case of a new corpus item

Precondition: testcase must contain an input.

Implementations on Foreign Types§

Source§

impl<EM, I, OT, S> Feedback<EM, I, OT, S> for ()

Hack to use () as empty Feedback

Implementors§

Source§

impl<A, B, FL, EM, I, OT, S> Feedback<EM, I, OT, S> for CombinedFeedback<A, B, FL>
where A: Feedback<EM, I, OT, S>, B: Feedback<EM, I, OT, S>, FL: FeedbackLogic,

Source§

impl<A, EM, I, OT, S> Feedback<EM, I, OT, S> for NotFeedback<A>
where A: Feedback<EM, I, OT, S>,

Source§

impl<C, EM, I, M, OT, S> Feedback<EM, I, OT, S> for ObserverEqualityFeedback<C, M, S>
where M: Hash, C: AsRef<M>, OT: MatchName,

Source§

impl<C, EM, I, N, O, OT, R, S> Feedback<EM, I, OT, S> for MapFeedback<C, N, O, R>
where C: CanTrack + AsRef<O>, EM: EventFirer<I, S>, N: IsNovel<O::Entry>, O: MapObserver + for<'it> AsIter<'it, Item = O::Entry>, O::Entry: 'static + Default + Debug + DeserializeOwned + Serialize, OT: MatchName, R: Reducer<O::Entry>, S: HasNamedMetadata + HasExecutions,

Source§

impl<C, EM, I, O1, O2, OT, S> Feedback<EM, I, OT, S> for DiffFeedback<C, O1, O2>
where OT: MatchName, C: DiffComparator<O1, O2>,

Source§

impl<C, O, EM, I, OT, S, R, V> Feedback<EM, I, OT, S> for SimdMapFeedback<C, O, R, V>
where C: CanTrack + AsRef<O>, EM: EventFirer<I, S>, O: MapObserver<Entry = u8> + for<'a> AsSlice<'a, Entry = u8> + for<'a> AsIter<'a, Item = u8>, OT: MatchName, S: HasNamedMetadata + HasExecutions, R: SimdReducer<V>, V: VectorType + Copy + Eq, R::PrimitiveReducer: Reducer<u8>,

Source§

impl<EM, I, L, OT, S> Feedback<EM, I, OT, S> for ExitKindFeedback<L>
where L: ExitKindLogic,

Source§

impl<EM, I, OT, N, S> Feedback<EM, I, OT, S> for CustomFilenameToTestcaseFeedback<N>
where N: CustomFilenameGenerator<I, S>,

Source§

impl<EM, I, OT, S> Feedback<EM, I, OT, S> for ConstFeedback

Source§

impl<EM, I, OT, S> Feedback<EM, I, OT, S> for BoolValueFeedback<'_>
where OT: ObserversTuple<I, S>, S: HasNamedMetadata,

Source§

impl<EM, I, OT, S> Feedback<EM, I, OT, S> for CaptureTimeoutFeedback
where S: HasCorpus<I> + HasMetadata, I: Debug + Serialize + DeserializeOwned + Default + 'static + Clone,

Source§

impl<EM, I, OT, S> Feedback<EM, I, OT, S> for ConcolicFeedback<'_>
where OT: MatchName,

Source§

impl<EM, I, OT, S> Feedback<EM, I, OT, S> for StdErrToMetadataFeedback
where OT: MatchName,

Source§

impl<EM, I, OT, S> Feedback<EM, I, OT, S> for StdOutToMetadataFeedback
where OT: MatchName,

Source§

impl<EM, I, OT, S> Feedback<EM, I, OT, S> for TimeFeedback
where OT: MatchName,

Source§

impl<EM, I, OT, S> Feedback<EM, I, OT, S> for TransferredFeedback
where S: HasMetadata,

Source§

impl<EM, I, OT, S, T> Feedback<EM, I, OT, S> for ListFeedback<T>
where OT: MatchName, S: HasNamedMetadata, T: Debug + Eq + Hash + for<'a> Deserialize<'a> + Serialize + Default + Copy + 'static,

Source§

impl<EM, I, OT: ObserversTuple<I, S>, S: HasNamedMetadata, T: Hash> Feedback<EM, I, OT, S> for ValueBloomFeedback<'_, T>

Source§

impl<EM, OT, S> Feedback<EM, NautilusInput, OT, S> for NautilusFeedback<'_>

Source§

impl<O, EM, I, OT, S> Feedback<EM, I, OT, S> for NewHashFeedback<O>