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

Support target_method functioning for MutationFactory #435

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zzctmac
Copy link

@zzctmac zzctmac commented Oct 28, 2022

As shown in the issue, A crash happens when we use the target_method functioning with DynaMOSA. This is because:
To implement target_method_list, the developers select the target methods' fitness function in Factory class family, such as branch coverage.

  1. But the developers do not implement this functioning for the Mutation criterion.
  2. As a result, all mutation fitness functions are added to the genetic algorithms.
  3. When the GA is DynaMOSA, it dynamically selects goals by analyzing the dependence relationships among all goals. When DynaMOSA tries to analyze the relationship between branch fitness functions and a mutation fitness function that are not in the target method, the crash happens since branch fitness functions are not added to genetic algorithms.

To fix it, I made a slight change in MutationFactory, following the way of other criterion factories.

support the target_method functioning for MutationFactory

fix unused import
@jose
Copy link
Member

jose commented May 9, 2023

Hi @zzctmac,

Thanks for taking the time to contribute to this project. Before I go ahead and merge it, I'm wondering whether we would need to replicate this pull request to any other factory class.

--
Best,
Jose

@zzctmac
Copy link
Author

zzctmac commented May 9, 2023

@jose

Yes, that would be better. But I am sure that only the mutation criterion lacks this function among the default eight criteria.

@jose
Copy link
Member

jose commented May 9, 2023

Thanks. Any chance you could augment the TargetMethodListSystemTest class with a few more test cases that would exercise this on each of the default criteria?

@zzctmac
Copy link
Author

zzctmac commented May 9, 2023

Ok, good idea. Give me some time

@zzctmac zzctmac closed this May 9, 2023
@zzctmac zzctmac reopened this May 9, 2023
@zzctmac
Copy link
Author

zzctmac commented May 9, 2023

Hello @jose, I have created tests for checking all default criteria.

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.

2 participants