It occurs to me that a fairly straightforward form of test case reduction is to require action bodies have a member with one of these signatures:
module Payload : sig
(* ... *)
val shrinker : t Base_quickcheck.Shrinker.t (* or *)
val shrinker : t -> t Sequence.t
end
The idea is that the payload shrinker would, in the QuickCheck tradition, propose a lazy sequence of ways in which the payload can be shrunk. I suspect the sequence would need to contain drastic shrinks first and then step backwards.
Ideas of useful shrinks:
known-constant expressions just get replaced with their constant;
operator simplification;
(would cause path motion, but) conditional wrapping on early-outs;
etc.
Most of these shrinks wouldn't affect path motion (at least, not until we add in-expression pathing), and so could be added before we fix #218. We could then add to the bisector the ability to trawl through every remaining action's payload and perform payload shrinking (and, eventually, once we have path motion compensation, we'd be able to knock other actions out too).
It occurs to me that a fairly straightforward form of test case reduction is to require action bodies have a member with one of these signatures:
The idea is that the payload shrinker would, in the QuickCheck tradition, propose a lazy sequence of ways in which the payload can be shrunk. I suspect the sequence would need to contain drastic shrinks first and then step backwards.
Ideas of useful shrinks:
Most of these shrinks wouldn't affect path motion (at least, not until we add in-expression pathing), and so could be added before we fix #218. We could then add to the bisector the ability to trawl through every remaining action's payload and perform payload shrinking (and, eventually, once we have path motion compensation, we'd be able to knock other actions out too).