module Prob_lang:An extremely small probabilistic language.sig
..end
It was inspired by
D. Koller, D. McAllester, and A. Pfeffer, "Effective Bayesian inference for stochastic programs," Proceedings of the Fourteenth National Conference on Artificial Intelligence, AAAI Press, Menlo Park, Calif., 1997, pp. 740--747. http://citeseer.ist.psu.edu/koller97effective.html
and
A. Pfeffer. IBAL: A probabilistic rational programming language. In B. Nebel, editor, Proceedings of the Seventeenth International Joint Conference on Artificial Intelligence (IJCAI-01), pages 733--740. Morgan Kaufmann Publishers, Inc., 2001. http://citeseer.ist.psu.edu/pfeffer01ibal.html
However, it's smaller (probably over-simplified), and for now,
the only base type is integers.
typevarname =
string Pervasives.ref
exception Prob_error of string
type
term =
| |
Var of |
| |
Lam of |
| |
App of |
| |
Const of |
| |
Case of |
| |
Flip of |
val subst : varname -> term -> term -> term
val term_to_string : term -> string
typedist =
(term * float) list
val weight_dist : float -> ('a * float) list -> ('a * float) list
val contains_var : varname -> term -> bool
val simplify_dist : ('a * float) list -> ('a * float) list
val dist : term -> (term * float) list
val dist_apply : term -> term -> (term * float) list