public static void reactToKbUpdate(Context context, Stella_Object renamed_Object) {
    { boolean skolemP = false;
      boolean propositionP = false;
      boolean metapropositionP = false;

      { Surrogate testValue000 = Stella_Object.safePrimaryType(renamed_Object);

        if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_SKOLEM)) {
          { Skolem object000 = ((Skolem)(renamed_Object));

            skolemP = true;
          }
        }
        else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_PROPOSITION)) {
          { Proposition object000 = ((Proposition)(renamed_Object));

            propositionP = true;
          }
        }
        else {
          { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

            stream000.nativeStream.print("`" + testValue000 + "' is not a valid case option");
            throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
          }
        }
      }
      if (propositionP &&
          Proposition.metaPropositionP(((Proposition)(renamed_Object)))) {
        metapropositionP = true;
      }
      Keyword.bumpMemoizationTimestamp(Logic.KWD_KB_UPDATE);
      if (metapropositionP) {
        Keyword.bumpMemoizationTimestamp(Logic.KWD_META_KB_UPDATE);
      }
      if (((Boolean)(Logic.$INVISIBLEASSERTIONp$.get())).booleanValue()) {
        return;
      }
      else if (Logic.descriptionModeP()) {
        { Object old$FillingconstraintpropagationqueuesP$000 = Logic.$FILLINGCONSTRAINTPROPAGATIONQUEUESp$.get();

          try {
            Native.setBooleanSpecial(Logic.$FILLINGCONSTRAINTPROPAGATIONQUEUESp$, false);
            if (propositionP) {
              ((Proposition)(renamed_Object)).reactToInferenceUpdate();
            }
            else if (skolemP) {
              ((Skolem)(renamed_Object)).reactToInferenceUpdate();
            }

          } finally {
            Logic.$FILLINGCONSTRAINTPROPAGATIONQUEUESp$.set(old$FillingconstraintpropagationqueuesP$000);
          }
        }
        return;
      }
      else if (((Boolean)(Logic.$FILLINGCONSTRAINTPROPAGATIONQUEUESp$.get())).booleanValue()) {
        if (propositionP) {
          ((Proposition)(renamed_Object)).reactToInferenceUpdate();
        }
        else if (skolemP) {
          ((Skolem)(renamed_Object)).reactToInferenceUpdate();
        }
        return;
      }
      { World world = (metapropositionP ? Logic.lookupInferenceCache(context, Logic.KWD_META) : Logic.lookupConstraintPropagationWorld(context));

        if (world != null) {
          { Object old$Context$000 = Stella.$CONTEXT$.get();
            Object old$Module$000 = Stella.$MODULE$.get();

            try {
              Native.setSpecial(Stella.$CONTEXT$, world);
              Native.setSpecial(Stella.$MODULE$, ((Context)(Stella.$CONTEXT$.get())).baseModule);
              { Object old$FillingconstraintpropagationqueuesP$001 = Logic.$FILLINGCONSTRAINTPROPAGATIONQUEUESp$.get();

                try {
                  Native.setBooleanSpecial(Logic.$FILLINGCONSTRAINTPROPAGATIONQUEUESp$, true);
                  if (propositionP) {
                    ((Proposition)(renamed_Object)).reactToInferenceUpdate();
                  }
                  else if (skolemP) {
                    ((Skolem)(renamed_Object)).reactToInferenceUpdate();
                  }
                  Logic.executeConstraintPropagationQueues();

                } finally {
                  Logic.$FILLINGCONSTRAINTPROPAGATIONQUEUESp$.set(old$FillingconstraintpropagationqueuesP$001);
                }
              }

            } finally {
              Stella.$MODULE$.set(old$Module$000);
              Stella.$CONTEXT$.set(old$Context$000);
            }
          }
        }
      }
      if (Stella_Object.isaP(context, Logic.SGT_STELLA_MODULE)) {
        { Context child = null;
          Cons iter000 = context.childContexts.theConsList;

          for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
            child = ((Context)(iter000.value));
            if (Stella_Object.isaP(child, Logic.SGT_STELLA_MODULE)) {
              Logic.reactToKbUpdate(child, renamed_Object);
            }
          }
        }
      }
    }
  }