Constraint propagation is your friend Ian Horswill and Leif Foged Northwestern University.
Constraint programming