mcmc-synthesis-0.1.0.5: MCMC applied to probabilistic program synthesis

Safe HaskellNone

Language.Synthesis.Synthesis

Synopsis

Documentation

type Mutation a = a -> Distr aSource

synthesizeMhList :: RandomGen gen => Problem program -> Rand gen [(program, Double)]Source

Given a prior distribution, score function, mutation distribution, generate a list of (program, score) values through MH sampling.

runningBest :: [(a, Double)] -> [(a, Double)]Source

Given (value, score) pairs, return a running list of the best pair so far.

data Problem program Source

This type specifies which program to synthesize. It comes with a specification, which is a program that already works, some inputs and a distance function.

Constructors

Problem 

Fields

score :: program -> Double
 
prior :: Distr program
 
jump :: Mutation program