Haskell TeX Vim script Perl Makefile Python
Clone or download


Hackage Build Status Windows Build Status licence


Hakaru is a simply-typed probabilistic programming language, designed for easy specification of probabilistic models and inference algorithms. Hakaru enables the design of modular probabilistic inference programs by providing:

  • A language for representing probabilistic distributions, queries, and inferences
  • Methods for transforming probabilistic information, such as conditional probability and probabilistic inference, using computer algebra

It can be used to aid in the creation of machine-learning applications and stochastic modeling to help answer variable queries and distributions.

Warning: This code is alpha and experimental.

For Hakaru documentation, including an installation guide and some sample programs, visit hakaru-dev.github.io.

Contact us at ppaml@indiana.edu if you have any questions or concerns.

Citing us

When referring to Hakaru, please cite the following academic paper:

P. Narayanan, J. Carette, W. Romano, C. Shan and R. Zinkov, "Probabilistic Inference by Program Transformation in Hakaru (System Description)", Functional and Logic Programming, pp. 62-79, 2016.

	title = {Probabilistic inference by program transformation in Hakaru (system description)},
	author = {Narayanan, Praveen and Carette, Jacques and Romano, Wren and Shan, Chung{-}chieh and Zinkov, Robert},
	booktitle = {International Symposium on Functional and Logic Programming - 13th International Symposium, {FLOPS} 2016, Kochi, Japan, March 4-6, 2016, Proceedings},
	pages = {62--79},
	year = {2016},
	organization = {Springer},
	url = {http://dx.doi.org/10.1007/978-3-319-29604-3_5},
	doi = {10.1007/978-3-319-29604-3_5},