Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FeedbackFactory implementations for CrashFeedback, CombinedFeedback and DiffFeedback. #2060

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

djoooooe
Copy link
Contributor

This allows using more complex feedback constructs in StdTMinMutationalStage without having to implement FeedbackFactory for them.

Example:

let diff_feedback = DiffFeedback::new("MyDiffFeedback", &observer_a, &observer_b, |a, b| {
    compare_observations(a, b)
}).unwrap();

let objective = feedback_or!(diff_feedback, CrashFeedback::new());

let min_stage = StdTMinMutationalStage::new(
    mutator,
    objective,
    1 << 10,
);

@addisoncrump
Copy link
Collaborator

Nice. Can we remove the type definitions for the default factories?

@djoooooe
Copy link
Contributor Author

Nice. Can we remove the type definitions for the default factories?

I don't know, maybe someone else can comment on that...

Copy link
Collaborator

@addisoncrump addisoncrump left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, let me rephrase. Please remove the existing type declarations (e.g., type CrashFeedbackFactory) where you've just made it possible for the Feedbacks to produce themselves.

@djoooooe
Copy link
Contributor Author

I removed type CrashFeedbackFactory, I don't see another type made obsolete by my changes.

Copy link
Collaborator

@addisoncrump addisoncrump left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@addisoncrump addisoncrump merged commit d349651 into AFLplusplus:main Apr 23, 2024
78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants