Tyep refinement checking