public static Cons getQueryPatternEvaluators(Surrogate relationref) {
    { Cons evaluatorforms = Stella.NIL;

      { MemoizationTable memoTable000 = null;
        Cons memoizedEntry000 = null;
        Stella_Object memoizedValue000 = null;

        if (Stella.$MEMOIZATION_ENABLEDp$) {
          memoTable000 = ((MemoizationTable)(RDBMS.SGT_RDBMS_F_GET_QUERY_PATTERN_EVALUATORS_MEMO_TABLE_000.surrogateValue));
          if (memoTable000 == null) {
            Surrogate.initializeMemoizationTable(RDBMS.SGT_RDBMS_F_GET_QUERY_PATTERN_EVALUATORS_MEMO_TABLE_000, "(:MAX-VALUES 100 :TIMESTAMPS (:META-KB-UPDATE))");
            memoTable000 = ((MemoizationTable)(RDBMS.SGT_RDBMS_F_GET_QUERY_PATTERN_EVALUATORS_MEMO_TABLE_000.surrogateValue));
          }
          memoizedEntry000 = MruMemoizationTable.lookupMruMemoizedValue(((MruMemoizationTable)(memoTable000)), relationref, ((Context)(Stella.$CONTEXT$.get())), Stella.MEMOIZED_NULL_VALUE, null, -1);
          memoizedValue000 = memoizedEntry000.value;
        }
        if (memoizedValue000 != null) {
          if (memoizedValue000 == Stella.MEMOIZED_NULL_VALUE) {
            memoizedValue000 = null;
          }
        }
        else {
          memoizedValue000 = Logic.applyCachedRetrieve(Cons.list$(Cons.cons(RDBMS.SYM_RDBMS_pREL, Cons.cons(RDBMS.SYM_RDBMS_pEV, Cons.cons(RDBMS.SYM_RDBMS_pDB, Cons.cons(RDBMS.SYM_RDBMS_pARGS, Cons.cons(Stella.NIL, Stella.NIL)))))), Cons.list$(Cons.cons(RDBMS.SYM_STELLA_AND, Cons.cons(Cons.list$(Cons.cons(RDBMS.SYM_RDBMS_QUERY_PATTERN, Cons.cons(RDBMS.SYM_RDBMS_pREL, Cons.cons(RDBMS.SYM_RDBMS_pEV, Cons.cons(RDBMS.SYM_RDBMS_pDB, Cons.cons(RDBMS.SYM_RDBMS_pARGS, Cons.cons(Stella.NIL, Stella.NIL))))))), Cons.cons(Cons.list$(Cons.cons(RDBMS.SYM_STELLA_EXISTS, Cons.cons(Cons.cons(RDBMS.SYM_RDBMS_pDB_TYPE, Stella.NIL), Cons.cons(Cons.list$(Cons.cons(RDBMS.SYM_RDBMS_SUPPORTS_DB_TYPE, Cons.cons(RDBMS.SYM_RDBMS_pEV, Cons.cons(RDBMS.SYM_RDBMS_pDB_TYPE, Cons.cons(Stella.NIL, Stella.NIL))))), Cons.cons(Cons.list$(Cons.cons(RDBMS.SYM_RDBMS_INSTANCE_OF, Cons.cons(RDBMS.SYM_RDBMS_pDB, Cons.cons(RDBMS.SYM_RDBMS_pDB_TYPE, Cons.cons(Stella.NIL, Stella.NIL))))), Cons.cons(Stella.NIL, Stella.NIL)))))), Cons.cons(Stella.NIL, Stella.NIL))))), Cons.consList(Cons.cons(relationref, Cons.cons(null, Cons.cons(null, Cons.cons(null, Stella.NIL))))), Cons.consList(Cons.cons(RDBMS.KWD_DONT_OPTIMIZEp, Cons.cons(Stella.TRUE_WRAPPER, Cons.cons(RDBMS.KWD_HOW_MANY, Cons.cons(RDBMS.KWD_ALL, Cons.cons(RDBMS.KWD_INFERENCE_LEVEL, Cons.cons(RDBMS.KWD_ASSERTION, Stella.NIL))))))), RDBMS.SYM_RDBMS_F_GET_QUERY_PATTERN_EVALUATORS_QUERY_001, new Object[2]);
          if (Stella.$MEMOIZATION_ENABLEDp$) {
            memoizedEntry000.value = ((memoizedValue000 == null) ? Stella.MEMOIZED_NULL_VALUE : memoizedValue000);
          }
        }
        { Cons patterns = ((Cons)(memoizedValue000));

          { Cons triple = null;
            Cons iter000 = patterns;

            for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
              triple = ((Cons)(iter000.value));
              { java.lang.reflect.Method code = ComputedProcedure.functionCodeFromProcedure(((ComputedProcedure)(triple.value)));

                if (code != null) {
                  evaluatorforms = Cons.cons(Cons.consList(Cons.cons(FunctionCodeWrapper.wrapFunctionCode(code), Cons.cons(triple.rest.value, Cons.cons(triple.rest.rest.value, Stella.NIL)))), evaluatorforms);
                }
              }
            }
          }
          return (evaluatorforms.reverse());
        }
      }
    }
  }