Express generative models as programs and use automatic differentiation and inference engines to fit, test, and compare them.