Branching Processes for QuickCheck Generators

08/04/2018
by   Agustín Mista, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/26/2019

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

Xorshift128+ are pseudo random number generators with eight sets of para...
research
05/25/2022

High dimensional Bernoulli distributions: algebraic representation and applications

The main contribution of this paper is to find a representation of the c...
research
11/03/2018

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

In today's world, several applications demand numbers which appear rando...
research
10/10/2020

Automatically Deriving Control-Flow Graph Generators from Operational Semantics

We develop the first theory of control-flow graphs from first principles...
research
11/01/2018

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

Generative moment matching networks are introduced as quasi-random numbe...
research
08/26/2022

Automatic Synthesis of Random Generators for Numerically Constrained Algebraic Recursive Types

In program verification, constraint-based random testing is a powerful t...
research
11/18/2019

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

In this paper, we present the testing of four hypotheses on two streams ...

Please sign up or login with your details

Forgot password? Click here to reset