SAT solving with backtracking