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

Copyright(c) Maciej Bendkowski 2017
LicenseBSD3
Maintainermaciej.bendkowski@tcs.uj.edu.pl
Stabilityexperimental
Safe HaskellSafe
LanguageHaskell2010

Data.Lambda.Random.MixedSystem

Contents

Description

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

Synopsis

System

data MixedSystem a Source #

An expression defining the branching probabilities in the Boltzmann model for unbounded closed lambda terms using a mixture of a system for closed shallow terms and a closure system for plain terms used once the closed system has been exceeded in the sampling procedure.

Constructors

MixedSystem 

boltzmannSystem Source #

Arguments

:: (Floating a, Integral b) 
=> Model b

Size notion.

-> b

Shallowness.

-> a

Formal z parameter.

-> MixedSystem a

The computed Boltzmann system.

Computes the Boltzmann model for closed lambda terms evaluated in the given parameter using closed h-shallow terms as a base approximation.

Boltzmann samplers

data MixedSampler a b Source #

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

Constructors

MixedSampler 

Fields

boltzmannSampler Source #

Arguments

:: (Floating a, Integral b) 
=> Model b

Size notion.

-> b

Shallowness.

-> a

Formal z parameter.

-> MixedSampler a b

The computed Boltzmann sampler.

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

rejectionSampler Source #

Arguments

:: (Floating a, Ord a, Integral b) 
=> Model b

Size notion.

-> b

Shallowness.

-> a

Singularity approximation error.

-> MixedSampler a b

The computed rejection Boltzmann sampler.

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