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

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

Data.Lambda.Model

Contents

Description

Size notion framework of Gittenberger and Gołębiewski for lambda terms in the de Bruijn notation. A size definition constitutes the weights for lambda abstraction, term application, successor and zero.

Synopsis

Size notions

data Model a Source #

Lambda term size model.

Constructors

Model 

Fields

  • zeroW :: a

    Size of zero

  • succW :: a

    Size of successor

  • absW :: a

    Size of the abstraction

  • appW :: a

    Size of the application

natural :: Integral a => Model a Source #

The natural size notion.

binary :: Integral a => Model a Source #

The binary size notion.

valid Source #

Arguments

:: Integral a 
=> Model a

Size notion

-> Bool

Whether the size model is valid.

Checks whether the given size model is valid in the framework of Gittenberger and Gołębiewski.

Helpers

weights :: Model a -> (a, a, a, a) Source #

Given a size notion, returns a tuple (a,b,c,d) where a denotes the size of the de Bruijn zero, b denotes the size of the de Bruijn successor, c denotes the size of the lambda abstraction and finally d denotes the size of the application.