Utilities for SAT encoding and solving