Generate constraints