2017
DOI: 10.1145/3093333.3009868
|View full text |Cite
|
Sign up to set email alerts
|

Beginner's luck: a language for property-based generators

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, c… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
2
1
1
1

Citation Types

0
7
0

Year Published

2018
2018
2020
2020

Publication Types

Select...
2
2
1

Relationship

3
2

Authors

Journals

citations
Cited by 7 publications
(7 citation statements)
references
References 57 publications
0
7
0
Order By: Relevance
“…One general technique evaluates predicates lazily to drive generation (random or enumerative) [7,9], but one loses control over the resulting distribution of generated values. Luck [15] is a domainspecific language blending narrowing and constraint solving to specify generators as predicates with user-provided annotations to control the probability distribution. In contrast, our programs can be viewed as generators annotated with left inverses with which to derive predicates.…”
Section: Discussion and Related Workmentioning
confidence: 99%
“…One general technique evaluates predicates lazily to drive generation (random or enumerative) [7,9], but one loses control over the resulting distribution of generated values. Luck [15] is a domainspecific language blending narrowing and constraint solving to specify generators as predicates with user-provided annotations to control the probability distribution. In contrast, our programs can be viewed as generators annotated with left inverses with which to derive predicates.…”
Section: Discussion and Related Workmentioning
confidence: 99%
“…While the proof of this theorem discovered no errors in the rules or the well-stamped invariant, it did discover a serious flaw in the indistinguishability relation for stacks, which was previously hidden by an error in our stack generator (the wrong definition is described in Section A.5). This illustrates that keeping generators and checkers in sync is challenging and brings further motivation to recent work on domain-specific languages for generators (Claessen et al, 2014;Fetscher et al, 2015;Lampropoulos et al, 2015).…”
Section: Theoremmentioning
confidence: 95%
“…(In the case that p C v j = 0, the last equation in this proposition holds trivially by (17).) And by replacing (19) in (18) we obtain:…”
Section: A Demonstrationsmentioning
confidence: 95%
“…Recently, Midtgaard et al extend such a technique to test compilers for impure programming languages [23]. Luck [19] is a domain specific language for writing testing properties and QuickCheck generators at the same time. We see Luck's approach as orthogonal to ours, which is mostly intended to be used when we do not know any specific property of the system under test, although we consider that borrowing some functionality from Luck into is an interesting path for future work.…”
Section: Related Workmentioning
confidence: 99%
See 1 more Smart Citation