mutant icon indicating copy to clipboard operation
mutant copied to clipboard

Add mutation `[foo]` → `[^foo]`

Open backus opened this issue 8 years ago • 3 comments

backus avatar May 23 '16 17:05 backus

This makes me think about adding: /foo/ to /\Afoo/, /foo\z and /\Afoo\z/ not because of semantic but syntax similarity.

On the original proposal:

[^foo] is the strict inverse of [foo] so there is no overlapping input that satisfies both, as this is a "total" reduction for the original input, I consider it not a good mutation. As there will never be a test alive?

mbj avatar May 23 '16 18:05 mbj

[^foo] is the strict inverse of [foo] so there is no overlapping input that satisfies both, as this is a "total" reduction for the original input, I consider it not a good mutation.

Interesting. So do you also not like mutation from \w to \W or is that different?

backus avatar May 24 '16 18:05 backus

So do you also not like mutation from \w to \W or is that different?

@mbj I'm also curious about what you currently think about this. It seems like this might be useful in some cases but it might be covered similarly well by removing the entire character group or flipping case for each literal, etc. Happy to implement or modify.

dgollahon avatar Jan 02 '21 17:01 dgollahon