protected BitSet evalSemanticContext(DFAState.PredPrediction[] predPredictions,
									  ParserRuleContext outerContext,
									  boolean complete)
	{
		BitSet predictions = new BitSet();
		for (DFAState.PredPrediction pair : predPredictions) {
			if ( pair.pred==SemanticContext.Empty.Instance ) {
				predictions.set(pair.alt);
				if (!complete) {
					break;
				}
				continue;
			}

			boolean fullCtx = false; // in dfa
			boolean predicateEvaluationResult = evalSemanticContext(pair.pred, outerContext, pair.alt, fullCtx);
			if ( debug || dfa_debug ) {
				System.out.println("eval pred "+pair+"="+predicateEvaluationResult);
			}

			if ( predicateEvaluationResult ) {
				if ( debug || dfa_debug ) System.out.println("PREDICT "+pair.alt);
				predictions.set(pair.alt);
				if (!complete) {
					break;
				}
			}
		}

		return predictions;
	}
Look through a list of predicate/alt pairs, returning alts for the
 pairs that win. A {@code NONE} predicate indicates an alt containing an
 unpredicated config which behaves as "always true." If !complete
 then we stop at the first predicate that evaluates to true. This
 includes pairs with null predicates.
runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java