Forward reasoning and dependency-directed backtracking in a system for computer-aided circuit analysis