Typechecking of predicate applications