public static Cons slotColumnTypes(Slot self, int count) {
    if (Surrogate.subtypeOfStorageSlotP(Stella_Object.safePrimaryType(self))) {
      { StorageSlot self000 = ((StorageSlot)(self));

        { Surrogate domain = self000.slotOwner;
          Surrogate range = self000.slotBaseType;
          Cons typeslist = (Logic.booleanTypeP(range) ? Cons.consList(Cons.cons(domain, Stella.NIL)) : Cons.consList(Cons.cons(domain, Cons.cons(range, Stella.NIL))));

          return (typeslist);
        }
      }
    }
    else {
      { List typespecifiers = (Stella_Object.isaP(self, Logic.SGT_STELLA_METHOD_SLOT) ? ((MethodSlot)(self)).methodParameterTypeSpecifiers() : ((Table)(self)).tupleDomains);
        Cons typeslist = Stella.NIL;
        Cons variabletypes = Stella.NIL;
        Cons returntypes = Stella.NIL;
        Surrogate returntype = Logic.unwrapWrappedType(self.slotBaseType);

        if ((returntype != null) &&
            (!Logic.booleanTypeP(returntype))) {
          returntypes = Cons.cons(returntype, returntypes);
        }
        if (self.arity() == Stella.NULL_INTEGER) {
          { StandardObject variableargumentstype = StandardObject.extractParameterType(((ParametricTypeSpecifier)(typespecifiers.last())), Logic.SYM_STELLA_ANY_VALUE, new Object[1]);

            { Stella_Object tspec = null;
              Iterator iter000 = typespecifiers.butLast();
              Cons collect000 = null;

              while (iter000.nextP()) {
                tspec = iter000.value;
                if (collect000 == null) {
                  {
                    collect000 = Cons.cons(Logic.unwrapWrappedType(StandardObject.typeSpecToBaseType(((StandardObject)(tspec)))), Stella.NIL);
                    if (typeslist == Stella.NIL) {
                      typeslist = collect000;
                    }
                    else {
                      Cons.addConsToEndOfConsList(typeslist, collect000);
                    }
                  }
                }
                else {
                  {
                    collect000.rest = Cons.cons(Logic.unwrapWrappedType(StandardObject.typeSpecToBaseType(((StandardObject)(tspec)))), Stella.NIL);
                    collect000 = collect000.rest;
                  }
                }
              }
            }
            if (count == Stella.NULL_INTEGER) {
              count = 1;
            }
            else {
              count = count - (typeslist.length() + returntypes.length());
            }
            { int i = Stella.NULL_INTEGER;
              int iter001 = 1;
              int upperBound000 = count;
              boolean unboundedP000 = upperBound000 == Stella.NULL_INTEGER;

              for (;unboundedP000 ||
                        (iter001 <= upperBound000); iter001 = iter001 + 1) {
                i = iter001;
                i = i;
                variabletypes = Cons.cons(variableargumentstype, variabletypes);
              }
            }
            typeslist = typeslist.concatenate(variabletypes, Stella.NIL);
          }
        }
        else {
          { Stella_Object tspec = null;
            Cons iter002 = typespecifiers.theConsList;
            Cons collect001 = null;

            for (;!(iter002 == Stella.NIL); iter002 = iter002.rest) {
              tspec = iter002.value;
              if (collect001 == null) {
                {
                  collect001 = Cons.cons(Logic.unwrapWrappedType(StandardObject.typeSpecToBaseType(((StandardObject)(tspec)))), Stella.NIL);
                  if (typeslist == Stella.NIL) {
                    typeslist = collect001;
                  }
                  else {
                    Cons.addConsToEndOfConsList(typeslist, collect001);
                  }
                }
              }
              else {
                {
                  collect001.rest = Cons.cons(Logic.unwrapWrappedType(StandardObject.typeSpecToBaseType(((StandardObject)(tspec)))), Stella.NIL);
                  collect001 = collect001.rest;
                }
              }
            }
          }
        }
        typeslist = typeslist.concatenate(returntypes, Stella.NIL);
        return (typeslist);
      }
    }
  }