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. We give Luck a formal semantics and prove several fundamental properties, including the soundness and completeness of random generation with respect to a standard predicate semantics. We evaluate Luck on common examples from the property-based testing literature and on two significant case studies, showing that it can be used in complex domains with comparable bug-finding effectiveness and a significant reduction in testing code size compared to handwritten generators.
| Original language | English |
|---|---|
| Title of host publication | Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages |
| Editors | Giuseppe Castagna, Andrew D. Gordon |
| Place of Publication | New York, NY, USA |
| Publisher | Association for Computing Machinery, Inc |
| Pages | 114–129 |
| Number of pages | 16 |
| ISBN (Print) | 9781450346603 |
| DOIs | |
| Publication status | Published - 1 Jan 2017 |
| Event | 44th ACM SIGPLAN Symposium on Principles of Programming Languages 2017 - Paris, France Duration: 15 Jan 2017 → 21 Jan 2017 https://conf.researchr.org/home/POPL-2017 |
Publication series
| Name | POPL '17 |
|---|---|
| Publisher | Association for Computing Machinery |
Conference
| Conference | 44th ACM SIGPLAN Symposium on Principles of Programming Languages 2017 |
|---|---|
| Abbreviated title | POPL 2017 |
| Country/Territory | France |
| City | Paris |
| Period | 15/01/17 → 21/01/17 |
| Internet address |
Keywords / Materials (for Non-textual outputs)
- random testing
- property-based testing
- narrowing
- domain specific language
- constraint solving
Fingerprint
Dive into the research topics of 'Beginner's Luck: A Language for Property-Based Generators'. Together they form a unique fingerprint.Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver