Automatic compile-time synthesis of entropy-optimal Boltzmann samplers

06/14/2022
by   Maciej Bendkowski, et al.
0

We present a famework for the automatic compilation of multi-parametric Boltzmann samplers for algebraic data types in Haskell. Our framework uses Template Haskell to synthesise efficient, entropy-optimal samplers generating random instances of user-declared algebraic data types. Users can control the outcome distribution through a pure, declarative interface. For instance, users can control the mean size and constructor frequencies of generated objects. We illustrate the effectiveness of our framework through a prototype generic-boltzmann-brain library showing that it is possible to control thousands of different parameters in systems of tens of thousands of ADTs. Our prototype framework synthesises Boltzmann samplers capable of rapidly generating random objects of sizes in the millions.

READ FULL TEXT

Please sign up or login with your details

Forgot password? Click here to reset