Specificity rule sorting