public static List assertedCollectionMembers(Stella_Object self, boolean directP) {
    { Surrogate testValue000 = Stella_Object.safePrimaryType(self);

      if (Surrogate.subtypeOfP(testValue000, Logic.SGT_STELLA_COLLECTION)) {
        { Collection self000 = ((Collection)(self));

          { List members = List.newList();

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

              while (iter000.nextP()) {
                m = iter000.value;
                if (collect000 == null) {
                  {
                    collect000 = Cons.cons(m, Stella.NIL);
                    if (members.theConsList == Stella.NIL) {
                      members.theConsList = collect000;
                    }
                    else {
                      Cons.addConsToEndOfConsList(members.theConsList, collect000);
                    }
                  }
                }
                else {
                  {
                    collect000.rest = Cons.cons(m, Stella.NIL);
                    collect000 = collect000.rest;
                  }
                }
              }
            }
            return (members);
          }
        }
      }
      else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_NAMED_DESCRIPTION)) {
        { NamedDescription self000 = ((NamedDescription)(self));

          { List members = List.list(Stella.NIL);

            { Proposition prop = null;
              DescriptionExtensionIterator iter001 = NamedDescription.allTrueExtensionMembers(self000, !directP);
              Cons collect001 = null;

              while (iter001.nextP()) {
                prop = ((Proposition)(iter001.value));
                if (collect001 == null) {
                  {
                    collect001 = Cons.cons((prop.arguments.theArray)[0], Stella.NIL);
                    if (members.theConsList == Stella.NIL) {
                      members.theConsList = collect001;
                    }
                    else {
                      Cons.addConsToEndOfConsList(members.theConsList, collect001);
                    }
                  }
                }
                else {
                  {
                    collect001.rest = Cons.cons((prop.arguments.theArray)[0], Stella.NIL);
                    collect001 = collect001.rest;
                  }
                }
              }
            }
            return (members);
          }
        }
      }
      else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_DESCRIPTION)) {
        { Description self000 = ((Description)(self));

          return (null);
        }
      }
      else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_SKOLEM)) {
        { Skolem self000 = ((Skolem)(self));

          { List members = List.newList();
            Cons enumeratedcollections = Logic.allDefiningPropositions(self000, Logic.SGT_PL_KERNEL_KB_COLLECTIONOF, true);

            if (!(enumeratedcollections == Stella.NIL)) {
              { Proposition col = null;
                Cons iter002 = enumeratedcollections;

                for (;!(iter002 == Stella.NIL); iter002 = iter002.rest) {
                  col = ((Proposition)(iter002.value));
                  { Stella_Object arg = null;
                    Vector vector000 = col.arguments;
                    int index000 = 0;
                    int length000 = vector000.length();
                    int i = Stella.NULL_INTEGER;
                    int iter003 = 2;
                    int upperBound000 = col.arguments.length();
                    Cons collect002 = null;

                    for (;(index000 < length000) &&
                              (iter003 <= upperBound000); index000 = index000 + 1, iter003 = iter003 + 1) {
                      arg = (vector000.theArray)[index000];
                      i = iter003;
                      if (collect002 == null) {
                        {
                          collect002 = Cons.cons(Logic.valueOf(arg), Stella.NIL);
                          if (members.theConsList == Stella.NIL) {
                            members.theConsList = collect002;
                          }
                          else {
                            Cons.addConsToEndOfConsList(members.theConsList, collect002);
                          }
                        }
                      }
                      else {
                        {
                          collect002.rest = Cons.cons(Logic.valueOf(arg), Stella.NIL);
                          collect002 = collect002.rest;
                        }
                      }
                    }
                  }
                }
              }
            }
            else {
              { Proposition p = null;
                Iterator iter004 = Logic.allTrueDependentPropositions(self000, Logic.SGT_PL_KERNEL_KB_MEMBER_OF, false);
                Cons collect003 = null;

                while (iter004.nextP()) {
                  p = ((Proposition)(iter004.value));
                  if ((directP &&
                      Stella_Object.eqlP(Logic.valueOf((p.arguments.theArray)[1]), Logic.valueOf(self000))) ||
                      ((!directP) &&
                       LogicObject.collectionImpliesCollectionP(((LogicObject)(Logic.valueOf((p.arguments.theArray)[1]))), ((LogicObject)(Logic.valueOf(self000)))))) {
                    if (collect003 == null) {
                      {
                        collect003 = Cons.cons((p.arguments.theArray)[0], Stella.NIL);
                        if (members.theConsList == Stella.NIL) {
                          members.theConsList = collect003;
                        }
                        else {
                          Cons.addConsToEndOfConsList(members.theConsList, collect003);
                        }
                      }
                    }
                    else {
                      {
                        collect003.rest = Cons.cons((p.arguments.theArray)[0], Stella.NIL);
                        collect003 = collect003.rest;
                      }
                    }
                  }
                }
              }
            }
            return (members);
          }
        }
      }
      else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_LOGIC_OBJECT)) {
        { LogicObject self000 = ((LogicObject)(self));

          { Skolem equivalentskolem = ((Skolem)(((LogicObject)(self000.variableValueInverse().value))));

            if (equivalentskolem != null) {
              return (Logic.assertedCollectionMembers(equivalentskolem, directP));
            }
          }
          {
            Stella.STANDARD_WARNING.nativeStream.println("Warning: Hmm. PowerLoom doesn't know how to interpret the LOGIC-OBJECT: `" + self000 + "'");
            Stella.STANDARD_WARNING.nativeStream.println("   as a collection.");
            Stella.STANDARD_WARNING.nativeStream.println();
          }
;
          return (Stella.NIL_LIST);
        }
      }
      else {
        return (null);
      }
    }
  }