Programming with Constraints by Kim Marriott & Peter J. Stuckey