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

Safe HaskellNone

Language.Synthesis.Synthesis

Synopsis

Documentation

class Score a whereSource

A score is anything that can be mapped to a double.

Methods

toScore :: a -> DoubleSource

Instances

type Mutation a = a -> Distr aSource

synthesizeMhList :: (Score s, RandomGen gen) => Problem p s -> Rand gen [(p, s)]Source

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

runningBest :: Ord s => [(a, s)] -> [(a, s)]Source

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

data Problem p s 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 :: p -> s
 
prior :: Distr p
 
jump :: Mutation p