Deriving Compositional Random Generators
Paper i proceeding, 2019

Generating good random values described by algebraic data types is often quite intricate. State-of-the-art tools for synthesizing random generators serve the valuable purpose of helping with this task, while providing different levels of invariants imposed over the generated values. However, they are often not built for composability nor extensibility, a useful feature when the shape of our random data needs to be adapted while testing different properties or sub-systems.

In this work, we develop an extensible framework for deriving compositional generators, which can be easily combined in different ways in order to fit developers’ demands using a simple type level description language. Our framework relies on familiar ideas from the à la Carte technique for writing composable interpreters in Haskell. In particular, we adapt this technique with the machinery required in the scope of random generation, showing how concepts like generation frequency or terminal constructions can also be expressed in the same type-level fashion. We provide an implementation of our ideas, and evaluate its performance using real world examples.

Haskell

type-level programming

random testing

Författare

Claudio Agustin Mista

Chalmers, Data- och informationsteknik, Informationssäkerhet

Alejandro Russo

Chalmers, Data- och informationsteknik, Informationssäkerhet

ACM International Conference Proceeding Series

Vol. 25 September 2019
978-145037562-7 (ISBN)

31st Symposium on Implementation and Application of Functional Languages
Singapore, Singapore,

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

Inbäddad systemteknik

Datavetenskap (datalogi)

Datorsystem

DOI

10.1145/3412932.3412943

ISBN

9781450375627

Mer information

Senast uppdaterat

2022-01-31