public static Keyword continueCurrentOrNextStrategy(ControlFrame frame) {
    { Keyword result = null;

      for (;;) {
        frame = ControlFrame.selectNextStrategy(frame);
        if (frame.currentStrategy == null) {
          if ((Stella.$TRACED_KEYWORDS$ != null) &&
              Stella.$TRACED_KEYWORDS$.membP(Logic.KWD_STRATEGIES)) {
            System.out.println();
          }
          if (frame.justifications.nonEmptyP()) {
            return (Logic.KWD_FINAL_SUCCESS);
          }
          else {
            return (Logic.KWD_FAILURE);
          }
        }
        if ((Stella.$TRACED_KEYWORDS$ != null) &&
            Stella.$TRACED_KEYWORDS$.membP(Logic.KWD_STRATEGIES)) {
          System.out.print(" " + frame.currentStrategy);
          OutputStream.flushOutput(Stella.STANDARD_OUTPUT);
        }
        if (Stella_Object.traceKeywordP(Logic.KWD_STRATEGIES)) {
          { Description description = ((Description)(KeyValueList.dynamicSlotValue(frame.dynamicSlots, Logic.SYM_LOGIC_DESCRIPTION, null)));

            if ((description != null) &&
                Description.namedDescriptionP(description)) {
              System.out.print("(" + description.surrogateValueInverse.symbolName + ")");
            }
          }
        }
        if (frame.reversePolarityP) {
          { Object old$ReversepolarityP$000 = Logic.$REVERSEPOLARITYp$.get();

            try {
              Native.setBooleanSpecial(Logic.$REVERSEPOLARITYp$, true);
              result = ControlFrame.executeProofStrategy(frame);

            } finally {
              Logic.$REVERSEPOLARITYp$.set(old$ReversepolarityP$000);
            }
          }
        }
        else {
          result = ControlFrame.executeProofStrategy(frame);
        }
        if (result == Logic.KWD_TERMINAL_FAILURE) {
          frame.nextStrategies = Stella.NIL;
          result = Logic.KWD_FAILURE;
        }
        else if ((result == Logic.KWD_MOVE_DOWN) ||
            ((result == Logic.KWD_MOVE_IN_PLACE) ||
             (result == Logic.KWD_TIME_OUT))) {
          if ((Stella.$TRACED_KEYWORDS$ != null) &&
              Stella.$TRACED_KEYWORDS$.membP(Logic.KWD_STRATEGIES)) {
            System.out.println();
          }
          return (result);
        }
        else {
        }
        ControlFrame.recordBasePartialMatchTruth(frame, result);
        if (Stella_Object.traceKeywordP(Logic.KWD_STRATEGIES)) {
          if (result == Logic.KWD_FAILURE) {
            System.out.print(" ");
          }
          else {
            System.out.println();
          }
        }
        if (result == Logic.KWD_FAILURE) {
          frame.currentStrategy = null;
        }
        else {
          return (result);
        }
      }
    }
  }