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

replace negate conditional with remove conditional #943

Merged
merged 1 commit into from
Oct 7, 2021

Conversation

hcoles
Copy link
Owner

@hcoles hcoles commented Oct 6, 2021

Removes negate conditionals from the default set and replaces it with remove conditional (false). Remove conditional (true) is added to the STRONGER set.

This leaves both sets creating the same number of mutants, but as remove conditional is more stable than negate conditional a stronger test suite is required to kill the mutants.

Remove conditional logically subsumes negate conditional. We can see this with a truth table.

The != operator gives

true true -> false
true false -> true
false true -> true
false false -> false

Its negation (==) gives

true true -> true
true false -> false
false true -> false
false false -> true

where as replacing it with false gives

true true -> false
true false -> false
false true -> false
false false -> false

So, if the test suite provided only true,true and false,false as inputs, the mutant would be killed for negation, but survive for removal.

@hcoles hcoles force-pushed the feature/tweak_default_mutator_set branch from 9310c2e to 5c17e36 Compare October 6, 2021 10:46
@hcoles hcoles force-pushed the feature/tweak_default_mutator_set branch from 5c17e36 to 5a72b65 Compare October 6, 2021 11:01
@hcoles hcoles merged commit a26264f into master Oct 7, 2021
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.

1 participant