Mutation Sets

Mutagoph provides four mutation sets with increasing intensity.

Overview

Set Operators Description
lite 4 Fast feedback - essential mutations only
standard 9 Balanced coverage for regular use
thorough 13 Comprehensive mutation testing
mutilated 23 All operators - maximum coverage

lite

Fast feedback with essential mutations. Best for watch mode and quick checks.

mutagoph run --mutations lite

Operators: arithmetic_replace, comparison_replace, literal_replace, bool_replace

standard

Balanced coverage for regular use. Good for CI and pre-commit checks.

mutagoph run --mutations standard

Includes all lite operators plus: arithmetic_delete, comparison_boundary, logical_replace, assign_replace, bitwise_replace

thorough

Comprehensive mutation testing. Good for release validation.

mutagoph run --mutations thorough

Includes all standard operators plus: string_replace, bitwise_assign, statement_delete, return_replace

mutilated (default)

All 23 operators for maximum coverage. Best for comprehensive analysis.

mutagoph run --mutations mutilated

Includes all thorough operators plus: condition_negate, condition_remove, else_remove, loop_break, call_silence, return_remove, slice_boundary, switch_case, loop_condition, loop_range_break

Choosing a Set

Scenario Recommended Set
Development (watch mode) lite
PR validation standard
Release testing thorough or mutilated
Finding all gaps mutilated
CI with time constraints standard

All Mutation Operators

Arithmetic

Operator Description Example
arithmetic_replace Replace arithmetic operators a + ba - b, a * ba / b
arithmetic_delete Remove one operand a + ba

Comparison

Operator Description Example
comparison_replace Replace comparison operators a == ba != b, a < ba > b
comparison_boundary Modify boundary conditions a < ba <= b, a >= ba > b

Logical

Operator Description Example
logical_replace Replace logical operators a && ba \|\| b, !xx

Bitwise

Operator Description Example
bitwise_replace Replace bitwise operators a & ba \| b, a << 1a >> 1
bitwise_assign Replace bitwise assignment a &= ba \|= b, a ^= ba &= b

Literals

Operator Description Example
literal_replace Replace numeric literals 01, 4243, -10
bool_replace Flip boolean literals truefalse, falsetrue
string_replace Replace string literals "hello""", "foo""mutated"

Statements

Operator Description Example
statement_delete Delete statement entirely x = 5 → (removed)
return_replace Replace return with zero value return xreturn 0, return errreturn nil

Assignment

Operator Description Example
assign_replace Replace assignment operators x += 1x -= 1, x *= 2x /= 2

Conditionals

Operator Description Example
condition_negate Negate condition if x > 0if !(x > 0)
condition_remove Remove conditional, keep body if x { body }body
else_remove Remove else branch if x { a } else { b }if x { a }

Loops

Operator Description Example
loop_break Swap break and continue breakcontinue, continuebreak
loop_condition Modify loop condition for i < nfor true, for i < nfor false
loop_range_break Add break to range loop for range x { body }for range x { body; break }

Expressions

Operator Description Example
call_silence Silence function call result f()_ = f()
return_remove Remove return statement return x, err → (statement removed)
slice_boundary Modify slice boundaries s[:2]s[:1], s[1:]s[2:]

Switch

Operator Description Example
switch_case Remove or swap switch cases case x: bodycase x: (body removed)