ee3784cc

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Mutation: TupleSwap operator (swap two same-typed tuple components)

For a boxed tuple whose two components share a type, emit one mutant per
same-typed pair that swaps that pair.  This is the tuple-syntax
counterpart to SwitchFunctionArguments, which only walks application
spines and so never reaches the ExplicitTuple node.

Mirrors that operator's honesty restrictions: tuple sections (which
carry a Missing component and are really functions) are skipped, and so
are pairs with identical source text (whose swap is an unkillable no-op).
No application-depth guard is needed -- each ExplicitTuple is visited
once and nested tuples are distinct nodes with distinct spans.

Only boxed tuples are mutated.  An unboxed tuple's type has kind
TYPE (TupleRep ...), not Type, but the ifMutation wrapper the plugin
places around every mutant is monomorphic in a lifted type.  Wrapping an
unboxed tuple builds an ill-kinded application that GHC miscompiles into
a binary that aborts at runtime (SIGABRT), so unboxed tuples are excluded
outright.  The unboxedPair regression in Example.TupleSwapLib pins this.

Suite timing

Time to Start Worker time Duration Time to finish Idle
Config 40s 2s 2s 43s 40s
Eval 43s 42s 42s 1m25s 0s
Build 49m11s 10s 10s 49m22s 47m47s
Suite 40s 54s 48m41s 49m22s 48m27s

Timeline

0s50s1m1m10s1m20s49m20s