lambda-sampler-1.1: Boltzmann sampler utilities for lambda calculus.

Data.Lambda.Random.System

Contents

Description

Combinatorial system defining closed h-shallow lambda terms in the de Bruijn notation.

Synopsis

# System

data Expr a Source #

An expression defining the branching probabilities in the Boltzmann model for closed h-shallow lambda terms.

Constructors

 Expr Fieldsabs :: aAbstraction probability.app :: aApplication probability.idx :: [a]Probabilities for de Bruijn indices

Instances

 Show a => Show (Expr a) Source # MethodsshowsPrec :: Int -> Expr a -> ShowS #show :: Expr a -> String #showList :: [Expr a] -> ShowS #

type System a = [Expr a] Source #

Combinatorial system specification for closed h-shallow lambda terms.

Arguments

 :: (Floating a, Integral b) => Model b Size notion. -> b Shallowness. -> a Formal z parameter. -> System a The computed Boltzmann system.

Computes the Boltzmann model for closed h-shallow lambda terms evaluated in the given parameter.

Arguments

 :: (Floating a, Integral b) => Model b Size notion. -> b Shallowness. -> a Formal z parameter. -> System a The computed Boltzmann system.

Computes the mixed Boltzmann model for closed lambda terms evaluated in the given parameter.

# Boltzmann samplers

data Sampler a b Source #

Boltzmann sampler specification consisting of a Boltzmann system with a corresponding size notion model.

Constructors

 Sampler Fieldssystem :: System aBoltzmann system.model :: Model bSize notion.

Arguments

 :: (Floating a, Integral b) => Model b Size notion. -> b Shallowness. -> a Formal z parameter. -> Sampler a b The computed Boltzmann sampler.

Computes the Boltzmann sampler specification for closed h-shallow lambda terms evaluated in the given parameter.

Arguments

 :: (Floating a, Ord a, Integral b) => Model b Size notion. -> b Shallowness. -> a Singularity approximation error. -> Sampler a b The computed rejection Boltzmann sampler.

Computes the rejection Boltzmann sampler for closed h-shallow lambda terms evaluated near the dominating singularity.