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 1m40s 2s 2s 1m42s 1m40s
Eval 1m42s 41s 41s 2m23s 0s
Build 49m18s 52s 53s 50m11s 46m54s
Suite 1m40s 1m36s 48m31s 50m11s 48m35s

Timeline

0s1m50s2m2m10s2m20s49m20s49m30s49m40s49m50s50m50m10s