A method for solving a constraint satisfaction problem includes receiving
a set of variables having respective input domains and a set of relations
among the variables, and building a network of one or more hyper-arcs
representative of the set of relations, each hyper-arc corresponding to
one of the relations and linking nodes in the network corresponding to
the variables that are subject to the relation. For each of the
hyper-arcs, the variables are assembled in a hierarchy based on the
relation corresponding to the hyper-arc. The input domains of the
variables in the hierarchy are reduced, so as to determine respective
output domains of the variables that are consistent with the relations.