protected Pair<ATNConfigSet,ATNConfigSet> splitAccordingToSemanticValidity(
		ATNConfigSet configs,
		ParserRuleContext outerContext)
	{
		ATNConfigSet succeeded = new ATNConfigSet(configs.fullCtx);
		ATNConfigSet failed = new ATNConfigSet(configs.fullCtx);
		for (ATNConfig c : configs) {
			if ( c.semanticContext!=SemanticContext.Empty.Instance ) {
				boolean predicateEvaluationResult = evalSemanticContext(c.semanticContext, outerContext, c.alt, configs.fullCtx);
				if ( predicateEvaluationResult ) {
					succeeded.add(c);
				}
				else {
					failed.add(c);
				}
			}
			else {
				succeeded.add(c);
			}
		}
		return new Pair<ATNConfigSet, ATNConfigSet>(succeeded,failed);
	}
Walk the list of configurations and split them according to
 those that have preds evaluating to true/false.  If no pred, assume
 true pred and include in succeeded set.  Returns Pair of sets.

 Create a new set so as not to alter the incoming parameter.

 Assumption: the input stream has been restored to the starting point
 prediction, which is where predicates need to evaluate.
runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java