exenumversion
Build efficient enumerations for datatypes. Inspired by Feat for Haskell.
The exenum library offers constructors to build enumerations for datatypes, that is, functions from (arbitrarily large) integers to values. Such enumerations are typically used for unit testing. The library is efficient: the nth element of an enumeration is returned without having computed the (n1) previous elements. Complexity is in log(n), except for some pathological datatypes.
Inspired by Feat: Functional Enumeration of Algebraic Types, by Duregard, Jansson, Wang, Chalmers University.
As an example, consider the following datatype: type term = Var of string  App of term * term  Lambda of string * term
Using exenum, one may easily generate zillions of different lambdaterms. In our specific example, term number 2000000000000 happens to be ((((x v) (fun u > y)) ((fun u > y) (fun y > y))) (((x v) (fun u > v)) (fun u > y)))
Efficiency: computing lambdaterm number 1E200 is instantaneous (on an antique Intel Centrino).
Author  D. Le Botlan 

License  GPL3.0only 
Published  
Homepage  http://exenum.forge.ocamlcore.org/ 
Maintainer  lebotlan@users.forge.ocamlcore.org 
Dependencies 

Source [http]  https://download.ocamlcore.org/exenum/exenumsource/0.6/exenumsource0.6.tgz md5=ee90d1dd3c7664a2ee657597bafc064b 
Statistics  Installed 5 times last month. 
Edit  https://github.com/ocaml/opamrepository/tree/master/packages/exenum/exenum.0.6/opam 
 cryptodbm<0.84.2