hcoles / pitest

State of the art mutation testing system for the JVM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Common index for mutators

hcoles opened this issue · comments

A mutation is currently identified by the combination of

  • Generating mutation operator
  • The method descriptor
  • It's numeric "index" - e.g this is the 3rd mutation this mutator could create in this method

This scheme has the advantage that mutations are relatively stable when the method changes. Introducing 20 new IINC instruction would leave mutations that affect other instructions with the same index. This is useful for tools such as sonar.

A downside is that it is not possible to determine if mutations from different operators affect the same statement.

If mutators shared a common indexing system (e.g by indexing on the number of the mutated instruction) it would allow mutations to be compared, and should make it possible to remove the pre-scan stage, replacing it with new filters. This should simplify the code and may have performance benefits as the filters would only need to be run once - the prescan must currently by run when both initially scanning for mutants, and within the child processes when the mutants are enabled.

@hcoles As the release notes at https://github.com/hcoles/pitest/releases/tag/pitest-parent-1.1.0 state that this enhancement is now implemented: can this issue be closed or am I missing something?

Yes, it can be closed. Issue cleanup is lagging behind a little.