code: @Override
      public IQ optimize(IQ query) {
          TreeTransformer treeTransformer = new TreeTransformer(query.getVariableGenerator());
          IQ prev;
          do {
              prev = query;
              query = iqFactory.createIQ(
                      query.getProjectionAtom(),
                      query.getTree().acceptTransformer(treeTransformer)
              );
          } while (!prev.equals(query));
          return query;
      }
docs: TODO: why a fix point?