1. A method for solving a constraint satisfaction problem (CSP) defined by a set of variables and constraints, wherein the constraints define limitations for values that can be assigned to each variable in a given domain to solve the CSP, the method comprising: identifying a first illegal combination associated with at least one variable, wherein the first illegal combination contradicts at least one constraint, grouping the first illegal combination with a second illegal combination, in response to determining that the first and second illegal combinations contradict the same constraint; identifying at least one failure explanation for each group of illegal combinations, wherein the failure explanation is associated with at least one illegal combination in said group to provide a reason for a contradicted constraint associated with the illegal combination: assigning a value to each variable in the given domain to solve the CSP within the limitations defined by the constraints in a solution path; generating a first result, in response to determining that the assigned value to each variable satisfies the constraints; and generating a second result, in response to determining that at least one assigned value to a variable contradicts a constraint.