public static Keyword cutSpecialist(ControlFrame frame, Keyword lastmove) {
    lastmove = lastmove;
    if (((Iterator)(KeyValueList.dynamicSlotValue(frame.dynamicSlots, Logic.SYM_STELLA_ITERATOR, null))) == null) {
      KeyValueList.setDynamicSlotValue(frame.dynamicSlots, Logic.SYM_STELLA_ITERATOR, Logic.EMPTY_PROPOSITIONS_ITERATOR, null);
      return (Logic.KWD_CONTINUING_SUCCESS);
    }
    else {
      { ControlFrame parentframe = frame.up;

        if ((parentframe == null) ||
            (!(parentframe.state == Logic.KWD_AND))) {
          return (Logic.KWD_TERMINAL_FAILURE);
        }
        { Vector conjuncts = ((Vector)(KeyValueList.dynamicSlotValue(parentframe.dynamicSlots, Logic.SYM_STELLA_ARGUMENTS, null)));

          if (conjuncts != null) {
            { ControlFrame conjunct = null;
              Vector vector000 = conjuncts;
              int index000 = 0;
              int length000 = vector000.length();

              loop000 : for (;index000 < length000; index000 = index000 + 1) {
                conjunct = ((ControlFrame)((vector000.theArray)[index000]));
                if (conjunct == frame) {
                  break loop000;
                }
                else {
                  ControlFrame.popControlFrame(conjunct);
                }
              }
            }
          }
        }
        return (Logic.KWD_TERMINAL_FAILURE);
      }
    }
  }