Rewrite sum-product algorithm so that it emits messages, and works on bigger graphs, and computes all marginals at once