* @param relation
   * @param value
   * @param module
   * @param environment
   * @return PlIterator
   */
  public static PlIterator getConceptInstancesMatchingValue(LogicObject concept, LogicObject relation, Stella_Object value, 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$) {
            { PlIterator instances = PLI.getConceptInstances(concept, module, environment);
              Cons answers = Stella.NIL;

              { Stella_Object i = null;
                PlIterator iter000 = instances;

                while (iter000.nextP()) {
                  i = iter000.value;
                  if (PLI.isTrueBinaryProposition(relation, i, value, module, environment)) {
                    answers = Cons.cons(i, answers);
                  }
                }
              }
              return (PLI.consToPlIterator(answers));
            }
          }

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