https://123dok.net/document/yng9vk4p-probabilistic-inference-and-monadic-second-order-logic.html