Find constraints and sub goals.