Principles of Constraint Programming