public static ControlFrame selectNextStrategy(ControlFrame frame) {
    { Keyword strategy = null;

      if (frame.currentStrategy != null) {
        strategy = frame.currentStrategy;
      }
      else if (frame.state == Logic.KWD_PARALLEL_STRATEGIES) {
        strategy = Logic.KWD_SELECT_PARALLEL_THREAD;
      }
      else {
        loop000 : for (;;) {
          strategy = ((Keyword)(frame.nextStrategies.value));
          if (strategy == null) {
            return (frame);
          }
          frame.nextStrategies = frame.nextStrategies.rest;
          if (Logic.filterOutStrategyP(strategy, frame)) {
            continue loop000;
          }
          if (Logic.parallelStrategyP(strategy)) {
            frame = ControlFrame.parallelizeControlFrame(frame);
            frame.nextStrategies = Cons.cons(strategy, frame.nextStrategies);
            strategy = Logic.KWD_SELECT_PARALLEL_THREAD;
          }
          ControlFrame.clearStrategySlots(frame);
          break loop000;
        }
      }
      frame.currentStrategy = strategy;
      return (frame);
    }
  }