public static void htmlDescribeInstances(String title, String head, NamedDescription relation, org.powerloom.PrintableStringWriter stream, boolean ruleP) {
    { Cons instances = edu.isi.powerloom.PLI.getConceptInstances(relation, null, null).consify();
      Cons assertedinstances = Logic.ASSERTION_INFERENCE.levellizedAllClassInstances(relation.surrogateValueInverse);
      Cons directinstances = edu.isi.powerloom.PLI.getDirectConceptInstances(relation, null, null).consify();
      int nInstances = instances.length();

      OntosaurusUtil.htmlWriteHeaderWithTable(stream, title, head);
      if (instances == Stella.NIL) {
        {
          stream.print("<I>");
          stream.print("None");
          stream.println("</I>");
        }
      }
      else {
        {
          stream.print(nInstances + (((nInstances == 1) ? " instance; " : " instances; ")) + directinstances.length() + " direct (");
          OntosaurusUtil.htmlEmitImage(stream, "icons/small-circ-filled.gif", "x", 11, 11, "BOTTOM", 0);
          stream.println(")");
          {
            stream.print("<DL>");
            instances = instances.sort(Native.find_java_method("edu.isi.powerloom.logic.Logic", "logicFormLessP", new java.lang.Class [] {Native.find_java_class("edu.isi.stella.Stella_Object"), Native.find_java_class("edu.isi.stella.Stella_Object")}));
            { Stella_Object instance = null;
              Cons iter000 = instances;

              for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
                instance = iter000.value;
                {
                  stream.print("<DT>");
                  OntosaurusUtil.htmlEmitImage(stream, (directinstances.memberP(instance) ? "icons/small-circ-filled.gif" : "icons/small-circ-open.gif"), (directinstances.memberP(instance) ? "x" : "o"), 11, 11, "BOTTOM", 0);
                  stream.print("&nbsp;");
                  if (assertedinstances.memberP(instance)) {
                    OntosaurusUtil.pprintObject(instance, stream);
                  }
                  else {
                    {
                      stream.print("<I>");
                      OntosaurusUtil.pprintObject(instance, stream);
                      stream.print("</I>");
                    }
                  }
                  stream.println("</DT>");
                }
              }
            }
            stream.println("</DL>");
          }
        }
      }
      if (ruleP) {
        stream.println("<HR SIZE=2>");
      }
      return;
    }
  }