XQExpression normed = normalize();
XQExpression analyzed = normed.staticAnalysis(statEnv);
// join detection
if(!ENV_NO_JOIN) {
JoinDetector detector = new JoinDetector();
analyzed.visit(detector, null);
}
// loop-invariants code motion
if(ENV_ENABLE_LOOPOPTIM) {//TODO
if(forClause != null) {