Constraint solver.