public static Description extractSubgoalDescriptionOfFrame(ControlFrame frame) {
    if (((Description)(KeyValueList.dynamicSlotValue(frame.dynamicSlots, Logic.SYM_LOGIC_DESCRIPTION, null))) != null) {
      return (((Description)(KeyValueList.dynamicSlotValue(frame.dynamicSlots, Logic.SYM_LOGIC_DESCRIPTION, null))));
    }
    while (!(frame.state == Logic.KWD_ATOMIC_GOAL)) {
      frame = frame.up;
    }
    return (Logic.getDescription(((Surrogate)(frame.proposition.operator))));
  }