constraint generation