Faster solving, counting and sampling