* @return Cons
   */
  public static Cons listUnclassifiedRelations(Cons options) {
    if (!((Boolean)(Logic.$CLASSIFY_FROM_NON_INFERABLE_PARENTS_ONLYp$.get())).booleanValue()) {
      return (Stella.NIL);
    }
    Logic.finalizeObjects();
    { Cons optionslist = options;
      PropertyList theoptions = Stella_Object.parseOptions((Stella_Object.keywordP(optionslist.value) ? optionslist : Cons.consList(Cons.cons(Logic.KWD_MODULE, Cons.cons(optionslist.value, Cons.cons(Logic.KWD_LOCALp, Cons.cons(optionslist.rest.value, Stella.NIL)))))), Cons.list$(Cons.cons(Logic.KWD_MODULE, Cons.cons(Logic.SGT_STELLA_MODULE, Cons.cons(Logic.KWD_LOCALp, Cons.cons(Logic.SGT_STELLA_BOOLEAN, Cons.cons(Stella.NIL, Stella.NIL)))))), true, false);
      Module themodule = ((Module)(theoptions.lookupWithDefault(Logic.KWD_MODULE, null)));
      boolean localP = BooleanWrapper.coerceWrappedBooleanToBoolean(((BooleanWrapper)(theoptions.lookupWithDefault(Logic.KWD_LOCALp, Stella.FALSE_WRAPPER))));
      Cons unclassified = Stella.NIL;

      if ((themodule == null) &&
          (!optionslist.memberP(Logic.KWD_MODULE))) {
        themodule = ((Module)(Stella.$MODULE$.get()));
      }
      { Object old$Classificationsession$000 = Logic.$CLASSIFICATIONSESSION$.get();
        Object old$Context$000 = Stella.$CONTEXT$.get();

        try {
          Native.setSpecial(Logic.$CLASSIFICATIONSESSION$, Logic.getClassificationSession(Logic.KWD_DESCRIPTION));
          Native.setSpecial(Stella.$CONTEXT$, ((ClassificationSession)(Logic.$CLASSIFICATIONSESSION$.get())).classificationWorld);
          { Object old$Module$000 = Stella.$MODULE$.get();
            Object old$Context$001 = Stella.$CONTEXT$.get();

            try {
              Native.setSpecial(Stella.$MODULE$, ((themodule == null) ? ((Module)(Stella.$MODULE$.get())) : themodule));
              Native.setSpecial(Stella.$CONTEXT$, ((Module)(Stella.$MODULE$.get())));
              { NamedDescription d = null;
                Iterator iter000 = Logic.allNamedDescriptions(themodule, localP);
                Cons collect000 = null;

                while (iter000.nextP()) {
                  d = ((NamedDescription)(iter000.value));
                  { boolean testValue000 = false;

                    testValue000 = Description.inferableP(d);
                    if (testValue000) {
                      { boolean foundP000 = false;

                        { LogicObject renamed_Super = null;
                          Iterator iter001 = Logic.allAncestorCollections(d, Logic.KWD_DESCRIPTION);

                          loop001 : while (iter001.nextP()) {
                            renamed_Super = ((LogicObject)(iter001.value));
                            if (Description.nonInferableP(((Description)(renamed_Super)))) {
                              foundP000 = true;
                              break loop001;
                            }
                          }
                        }
                        testValue000 = foundP000;
                      }
                      testValue000 = !testValue000;
                    }
                    if (testValue000) {
                      if (collect000 == null) {
                        {
                          collect000 = Cons.cons(d, Stella.NIL);
                          if (unclassified == Stella.NIL) {
                            unclassified = collect000;
                          }
                          else {
                            Cons.addConsToEndOfConsList(unclassified, collect000);
                          }
                        }
                      }
                      else {
                        {
                          collect000.rest = Cons.cons(d, Stella.NIL);
                          collect000 = collect000.rest;
                        }
                      }
                    }
                  }
                }
              }

            } finally {
              Stella.$CONTEXT$.set(old$Context$001);
              Stella.$MODULE$.set(old$Module$000);
            }
          }

        } finally {
          Stella.$CONTEXT$.set(old$Context$000);
          Logic.$CLASSIFICATIONSESSION$.set(old$Classificationsession$000);
        }
      }
      return (unclassified);
    }
  }