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.Oracle

Contents

Description

Boltzmann oracles finding numerical approximations of the generating function singularities, dictating the asymptotic growth rate of (closed h-shallow) lambda terms.

The approximations are guaranteed to converge to the singularities quadratically as the Newton-Raphson root finding algorithm is used.

Synopsis

Plain lambda terms

domSing Source #

Arguments

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

Size notion.

-> a

Approximation error.

-> a

Dominating singularity.

Finds the dominating singularity of the plain lambda term ordinary generating function.

roots Source #

Arguments

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

Size notion.

-> a

Initial guess.

-> [a]

Infinite approximation sequence.

Successive root approximations of the plain lambda terms dominating singularity.

Closed h-shallow lambda terms

domSingH Source #

Arguments

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

Size notion.

-> b

Shallowness.

-> a

Approximation error.

-> a

Dominating singularity.

Finds the dominating singularity of the closed h-shallow lambda term ordinary generating function.

rootsH Source #

Arguments

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

Size notion.

-> b

Shallowness.

-> a

Initial guess.

-> [a]

Infinite approximation sequence.

Successive root approximations of the closed h-shallow lambda terms dominating singularity.