public static InferenceLevel leveledQueryRelationToInferenceLevel(Surrogate relation) {
    if (relation == Logic.SGT_PL_KERNEL_KB_ASSERTION_QUERY) {
      return (Logic.ASSERTION_INFERENCE);
    }
    else if (relation == Logic.SGT_PL_KERNEL_KB_SHALLOW_QUERY) {
      return (Logic.SHALLOW_INFERENCE);
    }
    else if (relation == Logic.SGT_PL_KERNEL_KB_SUBSUMPTION_QUERY) {
      return (Logic.SUBSUMPTION_INFERENCE);
    }
    else if (relation == Logic.SGT_PL_KERNEL_KB_BACKTRACKING_QUERY) {
      return (Logic.BACKTRACKING_INFERENCE);
    }
    else if (relation == Logic.SGT_PL_KERNEL_KB_NORMAL_QUERY) {
      return (Logic.NORMAL_INFERENCE);
    }
    else if (relation == Logic.SGT_PL_KERNEL_KB_REFUTATION_QUERY) {
      return (Logic.REFUTATION_INFERENCE);
    }
    else {
      return (Logic.getInferenceLevel(((StringWrapper)(Stella.splitString(relation.symbolName, '-').value)).keywordify()));
    }
  }