Automated Derivation of Random Generators for Algebraic Data Types
Licentiatavhandling, 2020

Many testing techniques such as generational fuzzing or random property-based testing require the existence of some sort of random generation process for the values used as test inputs. Implementing such generators is usually a task left to end-users, who do their best to come up with somewhat sensible implementations after several iterations of trial and error. This necessary effort is of no surprise, implementing good random data generators is a hard task. It requires deep knowledge about both the domain of the data being generated, as well as the behavior of the stochastic process generating such data. In addition, when the data we want to generate has a large number of possible variations, this process is not only intricate, but also very cumbersome.

To mitigate this issues, this thesis explores different ideas for automatically deriving random generators based on existing static information. In this light, we design and implement different derivation algorithms in Haskell for obtaining random generators of values encoded using Algebraic Data Types (ADTs). Although there exists other tools designed directly or indirectly for this very purpose, they are not without disadvantages. In particular, we aim to tackle the lack of flexibility and static guarantees in the distribution induced by derived generators. We show how automatically derived generators for ADTs can be framed using a simple yet powerful stochastic model. This models can be used to obtain analytical guarantees about the distribution of values produced by the derived generators. This, in consequence, can be used to optimize the stochastic generation parameters of the derived generators towards target distributions set by the user, providing more flexible derivation mechanisms.

Random Testing, Penetration Testing, Meta-programming, Haskell

EDIT EA
Opponent: Leonidas Lampropoulos, University of Maryland/University Of Pennsylvania, United States

Författare

Claudio Agustin Mista

Chalmers, Data- och informationsteknik, Informationssäkerhet

Generating Random Structurally Rich Algebraic Data Type Values

2019 IEEE/ACM 14th International Workshop on Automation of Software Test (AST),; (2019)p. 48-54

Paper i proceeding

Deriving Compositional Random Generators

ACM International Conference Proceeding Series,; Vol. 25 September 2019(2019)

Paper i proceeding

Branching Processes for QuickCheck Generators

Proceedings of the 11th ACM SIGPLAN International Symposium on Haskell,; Vol. 53(2018)p. 1-13

Paper i proceeding

Octopi: Säker Programering för Sakernas Internet

Stiftelsen för Strategisk forskning (SSF) (RIT17-0023), 2018-03-01 -- 2023-02-28.

WebSec: Säkerhet i webb-drivna system

Stiftelsen för Strategisk forskning (SSF) (RIT17-0011), 2018-03-01 -- 2023-02-28.

Styrkeområden

Informations- och kommunikationsteknik

Ämneskategorier

Sannolikhetsteori och statistik

Datavetenskap (datalogi)

Datorsystem

Utgivare

Chalmers

EDIT EA

Opponent: Leonidas Lampropoulos, University of Maryland/University Of Pennsylvania, United States

Mer information

Senast uppdaterat

2020-02-17