Text this: Static posterior inference of Bayesian probabilistic programming via polynomial solving