public static List listLogicCommands() {
    { List commands = List.newList();

      { MethodSlot function = null;
        Iterator iter000 = Module.allFunctions(Stella.getStellaModule("/LOGIC", true), true);
        Cons collect000 = null;

        while (iter000.nextP()) {
          function = ((MethodSlot)(iter000.value));
          if (((BooleanWrapper)(KeyValueList.dynamicSlotValue(function.dynamicSlots, Logic.SYM_STELLA_METHOD_COMMANDp, Stella.FALSE_WRAPPER))).wrapperValue &&
              function.publicP()) {
            if (collect000 == null) {
              {
                collect000 = Cons.cons(function, Stella.NIL);
                if (commands.theConsList == Stella.NIL) {
                  commands.theConsList = collect000;
                }
                else {
                  Cons.addConsToEndOfConsList(commands.theConsList, collect000);
                }
              }
            }
            else {
              {
                collect000.rest = Cons.cons(function, Stella.NIL);
                collect000 = collect000.rest;
              }
            }
          }
        }
      }
      { Symbol stellacommand = null;
        Cons iter001 = Logic.$LOGIC_RELEVANT_STELLA_COMMANDS$;
        Cons collect001 = null;

        for (;!(iter001 == Stella.NIL); iter001 = iter001.rest) {
          stellacommand = ((Symbol)(iter001.value));
          if (collect001 == null) {
            {
              collect001 = Cons.cons(Symbol.lookupCommand(stellacommand), Stella.NIL);
              if (commands.theConsList == Stella.NIL) {
                commands.theConsList = collect001;
              }
              else {
                Cons.addConsToEndOfConsList(commands.theConsList, collect001);
              }
            }
          }
          else {
            {
              collect001.rest = Cons.cons(Symbol.lookupCommand(stellacommand), Stella.NIL);
              collect001 = collect001.rest;
            }
          }
        }
      }
      return (commands.sort(Native.find_java_method("edu.isi.powerloom.logic.Logic", "commandL", new java.lang.Class [] {Native.find_java_class("edu.isi.stella.MethodSlot"), Native.find_java_class("edu.isi.stella.MethodSlot")})));
    }
  }