"OPTIMIZATION CHOICE", "selectByPosition");
"OPTIMIZATION CHOICE", "Positional evaluation");
	public Sequence evalPredicate(Sequence outerSequence, Sequence contextSequence,	int mode)		    throws XPathException {        if (context.getProfiler().isEnabled()) {            context.getProfiler().start(this);            context.getProfiler().message(this, Profiler.DEPENDENCIES, "DEPENDENCIES", Dependency.getDependenciesName(this.getDependencies()));            if (contextSequence != null)                context.getProfiler().message(this, Profiler.START_SEQUENCES, "CONTEXT SEQUENCE", contextSequence);        }                            Sequence result;		Expression inner = getExpression(0);		if (inner == null)			result = Sequence.EMPTY_SEQUENCE;        else {            int recomputedExecutionMode = executionMode;                         //Try to promote a boolean evaluation to a positionnal one              if (executionMode == BOOLEAN && Type.subTypeOf(inner.returnsType(), Type.NUMBER)) {                Sequence innerSeq = inner.eval(contextSequence);                   //Only if we have an actual *singleton* of numeric items                if (innerSeq.hasOne()) {                    //TODO : find a workaround for the polysemy of "." which is expanded as self::node() even when it is not relevant                    // (1,2,3)[xs:float(.)]                	//Something like :                    //if (!(inner instanceof LocationStep && ((LocationStep)inner).axis == Constants.SELF_AXIS))                    	recomputedExecutionMode = POSITIONAL;                }            }                          if (executionMode == NODE && Type.subTypeOf(contextSequence.getItemType(), Type.ATOMIC)                    && !(contextSequence instanceof VirtualNodeSet)) {                recomputedExecutionMode = BOOLEAN;            }                		switch(recomputedExecutionMode) {    			case NODE:                     if (context.getProfiler().isEnabled())                        context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS,                                 "OPTIMIZATION CHOICE", "selectByNodeSet");                                        result = selectByNodeSet(contextSequence);                                        break;                case BOOLEAN:                     if (context.getProfiler().isEnabled())                        context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS,                                 "OPTIMIZATION CHOICE", "evalBoolean");                                        result = evalBoolean(contextSequence, inner);                    break;    			case POSITIONAL:                     if (context.getProfiler().isEnabled())                        context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS,                                 "OPTIMIZATION CHOICE", "selectByPosition");                                        result = selectByPosition(outerSequence, contextSequence, mode, inner);                    break;    			default:                    throw new IllegalArgumentException("Unsupported execution mode: '" + recomputedExecutionMode + "'");			        		}                    }                if (context.getProfiler().isEnabled())             context.getProfiler().end(this, "", result);                return result;	}