Principles of constraint programming