@Override
  // XXX(Leo_Roos;Nov 18, 2011) leads to many recursive calls, a possible
  // reason why there has to be such a big stack size in order to run
  // Tigerseye
  public Visitable visitList(ATermList arg) throws VisitFailure {
    // save annotations
    ATermList annotations = arg.getAnnotations();

    int childCount = arg.getChildCount();
    for (int i = 0; i < childCount; i++) {
      ATerm currentAterm = arg.elementAt(i);
      ATerm t = (ATerm) currentAterm.accept(this);

      if (t != currentAterm) {
        arg = arg.replace(t, i);
      }
    }

    // restore annotations
    arg = (ATermList) arg.setAnnotations(annotations);

    return arg;
  }