public static void applyRuleConsequentToVector(Description consequent, Vector arguments, Proposition rule, Description triggerdescription, Proposition triggerproposition, boolean toucheddefaultP, Justification bcJustification) {
    triggerdescription = triggerdescription;
    { Object old$Collectforwardpropositions$000 = Logic.$COLLECTFORWARDPROPOSITIONS$.get();

      try {
        Native.setSpecial(Logic.$COLLECTFORWARDPROPOSITIONS$, Stella.NIL);
        { boolean toucheddefaultknowledgeP = Proposition.defaultTrueP(triggerproposition) ||
              (Proposition.defaultTrueP(rule) ||
               toucheddefaultP);
          Skolem skolem = null;
          int skolemgenerationcount = 0;

          { Stella_Object arg = null;
            Vector vector000 = arguments;
            int index000 = 0;
            int length000 = vector000.length();

            for (;index000 < length000; index000 = index000 + 1) {
              arg = (vector000.theArray)[index000];
              if (Logic.skolemP(arg) &&
                  (((Skolem)(arg)).skolemGenerationCount() > skolemgenerationcount)) {
                skolemgenerationcount = ((Skolem)(arg)).skolemGenerationCount();
                if (skolemgenerationcount >= Logic.$MAX_SKOLEM_GENERATION_COUNT$) {
                  if ((Stella.$TRACED_KEYWORDS$ != null) &&
                      Stella.$TRACED_KEYWORDS$.membP(Logic.KWD_PROPAGATE)) {
                    System.out.println("*** cutting off forward skolemization on: " + triggerproposition);
                  }
                  return;
                }
              }
            }
          }
          { Object old$Queryiterator$000 = Logic.$QUERYITERATOR$.get();
            Object old$DontCheckForDuplicatePropositionsP$000 = Logic.$DONT_CHECK_FOR_DUPLICATE_PROPOSITIONSp$.get();

            try {
              Native.setSpecial(Logic.$QUERYITERATOR$, null);
              Native.setBooleanSpecial(Logic.$DONT_CHECK_FOR_DUPLICATE_PROPOSITIONSp$, false);
              Logic.inheritDescription(arguments, consequent, toucheddefaultknowledgeP);

            } finally {
              Logic.$DONT_CHECK_FOR_DUPLICATE_PROPOSITIONSp$.set(old$DontCheckForDuplicatePropositionsP$000);
              Logic.$QUERYITERATOR$.set(old$Queryiterator$000);
            }
          }
          if (Stella_Object.traceKeywordP(Logic.KWD_PROPAGATE)) {
            Proposition.traceForwardRule(rule, triggerproposition, ((Cons)(Logic.$COLLECTFORWARDPROPOSITIONS$.get())));
          }
          { Proposition p = null;
            Cons iter000 = ((Cons)(Logic.$COLLECTFORWARDPROPOSITIONS$.get()));

            for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
              p = ((Proposition)(iter000.value));
              { Stella_Object value000 = null;

                { Stella_Object arg = null;
                  Vector vector001 = p.arguments;
                  int index001 = 0;
                  int length001 = vector001.length();

                  loop002 : for (;index001 < length001; index001 = index001 + 1) {
                    arg = (vector001.theArray)[index001];
                    if (Logic.skolemP(arg)) {
                      value000 = arg;
                      break loop002;
                    }
                  }
                }
                skolem = ((Skolem)(value000));
              }
              if ((skolem != null) &&
                  ((skolem.definingProposition == null) &&
                   (!((BooleanWrapper)(KeyValueList.dynamicSlotValue(skolem.dynamicSlots, Logic.SYM_LOGIC_HYPOTHESIZED_INSTANCEp, Stella.FALSE_WRAPPER))).wrapperValue))) {
                KeyValueList.setDynamicSlotValue(skolem.dynamicSlots, Logic.SYM_LOGIC_SKOLEM_GENERATION_COUNT, IntegerWrapper.wrapInteger(Stella.integer_max(skolemgenerationcount + 1, skolem.skolemGenerationCount())), Stella.NULL_INTEGER_WRAPPER);
              }
              Proposition.recordForwardGoal(rule, arguments, p);
              Logic.recordForwardJustification(Cons.consList(Cons.cons(triggerproposition, Stella.NIL)), rule, arguments, p, bcJustification);
            }
          }
        }

      } finally {
        Logic.$COLLECTFORWARDPROPOSITIONS$.set(old$Collectforwardpropositions$000);
      }
    }
  }