Generating Random Structurally Rich Algebraic Data Type Values
Paper i proceeding, 2019

Automatic generation of random values described by algebraic data types (ADTs) is often a hard task. State-of-the-art random testing tools can automatically synthesize random data generators based on ADTs definitions. In that manner, generated values comply with the structure described by ADTs, something that proves useful when testing software which expects complex inputs. However, it sometimes becomes necessary to generate structural richer ADTs values in order to test deeper software layers. In this work we propose to leverage static information found in the codebase as a manner to improve the generation process. Namely, our generators are capable of considering how programs branch on input data as well as how ADTs values are built via interfaces. We implement a tool, responsible for synthesizing generators for ADTs values while providing compiletime guarantees about their distributions. Using compile-time predictions, we provide a heuristic that tries to adjust the distribution of generators to what developers might want. We report on preliminary experiments where our approach shows encouraging results.

algebraic data types

random testing

Haskell

Författare

Claudio Agustin Mista

Chalmers, Data- och informationsteknik, Informationssäkerhet

Alejandro Russo

Chalmers, Data- och informationsteknik, Informationssäkerhet

Proceedings - 2019 IEEE/ACM 14th International Workshop on Automation of Software Test, AST 2019

48-54 8822136
978-1-7281-2237-3 (ISBN)

14th IEEE/ACM International Workshop on Automation of Software Test, AST 2019
Montreal, Canada,

WebSec: Säkerhet i webb-drivna system

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

Octopi: Säker Programering för Sakernas Internet

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

Styrkeområden

Informations- och kommunikationsteknik

Ämneskategorier

Bioinformatik (beräkningsbiologi)

Datavetenskap (datalogi)

Datorsystem

DOI

10.1109/AST.2019.00013

Mer information

Senast uppdaterat

2023-03-21