private static Grammar getGrammarWithNoVariablesThatCantDeriveStrings(
			Set usefulProductionSet) {
		Grammar g = new ContextFreeGrammar();
		Iterator it = usefulProductionSet.iterator();
		while (it.hasNext()) {
			Production p = (Production) it.next();
			g.addProduction(p);
		}
		return g;
	}