public static Iterator allDirectSubcollections(LogicObject self, boolean performfilteringP) {
    if (Stella_Object.isaP(self, Logic.SGT_LOGIC_DESCRIPTION)) {
      Description.deriveDeferredSatelliteRules(((Description)(self)));
    }
    { Iterator directlylinkedobjects = Logic.allDirectlyLinkedObjects(self, Logic.SGT_PL_KERNEL_KB_SUBSET_OF, !((Boolean)(Logic.$REVERSEPOLARITYp$.get())).booleanValue());

      if (!performfilteringP) {
        return (directlylinkedobjects);
      }
      { Cons directsubs = Stella.NIL;
        Cons equivalents = LogicObject.allEquivalentCollections(self, true);

        if (!(equivalents.rest == Stella.NIL)) {
          { LogicObject e = null;
            Cons iter000 = equivalents;

            for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
              e = ((LogicObject)(iter000.value));
              { LogicObject child = null;
                Iterator iter001 = LogicObject.allDirectSubcollections(e, false);

                while (iter001.nextP()) {
                  child = ((LogicObject)(iter001.value));
                  if ((!equivalents.memberP(child)) &&
                      (!directsubs.memberP(child))) {
                    directsubs = Cons.cons(child, directsubs);
                  }
                }
              }
            }
          }
        }
        else {
          directsubs = ((Cons)(directlylinkedobjects.consify()));
        }
        return (Logic.mostGeneralCollections(directsubs).allocateIterator());
      }
    }
  }