Reachability predicates for graph assertions