Foundations of programming. Handbook of constraint programming.