public static Set getCompleteProductionWithUsefulVariableSet(
			Grammar grammar, Set usefulVariableSet) {
		Set set = getNewProductionWithUsefulVariableSet();
		Production[] productions = grammar.getProductions();
		for (int k = 0; k < productions.length; k++) {
			if (belongsInProductionWithUsefulVariableSet(productions[k],
					usefulVariableSet)) {
				set.add(productions[k]);
			}
		}
		return set;
	}