Fast and sound random generation for automated testing and benchmarking in objective Caml

  • Authors:
  • Benjamin Canou;Alexis Darrasse

  • Affiliations:
  • Université Pierre et Marie Curie (UPMC - Paris 6), Paris, France;Université Pierre et Marie Curie (UPMC - Paris 6), Paris, France

  • Venue:
  • Proceedings of the 2009 ACM SIGPLAN workshop on ML
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

Numerous software testing methods involve random generation of data structures. However, random sampling methods currently in use by testing frameworks are not satisfactory: often manually written by the programmer or at best extracted in an ad-hoc way relying on no theoretical background. On the other end, random sampling methods with good theoretical properties exist but have a too high cost to be used in testing, in particular when large inputs are needed. In this paper we describe how we applied the recently developed Boltzmann model of random generation to algebraic data types. We obtain a fully automatic way to derive random generators from Objective Caml type definitions. These generators have linear complexity and, the generation method being uniform, can also be used as a sound sampling back-end for benchmarking tools. As a result, we provide testing and benchmarking frameworks with a sound and fast generation basis. We also provide a testing and benchmarking library, available for download, showing the viability of this experiment.