public static java.lang.reflect.Method lookupSpecialist(NamedDescription description) {
    { Stella_Object specialistprocedure = Logic.accessBinaryValue(description, Logic.SGT_PL_KERNEL_KB_RELATION_SPECIALIST);
      java.lang.reflect.Method functioncode = null;

      if (specialistprocedure != null) {
        if (((Boolean)(Logic.$REVERSEPOLARITYp$.get())).booleanValue() &&
            (!Logic.testPropertyP(specialistprocedure, Logic.SGT_PL_KERNEL_KB_HANDLES_REVERSE_POLARITY))) {
          return (null);
        }
        else {
          functioncode = ComputedProcedure.functionCodeFromProcedure(((ComputedProcedure)(specialistprocedure)));
        }
      }
      if (functioncode == null) {
        if ((description.nativeRelation() != null) &&
            (!NamedDescription.classDescriptionP(description))) {
          functioncode = Native.find_java_method("edu.isi.powerloom.logic.ControlFrame", "nativeSlotReaderSpecialist", new java.lang.Class [] {Native.find_java_class("edu.isi.powerloom.logic.ControlFrame"), Native.find_java_class("edu.isi.stella.Keyword")});
        }
      }
      return (functioncode);
    }
  }