/** * Evaluate exists and forAll expressions. The array <code>moreElemVars</code> may be null if * there is at most one element variable declared. */ protected final Value evalExistsOrForAll(EvalContext ctx, boolean doExists) { // evaluate range Value v = fRangeExp.eval(ctx); if (v.isUndefined()) return UndefinedValue.instance; CollectionValue rangeVal = (CollectionValue) v; // we need recursion for the permutation of assignments of // range values to all element variables. boolean res = evalExistsOrForAll0(0, rangeVal, ctx, doExists); return BooleanValue.get(res); }