replaceValues(tupleExpr);
TripleSource tripleSource = new NativeTripleSource(nativeStore, includeInferred, transactionActive());
EvaluationStrategyImpl strategy = new EvaluationStrategyImpl(tripleSource, dataset);
QueryOptimizerList optimizerList = new QueryOptimizerList();
optimizerList.add(new BindingAssigner());
optimizerList.add(new ConstantOptimizer(strategy));
optimizerList.add(new CompareOptimizer());
optimizerList.add(new ConjunctiveConstraintSplitter());
optimizerList.add(new SameTermFilterOptimizer());
optimizerList.add(new QueryModelPruner());
optimizerList.add(new QueryJoinOptimizer());
optimizerList.add(new FilterOptimizer());
optimizerList.optimize(tupleExpr, dataset, bindings);
CloseableIteration<BindingSet, QueryEvaluationException> iter;
iter = strategy.evaluate(tupleExpr, bindings);
return new LockingIteration<BindingSet, QueryEvaluationException>(readLock, iter);
}