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

More mutation operators #93

Open
abingham opened this issue Apr 18, 2015 · 5 comments
Open

More mutation operators #93

abingham opened this issue Apr 18, 2015 · 5 comments

Comments

@abingham
Copy link
Contributor

We obviously need more operations. This task really is "make a list of operators and make issues for creating them."


@abingham
Copy link
Contributor Author

Here's the list from MutPy:

  • AOD - arithmetic operator deletion
  • AOR - arithmetic operator replacement
  • ASR - assignment operator replacement
  • BCR - break continue replacement
  • COD - conditional operator deletion
  • COI - conditional operator insertion
  • CRP - constant replacement
  • DDL - decorator deletion
  • EHD - exception handler deletion
  • EXS - exception swallowing
  • IHD - hiding variable deletion
  • IOD - overriding method deletion
  • IOP - overridden method calling position change
  • LCR - logical connector replacement
  • LOD - logical operator deletion
  • LOR - logical operator replacement
  • ROR - relational operator replacement
  • SCD - super calling deletion
  • SCI - super calling insert
  • SIR - slice index remove

Experimental mutation operators:

  • CDI - classmethod decorator insertion
  • OIL - one iteration loop
  • RIL - reverse iteration loop
  • SDI - staticmethod decorator insertion
  • SDL - statement deletion
  • SVD - self variable deletion
  • ZIL - zero iteration loop

Original comment by: austin_bingham

@drorasaf
Copy link
Contributor

I think that the MutPy list is implemented, except for less worthy mutators.
Some of the experimental already implemented as part of pylint.
Think its time to create another list:)

@abingham
Copy link
Contributor Author

I think that the MutPy list is implemented, except for less worthy mutators.

I'm not sure which operators are more or less "worthy" :) But there are definitely a number of MutPy operators I'd like to investigate/implement, e.g. slice index remove, super calling deletion/insert.

Some of the experimental already implemented as part of pylint.

Even if pylint helps detect certain problems, I think we should still give CR support for performing related mutations. Users might not be using pylint. But I definitely consider these operators to be lower priority.

@drorasaf
Copy link
Contributor

drorasaf commented Sep 5, 2017

One of the major issues to address with the mutation is whether false positive is something that should be fine within the package boundaries and if so, how does the package handle it to be blacklabeled or any other mechanism to prevent it

@abingham
Copy link
Contributor Author

abingham commented Sep 6, 2017

One of the major issues to address with the mutation is whether false positive is something that should be fine within the package boundaries

This is definitely a major issue. We have to deal with the issue of "false equivalents" where mutations are practically undetectable. At the same time we have to deal with situations where the user doesn't want to - or for some reason can't - create tests to deal with a surviving mutant. It's a big topic in mutation testing in general, and something I've given a fair amount of thought to.

how does the package handle it to be blacklabeled or any other mechanism to prevent it

My plan for dealing with is much as you describe: allow the user to specify that certain mutations should not be performed at certain locations, i.e. to "blacklist" mutations for certain parts of code. The discussion of this topic should take place in #97, where you'll see that there's even an exploratory branch for this work. If you have ideas or want to help out, that would be great!

@abingham abingham added pyconuk and removed pyconuk labels Oct 30, 2017
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

No branches or pull requests

2 participants