SATNet: Bridging deep learning and logical reasoning using a differentiable satisfiability solver