* @param module
   * @param environment
   * @return PlIterator
   */
  public static PlIterator getDirectConceptInstances(LogicObject concept, Module module, Environment environment) {
    { Module mdl000 = module;
      Context cxt000 = mdl000;

      if (mdl000 == null) {
        mdl000 = ((Module)(Stella.$MODULE$.get()));
        cxt000 = ((Context)(Stella.$CONTEXT$.get()));
      }
      { Object old$Module$000 = Stella.$MODULE$.get();
        Object old$Context$000 = Stella.$CONTEXT$.get();

        try {
          Native.setSpecial(Stella.$MODULE$, mdl000);
          Native.setSpecial(Stella.$CONTEXT$, cxt000);
          environment = environment;
          synchronized (Logic.$POWERLOOM_LOCK$) {
            if ((environment != null) &&
                Stella.stringEqlP(environment.level, "ASSERTION")) {
              return (PLI.listToPlIterator(Logic.assertedCollectionMembers(concept, true).removeDeletedMembers()));
            }
            else {
              return (PLI.retrieve(Cons.list$(Cons.cons(Logic.SYM_LOGIC_ALL, Cons.cons(Logic.SYM_LOGIC_pX, Cons.cons(Cons.list$(Cons.cons(Logic.SYM_STELLA_AND, Cons.cons(Cons.cons(Logic.objectName(concept), Cons.cons(Logic.SYM_LOGIC_pX, Stella.NIL)), Cons.cons(Cons.list$(Cons.cons(Logic.SYM_LOGIC_FAIL, Cons.cons(Cons.list$(Cons.cons(Logic.SYM_STELLA_EXISTS, Cons.cons(Cons.cons(Logic.SYM_LOGIC_pY, Stella.NIL), Cons.cons(Cons.list$(Cons.cons(Logic.SYM_STELLA_AND, Cons.cons(Cons.list$(Cons.cons(PLI.SYM_PLI_PROPER_SUBRELATION, Cons.cons(Logic.objectName(concept), Cons.cons(Cons.cons(Logic.SYM_LOGIC_pY, Stella.NIL), Stella.NIL)))), Cons.cons(Cons.list$(Cons.cons(Logic.SYM_LOGIC_pY, Cons.cons(Logic.SYM_LOGIC_pX, Cons.cons(Stella.NIL, Stella.NIL)))), Cons.cons(Stella.NIL, Stella.NIL))))), Cons.cons(Stella.NIL, Stella.NIL))))), Cons.cons(Stella.NIL, Stella.NIL)))), Cons.cons(Stella.NIL, Stella.NIL))))), Cons.cons(Stella.NIL, Stella.NIL))))), module, environment));
            }
          }

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