falsify: Internal Shrinking Reimagined for Haskell
summary
falsify implements internal shrinking for Haskell by parsing an infinite splitable sample tree of RNG bits into values rather than by pairing generators with separate shrinkers. generators return a value plus the shrinkable sample locations, so functions and infinite structures shrink to tiny counterexamples (example: a generated [Word8] -> Bool collapses to “true for 1618, false elsewhere”). it uses Prim combinators, selective functors to avoid irrelevant shrinking, and a one-bit shrunk state to enable manual shrink embedding; library offers combinators and shrink tests but no large case studies yet.
AI-written summary · about
chapters (8)
- 0:00Introduction to shrinking
- 3:27Limitations of existing models
- 7:52The Falsify approach
- 12:58Writing robust generators
- 17:24Selective choices and state
- 22:15Advanced combinators
- 25:24Philosophy and conclusion
- 27:01Q&A session
related talks
41mBuilding test check Generators
27mReflecting on Random Generation
02h 38mLazy Evaluation
20mWhat's the fuzz all about? Randomized data generation for robust unit testing
48mThe Properties of Property Testing with Hedgehog
32mGenerative Testing: Properties, State and Beyond
41mCan you make that smaller? An introduction to test-case reduction
40mAn Introduction to Combinator Compilers and Graph Reduction Machines
