We now approximate the set of strings derivable from A by G~, which is the set of strings consisting of terminals from GA. Our implementation is made slightly more sophisticated by taking ~A to be {X ] 3B, c~,fl[B E Ni A B ~ oLXfl A X ~ Ni]}, for each A such that A E Ni and recursive(Ni) = self, for some i.
each X E ~A is a terminal, or a nonterminal not in the same set Ni as A, but immediately reachable from set Ni, through B E Ni.