Another way to look at it would have been to simply join the J-10 programme, instead of the developing the JF-17, and licence manufacture the J-10 in Pakistan. That would have allowed significant cost synergies with China in terms of service, support, and weapons, and streamline the airforce into essentially two 4.5 gen fighter types, the Viper variants and the J-10, with incremental blocks and upgrades, similar to the Viper.
It could be argued that the PAF couldn't operate two 4.5 gen platforms in sufficient numbers to replace the Mirages and F-7P/PGs, but consider the cost so far in developing and manufacturing the JF-17, it wouldn't have been that different in my view. In addition, you wouldn't need a like-for-like replacement of all the J-7s and Mirages, a smaller number of J-10s are more effective in terms of capability than a larger number of lower tech fighters, especially when you include force multipliers into the mix (datalink, AWACS, aerial refuelling, etc).