-
-
Notifications
You must be signed in to change notification settings - Fork 398
Description
At the moment, a fitness > 0 is enough to add a testcase to the corpus, and the fitness is computed aggregating with an addition all the return values of Feedback::is_interesting.
Now, what if I want to consider a testcase interesting if triggers new coverage AND is crashing?
We should find a good solution and reengineer the fitness calculation part.
As the fitness atm is not used, we can get rid of it IMO and change FeedbacksTuple to be a compile time structure to express a conditional formula. Ofc is_interesting should now return simply a boolean.
In pseudocode, we should enable something like this to find interesting crashing testcases that trigger new coverage or are quicker to execute:
let state = State::new(
...,
feedback: feedback_and!(CrashFeedback::new(), feedback_or!(MapFeedback::new(...), TimeFeedback::new(...))),
...
);
tuple_OP can be implemented as FeedbackAggregator<AggregatorOperator, FeedbacksTuple>
that is a Feedback itself and define an operation to aggregate the results of the underlying feedbacks in the tuple.
The above example will expand to:
FeedbackAggregator::<AndOperator, _>::new(tuple_list!(CrashFeedback::new(), FeedbackAggregator::<OrOperator, _>::new(tuple_list!(MapFeedback::new(...), TimeFeedback::new(...)))))