Memory-efficient open-universe probabilistic programming in modern C++. Deep dive here. Program synthesis here.

- Record-based (i.e., making trace-based approach explicit instead of implicit)
- Sample-based, with posterior queries by default computed online rather than after sampling is complete – defaulting to constant memory complexity
- Explicit PRNG state (reproducibility)
- Algebraic sum types everywhere instead of boxing
- Header-only

This should look familiar.

```
template<size_t N>
std::tuple<double, double>
record_t<DTypes<Normal, Gamma>>& r, std::shared_ptr<data_1d<N>> data) {
linear_regression(auto intercept = sample(r, "intercept", Normal(), rng);
auto slope = sample(r, "slope", Normal(), rng);
auto scale = sample(r, "scale", Gamma(), rng);
for (size_t ix = 0; ix != N; ix++) {
observe(
r,"obs/" + std::to_string(ix),
Normal(data->x[ix] * slope + intercept, scale),
data->y[ix]
);
}return std::make_tuple(intercept, slope);
}
```

- Documentation
- Tests
- Source (will attempt a download of a zip file to your machine) or on Gitlab

The `lppl`

webpage and its subpages are licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.