CPL - Chalmers Publication Library
| Utbildning | Forskning | Styrkeområden | Om Chalmers | In English In English Ej inloggad.

Generating constrained random data with uniform distribution

Koen Claessen (Institutionen för data- och informationsteknik, Programvaruteknik (Chalmers)) ; Jonas Duregård (Institutionen för data- och informationsteknik, Programvaruteknik (Chalmers)) ; Michal H. Palka (Institutionen för data- och informationsteknik, Programvaruteknik (Chalmers))
Journal of functional programming (0956-7968). Vol. 25 (2015), e8,
[Artikel, refereegranskad vetenskaplig]

We present a technique for automatically deriving test data generators from a given executable predicate representing the set of values we are interested in generating. The distribution of these generators is uniform over values of a given size. To make the generation efficient, we rely on laziness of the predicate, allowing us to prune the space of values quickly. In contrast, implementing test data generators by hand is labour intensive and error prone. Moreover, handwritten generators often have an unpredictable distribution of values, risking that some values are arbitrarily underrepresented. We also present a variation of the technique that has better performance, but where the distribution is skewed in a limited, albeit predictable way. Experimental evaluation of the techniques shows that the automatically derived generators are much easier to define than handwritten ones, and their performance, while lower, is adequate for some realistic applications.

Denna post skapades 2015-11-06. Senast ändrad 2016-05-03.
CPL Pubid: 225344


Läs direkt!

Länk till annan sajt (kan kräva inloggning)

Institutioner (Chalmers)

Institutionen för data- och informationsteknik, Programvaruteknik (Chalmers)


Datavetenskap (datalogi)

Chalmers infrastruktur

Relaterade publikationer

Denna publikation ingår i:

Automating Black-Box Property Based Testing