Beginner's luck: a language for property-based generators
Leonidas Lampropoulos, Diane Gallois-Wong, Catalin Hritcu, John Hughes, Benjamin C. Pierce, Li-yao Xia
Abstract
Property-based random testing à la QuickCheck requires building efficient generators for well-distributed random data satisfying complex logical predicates, but writing these generators can be difficult and error prone. We propose a domain-specific language in which generators are conveniently expressed by decorating predicates with lightweight annotations to control both the distribution of generated values and the amount of constraint solving that happens before each variable is instantiated. This language, called Luck, makes generators easier to write, read, and maintain.
Related papers
- Review of "Learn you some Erlang for great good! A beginner's guide", by Fred Hébert, No Starch Press, 2013, £26.80 (paperback), ISBN: 978-1-59327-435-1 JFP 2015
- Understanding beginners' mistakes with Haskell JFP 2015
- High performance distributed deep learning: a beginner's guide PPoPP 2019
- Learn You a Haskell for Great Good! A Beginner's Guide, by Miran Lipovaca, No Starch Press, April 2011, ISBN-10: 1593272839; ISBN-13: 978-1593272838, 376 pp JFP 2013
- Programming language semantics: It's easy as 1,2,3 JFP 2023
- Teaching types with a cognitively effective worked example format JFP 2015
- Example-driven software language engineering SLE 2020
- Fold-unfold lemmas for reasoning about recursive programs using the Coq proof assistant JFP 2022