public static Cons generateStellaCollection(Collection self) {
    { Cons collection = Stella.NIL;

      { Stella_Object m = null;
        Iterator iter000 = ((Iterator)(self.allocateIterator()));
        Cons collect000 = null;

        while (iter000.nextP()) {
          m = iter000.value;
          if (collect000 == null) {
            {
              collect000 = Cons.cons(Logic.generateTerm(m), Stella.NIL);
              if (collection == Stella.NIL) {
                collection = collect000;
              }
              else {
                Cons.addConsToEndOfConsList(collection, collect000);
              }
            }
          }
          else {
            {
              collect000.rest = Cons.cons(Logic.generateTerm(m), Stella.NIL);
              collect000 = collect000.rest;
            }
          }
        }
      }
      return (Cons.cons((self.noDuplicatesP() ? Logic.SYM_STELLA_SETOF : Logic.SYM_LOGIC_LISTOF), collection.concatenate(Stella.NIL, Stella.NIL)));
    }
  }