public static Keyword tryForwardGoalsProof(ControlFrame frame) {
    { Iterator iterator = ((Iterator)(KeyValueList.dynamicSlotValue(frame.dynamicSlots, Logic.SYM_STELLA_ITERATOR, null)));

      if (iterator == null) {
        { Proposition baseproposition = Proposition.findMatchingConceivedProposition(frame.proposition);
          List forwardgoals = null;

          if (baseproposition == null) {
            return (Logic.KWD_FAILURE);
          }
          forwardgoals = Proposition.getForwardGoals(baseproposition);
          if (forwardgoals.emptyP()) {
            return (Logic.KWD_FAILURE);
          }
          else if ((forwardgoals.rest() == Stella.NIL) &&
              Proposition.trueP(((ForwardGoalRecord)(forwardgoals.first())).forwardRule)) {
            ControlFrame.createSubgoalFrame(frame, ((ForwardGoalRecord)(forwardgoals.first())).forwardGoal, null);
            return (Logic.KWD_MOVE_DOWN);
          }
          else {
            iterator = ((ListIterator)(forwardgoals.allocateIterator()));
            KeyValueList.setDynamicSlotValue(frame.dynamicSlots, Logic.SYM_STELLA_ITERATOR, iterator, null);
          }
        }
      }
      else {
        iterator = ((Iterator)(KeyValueList.dynamicSlotValue(frame.dynamicSlots, Logic.SYM_STELLA_ITERATOR, null)));
      }
      if (iterator.nextP()) {
        { ForwardGoalRecord fwdgoalrec = ((ForwardGoalRecord)(iterator.value));

          if (Proposition.trueP(fwdgoalrec.forwardRule)) {
            ControlFrame.createSubgoalFrame(frame, fwdgoalrec.forwardGoal, null);
          }
          else {
            ControlFrame.createConditionalAntecedentSubframe(frame, fwdgoalrec.forwardGoal, fwdgoalrec.forwardRule);
          }
          return (Logic.KWD_MOVE_DOWN);
        }
      }
      return (Logic.KWD_FAILURE);
    }
  }