Branching Processes for QuickCheck Generators

by   Agustín Mista, et al.

In QuickCheck (or, more generally, random testing), it is challenging to control random data generators' distributions---specially when it comes to user-defined algebraic data types (ADT). In this paper, we adapt results from an area of mathematics known as branching processes, and show how they help to analytically predict (at compile-time) the expected number of generated constructors, even in the presence of mutually recursive or composite ADTs. Using our probabilistic formulas, we design heuristics capable of automatically adjusting probabilities in order to synthesize generators which distributions are aligned with users' demands. We provide a Haskell implementation of our mechanism in a tool called DRaGeN and perform case studies with real-world applications. When generating random values, our synthesized QuickCheck generators show improvements in code coverage when compared with those automatically derived by state-of-the-art tools.



There are no comments yet.


page 1

page 2

page 3

page 4


Again, random numbers fall mainly in the planes: xorshift128+ generators

Xorshift128+ are pseudo random number generators with eight sets of para...

A Search for Good Pseudo-random Number Generators : Survey and Empirical Studies

In today's world, several applications demand numbers which appear rando...

Automatically Deriving Control-Flow Graph Generators from Operational Semantics

We develop the first theory of control-flow graphs from first principles...

Quasi-random number generators for multivariate distributions based on generative neural networks

Generative moment matching networks are introduced as quasi-random numbe...

Efficient and Secure Substitution Box and Random Number Generators Over Mordell Elliptic Curves

Elliptic curve cryptography has received great attention in recent years...

Generating Pareto records

We present, (partially) analyze, and apply an efficient algorithm for th...

Infinitesimal generators for two-dimensional Lévy process-driven hypothesis testing

In this paper, we present the testing of four hypotheses on two streams ...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.