A Diagnosis Algorithm for Inconsistent Constraint Sets