Interactive Writing and Debugging of Bayesian Probabilistic Programs
We present an implementation of BLOG that facilitates fluid exploration of probabilistic programs. We introduce a new keyword inspect that allows the evaluation of an arbitrary expression in a given trace from the full posterior. Using this additional keyword, we show an implementation of an interactive debugger for probabilistic programs. This debugger recursively inspects the generative model to mimic the behavior of a classic interactive debugger: step into functions, inspect local variables, and add breakpoints.
Finally, we create a new debugging construct for probabilistic programs—lateral movement— that allows the user to move between samples of the full posterior distribution.