Program solutions for Constraint Satisfaction Problems