We introduce StrictCheck: a property-based random testing framework for observing, specifying, and testing the strictness behaviors of Haskell functions. Strictness behavior is traditionally considered a non-functional property; StrictCheck allows it to be tested as if it were one, by reifying demands on data structures so they can be manipulated and examined within Haskell.
Testing strictness requires us to 1) efficiently observe the evaluation of data structures, 2) precisely specify strictness behaviors, and 3) correctly generate functions with random strictness. We tackle all three of these challenges, deriving an efficient, expressive, and generic framework for precise dynamic strictness testing. StrictCheck can specify and test the strictness behavior of any Haskell function—including higher-order ones—with only a constant factor of overhead, and requires no boilerplate for testing functions on Haskell-standard algebraic data types.
We demonstrate a non-trivial application of our library, developing a correct specification of a data structure whose properties intrinsically rely on subtle use of laziness: Okasaki’s constant-time purely functional queue.
Mon 24 SepDisplayed time zone: Guadalajara, Mexico City, Monterrey change
10:30 - 12:00 | Environments and ToolsResearch Papers at Stifel Theatre Chair(s): Alejandro Russo Chalmers University of Technology, Sweden | ||
10:30 22mTalk | Build Systems à la CarteDistinguished Paper Research Papers DOI | ||
10:52 22mTalk | Keep Your Laziness in Check Research Papers Kenneth Foner , Hengchu Zhang University of Pennsylvania, Leonidas Lampropoulos University of Pennsylvania DOI | ||
11:15 22mTalk | Merlin: A Language Server for OCaml (Experience Report) Research Papers DOI | ||
11:37 22mTalk | Functional Programming for Compiling and Decompiling Computer-Aided Design Research Papers Chandrakana Nandi University of Washington, USA, James R. Wilcox University of Washington, Taylor Blau University of Washington, Dan Grossman University of Washington, Zachary Tatlock University of Washington, Seattle DOI |