public static void finalizePropositionAnnotations(Proposition proposition) {
    { PropertyList annotations = ((PropertyList)(KeyValueList.dynamicSlotValue(proposition.dynamicSlots, Logic.SYM_LOGIC_ANNOTATIONS, null)));

      if (annotations != null) {
        { Keyword option = null;
          Stella_Object value = null;
          Cons iter000 = annotations.thePlist;

          for (;!(iter000 == Stella.NIL); iter000 = iter000.rest.rest) {
            option = ((Keyword)(iter000.value));
            value = iter000.rest.value;
            if (option == Logic.KWD_DIRECTION) {
              if (Surrogate.subtypeOfP(Stella_Object.safePrimaryType(value), Logic.SGT_STELLA_GENERALIZED_SYMBOL)) {
                { GeneralizedSymbol value000 = ((GeneralizedSymbol)(value));

                  { String testValue000 = Native.stringUpcase(value000.symbolName);

                    if (Stella.stringEqlP(testValue000, "FORWARD")) {
                      KeyValueList.setDynamicSlotValue(proposition.dynamicSlots, Logic.SYM_LOGIC_FORWARD_ONLYp, Stella.TRUE_WRAPPER, Stella.FALSE_WRAPPER);
                    }
                    else if (Stella.stringEqlP(testValue000, "BACKWARD")) {
                      KeyValueList.setDynamicSlotValue(proposition.dynamicSlots, Logic.SYM_LOGIC_BACKWARD_ONLYp, Stella.TRUE_WRAPPER, Stella.FALSE_WRAPPER);
                    }
                    else {
                      annotations.removeAt(option);
                      { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

                        { Object old$PrintreadablyP$000 = Stella.$PRINTREADABLYp$.get();

                          try {
                            Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                            stream000.nativeStream.println("PARSING ERROR: Illegal value for :direction option: `" + value000 + "'.");
                            Logic.helpSignalPropositionError(stream000, Logic.KWD_ERROR);

                          } finally {
                            Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$000);
                          }
                        }
                        throw ((ParsingError)(ParsingError.newParsingError(stream000.theStringReader()).fillInStackTrace()));
                      }
                    }
                  }
                }
              }
              else {
                annotations.removeAt(option);
                { OutputStringStream stream001 = OutputStringStream.newOutputStringStream();

                  { Object old$PrintreadablyP$001 = Stella.$PRINTREADABLYp$.get();

                    try {
                      Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                      stream001.nativeStream.println("PARSING ERROR: Illegal value for :direction option: `" + value + "'.");
                      Logic.helpSignalPropositionError(stream001, Logic.KWD_ERROR);

                    } finally {
                      Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$001);
                    }
                  }
                  throw ((ParsingError)(ParsingError.newParsingError(stream001.theStringReader()).fillInStackTrace()));
                }
              }
            }
            else if (option == Logic.KWD_WEIGHT) {
              { Surrogate testValue001 = Stella_Object.safePrimaryType(value);

                if (Surrogate.subtypeOfIntegerP(testValue001)) {
                  { IntegerWrapper value000 = ((IntegerWrapper)(value));

                    KeyValueList.setDynamicSlotValue(proposition.dynamicSlots, Logic.SYM_LOGIC_WEIGHT, FloatWrapper.wrapFloat(value000.numberWrapperToFloat()), Stella.NULL_FLOAT_WRAPPER);
                  }
                }
                else if (Surrogate.subtypeOfFloatP(testValue001)) {
                  { FloatWrapper value000 = ((FloatWrapper)(value));

                    KeyValueList.setDynamicSlotValue(proposition.dynamicSlots, Logic.SYM_LOGIC_WEIGHT, FloatWrapper.wrapFloat(value000.wrapperValue), Stella.NULL_FLOAT_WRAPPER);
                  }
                }
                else {
                  annotations.removeAt(option);
                  { OutputStringStream stream002 = OutputStringStream.newOutputStringStream();

                    { Object old$PrintreadablyP$002 = Stella.$PRINTREADABLYp$.get();

                      try {
                        Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                        stream002.nativeStream.println("PARSING ERROR: Illegal value for :weight option: `" + value + "'.");
                        Logic.helpSignalPropositionError(stream002, Logic.KWD_ERROR);

                      } finally {
                        Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$002);
                      }
                    }
                    throw ((ParsingError)(ParsingError.newParsingError(stream002.theStringReader()).fillInStackTrace()));
                  }
                }
              }
            }
            else if (option == Logic.KWD_CONFIDENCE_LEVEL) {
            }
            else {
              if (!(Stella_Object.runOptionHandlerP(proposition, option, value))) {
                annotations.removeAt(option);
                { OutputStringStream stream003 = OutputStringStream.newOutputStringStream();

                  { Object old$PrintreadablyP$003 = Stella.$PRINTREADABLYp$.get();

                    try {
                      Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                      stream003.nativeStream.println("PARSING ERROR: Unrecognized annotation option: `" + option + "'.");
                      Logic.helpSignalPropositionError(stream003, Logic.KWD_ERROR);

                    } finally {
                      Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$003);
                    }
                  }
                  throw ((ParsingError)(ParsingError.newParsingError(stream003.theStringReader()).fillInStackTrace()));
                }
              }
            }
          }
        }
      }
    }
  }