1. A method for modeling a target system, comprising: defining a constraint satisfaction problem (CSP) that characterizes the target system in terms of a set of variables, each having a respective input domain, and initial constraints applicable to the variables; partitioning the variables into at least first and second sets; finding an abstract solution to the constraint satisfaction problem comprising a given assignment of the variables in the first set; computing a reduced domain of at least one of the variables in the second set that is compatible with the abstract solution; determining a redundant constraint on the abstract solution responsively to the reduced domain; and finding a concrete solution to the constraint satisfaction problem, using the abstract solution and the redundant constraint.