*/
protected List<TupleExpr> sortExpressions(List<TupleExpr> expressions, Set<String> boundVars) {
List<TupleExpr> orderedExpressions = new ArrayList<TupleExpr>(expressions.size());
while (!expressions.isEmpty()) {
TupleExpr tupleExpr = selectNextTupleExpr(expressions, boundVars);
expressions.remove(tupleExpr);
orderedExpressions.add(tupleExpr);
boundVars.addAll(tupleExpr.getBindingNames());
}
return orderedExpressions;
}