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

Data.Lambda.Random.PlainSystem

Description

Combinatorial specification defining plain lambda terms in the de Bruijn notation.

Synopsis

# System

data PlainSystem a Source #

An expression defining the branching probabilities in the Boltzmann model for plain lambda terms.

Constructors

 PlainSystem Fieldsabs :: aAbstraction probability.app :: aApplication probability.zero :: aZero constructor probability.

Instances

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

Arguments

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

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

# Boltzmann samplers

data PlainSampler a b Source #

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

Constructors

 PlainSampler Fieldssystem :: PlainSystem aBoltzmann system.model :: Model bSize notion.

Arguments

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

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

Arguments

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

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

# Evaluation

eval :: (Floating a, Integral b) => Model b -> a -> a Source #

Evaluates the generating function for plain lambda terms assuming the given size model and parameter value.