falsify: Internal Shrinking Reimagined for Haskell
In property based testing we do not apply a function under test to known inputs and check for known outputs, but state \emph{properties} relating inputs and outputs. We then apply the function to \emph{random} inputs, and verify that the property holds; if not, we found a bug. Randomly generated inputs tend to be large and must be minimised, traditionally using an explicitly provided \emph{shrinker}. In this paper we propose a way to write generators that obsoletes the need to write a separate shrinker. Inspired by the Python library Hypothesis
, the approach can work even across monadic bind. Compared to Hypothesis
, we claim that our approach is more suitable to the Haskell setting: it depends on minimal set of core principles, and handles generation and shrinking of infinite data structures, including functions.
Sat 9 SepDisplayed time zone: Pacific Time (US & Canada) change
11:00 - 12:30 | |||
11:00 30mTalk | falsify: Internal Shrinking Reimagined for Haskell Haskell Edsko de Vries Well-Typed LLP DOI | ||
11:30 30mTalk | Don’t Go Down the Rabbit Hole: Reprioritizing Enumeration for Property-Based Testing Haskell Segev Elazar Mittelman University of Maryland, College Park, Aviel Resnick University of Pennsylvania, Ivan Perez NASA Ames Research Center, Alwyn Goodloe NASA Langley Research Center, Leonidas Lampropoulos University of Maryland, College Park DOI | ||
12:00 30mMeeting | Lightning Talks II Haskell |