public static void applyForwardRulesToVector(Description triggerdescription, Vector arguments, Proposition triggerproposition) {
    { Vector evaluatedargs = arguments;

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

        for (;index000 < length000; index000 = index000 + 1, iter000 = iter000 + 1) {
          arg = (vector000.theArray)[index000];
          i = iter000;
          if (arg.deletedP()) {
            return;
          }
          else if (!Stella_Object.eqlP(arg, Logic.valueOf(arg))) {
            if (arguments == evaluatedargs) {
              evaluatedargs = arguments.copy();
            }
            (evaluatedargs.theArray)[i] = (Logic.valueOf(arg));
          }
        }
      }
      arguments = evaluatedargs;
    }
    { KeyValueList rules = null;
      KeyValueList indices = null;

      { Object [] caller_MV_returnarray = new Object[1];

        rules = Description.collectForwardChainingRules(triggerdescription, caller_MV_returnarray);
        indices = ((KeyValueList)(caller_MV_returnarray[0]));
      }
      { Proposition r = null;
        BooleanWrapper toucheddefaultP = null;
        KvCons iter001 = rules.theKvList;

        for (;iter001 != null; iter001 = iter001.rest) {
          r = ((Proposition)(iter001.key));
          toucheddefaultP = ((BooleanWrapper)(iter001.value));
          if (Proposition.applicableForwardRuleP(r, arguments)) {
            Description.applyRuleConsequentToVector(((Description)((r.arguments.theArray)[1])), arguments, r, triggerdescription, triggerproposition, BooleanWrapper.coerceWrappedBooleanToBoolean(toucheddefaultP), null);
          }
        }
      }
      { ForwardChainingIndex fwdindex = null;
        BooleanWrapper toucheddefaultP = null;
        KvCons iter002 = indices.theKvList;

        loop002 : for (;iter002 != null; iter002 = iter002.rest) {
          fwdindex = ((ForwardChainingIndex)(iter002.key));
          toucheddefaultP = ((BooleanWrapper)(iter002.value));
          { Cons inputargs = Stella.NIL;

            if (!(arguments.length() == fwdindex.forwardGoal.arguments.length())) {
              continue loop002;
            }
            { Stella_Object arg = null;
              Vector vector001 = arguments;
              int index001 = 0;
              int length001 = vector001.length();
              Stella_Object goalarg = null;
              Vector vector002 = fwdindex.forwardGoal.arguments;
              int index002 = 0;
              int length002 = vector002.length();

              loop003 : for (;(index001 < length001) &&
                        (index002 < length002); index001 = index001 + 1, index002 = index002 + 1) {
                arg = (vector001.theArray)[index001];
                goalarg = (vector002.theArray)[index002];
                if (Logic.variableP(goalarg)) {
                  inputargs = Cons.cons(arg, inputargs);
                }
                else if (!Stella_Object.eqlP(arg, Logic.valueOf(goalarg))) {
                  inputargs = null;
                  break loop003;
                }
              }
            }
            if (inputargs == null) {
              continue loop002;
            }
            { ConsIterator it = fwdindex.inputBindings.allocateIterator();
              Stella_Object arg = null;
              Cons iter003 = inputargs.reverse();

              for (;it.nextP() &&
                        (!(iter003 == Stella.NIL)); iter003 = iter003.rest) {
                arg = iter003.value;
                {
                }
                it.valueSetter(arg);
              }
            }
          }
          { Cons outputbindings = null;
            Cons truthvalues = null;
            Cons justifications = null;
            boolean traceforwardinferenceP = Stella_Object.traceKeywordP(Logic.KWD_PROPAGATE);
            boolean tracegoaltreeP = traceforwardinferenceP &&
                Stella_Object.traceKeywordP(Logic.KWD_GOAL_TREE);
            List oldtracekeywords = Stella.$TRACED_KEYWORDS$;

            if (traceforwardinferenceP) {
              if (tracegoaltreeP) {
                System.out.println("Proving forward goal: " + fwdindex.queryBody);
              }
            }
            else if (Stella_Object.traceKeywordP(Logic.KWD_GOAL_TREE)) {
              Stella.$TRACED_KEYWORDS$ = ((List)(Stella.$TRACED_KEYWORDS$.copy().remove(Logic.KWD_GOAL_TREE)));
            }
            { Object old$FillingconstraintpropagationqueuesP$000 = Logic.$FILLINGCONSTRAINTPROPAGATIONQUEUESp$.get();

              try {
                Native.setBooleanSpecial(Logic.$FILLINGCONSTRAINTPROPAGATIONQUEUESp$, true);
                { Object [] caller_MV_returnarray = new Object[2];

                  outputbindings = Logic.applyCachedRetrieve(fwdindex.ioVariables, fwdindex.queryBody, fwdindex.inputBindings, Cons.consList(Cons.cons(Logic.KWD_SINGLETONSp, Cons.cons(Stella.FALSE_WRAPPER, Cons.cons(Logic.KWD_INFERENCE_LEVEL, Cons.cons(Logic.KWD_SHALLOW, Stella.NIL))))), fwdindex.cacheId, caller_MV_returnarray);
                  truthvalues = ((Cons)(caller_MV_returnarray[0]));
                  justifications = ((Cons)(caller_MV_returnarray[1]));
                }

              } finally {
                Logic.$FILLINGCONSTRAINTPROPAGATIONQUEUESp$.set(old$FillingconstraintpropagationqueuesP$000);
              }
            }
            if (tracegoaltreeP) {
              {
                System.out.println("Done proving forward goal: " + fwdindex.queryBody);
                System.out.println();
              }
;
            }
            Stella.$TRACED_KEYWORDS$ = oldtracekeywords;
            { Stella_Object ob = null;
              Cons iter004 = outputbindings;
              Stella_Object tv = null;
              Cons iter005 = truthvalues;

              for (;(!(iter004 == Stella.NIL)) &&
                        (!(iter005 == Stella.NIL)); iter004 = iter004.rest, iter005 = iter005.rest) {
                ob = iter004.value;
                tv = iter005.value;
                { Stella_Object head000 = justifications.value;

                  justifications = justifications.rest;
                  { Stella_Object justification = head000;

                    Description.applyRuleConsequentToVector(fwdindex.consequent, Logic.copyListToArgumentsVector(((Cons)(ob)).listify()), fwdindex.masterRule, triggerdescription, triggerproposition, BooleanWrapper.coerceWrappedBooleanToBoolean(toucheddefaultP) ||
                        (tv == Logic.DEFAULT_TRUE_TRUTH_VALUE), ((Justification)(justification)));
                  }
                }
              }
            }
          }
        }
      }
    }
  }