Copyright | (c) Maciej Bendkowski 2017 |
---|---|

License | BSD3 |

Maintainer | maciej.bendkowski@tcs.uj.edu.pl |

Stability | experimental |

Safe Haskell | Safe |

Language | Haskell2010 |

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

- data Expr a = Expr {}
- type System a = [Expr a]
- boltzmannSystem :: (Floating a, Integral b) => Model b -> b -> a -> System a
- mixedBoltzmannSystem :: (Floating a, Integral b) => Model b -> b -> a -> System a
- data Sampler a b = Sampler {}
- boltzmannSampler :: (Floating a, Integral b) => Model b -> b -> a -> Sampler a b
- rejectionSampler :: (Floating a, Ord a, Integral b) => Model b -> b -> a -> Sampler a b

# System

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

type System a = [Expr a] Source #

Combinatorial system specification for closed h-shallow lambda terms.

:: (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.

:: (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

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

:: (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.