Trait Pool

Source
pub trait Pool: SaveToStatsFolder {
    type Stats: Stats;

    // Required methods
    fn stats(&self) -> Self::Stats;
    fn get_random_index(&mut self) -> Option<PoolStorageIndex>;

    // Provided method
    fn weight(&self) -> f64 { ... }
}
Expand description

A Pool ranks test cases based on observations recorded by a sensor.

The pool trait is divided into two parts:

  1. Pool contains general methods that are independent of the sensor used
  2. CompatibleWithObservations<O> is a subtrait of Pool. It describes how the pool handles observations made by the Sensor.

Required Associated Types§

Source

type Stats: Stats

Statistics about the pool to be printed to the terminal as the fuzzer is running and saved to a .csv file after the run

Required Methods§

Source

fn stats(&self) -> Self::Stats

The pool’s statistics

Source

fn get_random_index(&mut self) -> Option<PoolStorageIndex>

Get the index of a random test case.

Most Pool implementations will want to prioritise certain test cases over others based on their associated observations.

Provided Methods§

Source

fn weight(&self) -> f64

Gives the relative importance of the pool. It must be a positive number.

The weight of the pool is not used by the fuzzer directly, but can be used by types such as AndPool.

The value is 1.0 by default.

Implementors§