  We show that the standard computational pipeline of probabilistic programming
systems (PPSs) can be inefficient for estimating expectations and introduce the
concept of expectation programming to address this. In expectation programming,
the aim of the backend inference engine is to directly estimate expected return
values of programs, as opposed to approximating their conditional
distributions. This distinction, while subtle, allows us to achieve substantial
performance improvements over the standard PPS computational pipeline by
tailoring computation to the expectation we care about. We realize a particular
instance of our expectation programming concept, Expectation Programming in
Turing (EPT), by extending the PPS Turing to allow so-called target-aware
inference to be run automatically. We then verify the statistical soundness of
EPT theoretically, and show that it provides substantial empirical gains in
practice.
