public static void unlinkInferenceCache(World self) {
    if (((Context)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Logic.SYM_LOGIC_INFERENCE_CACHE_OF, null))) != null) {
      { Context worldstate = ((Context)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Logic.SYM_LOGIC_INFERENCE_CACHE_OF, null)));

        if (self == ((World)(KeyValueList.dynamicSlotValue(worldstate.dynamicSlots, Logic.SYM_LOGIC_JUST_IN_TIME_INFERENCE_CACHE, null)))) {
          KeyValueList.setDynamicSlotValue(worldstate.dynamicSlots, Logic.SYM_LOGIC_JUST_IN_TIME_INFERENCE_CACHE, null, null);
        }
        else if (self == ((World)(KeyValueList.dynamicSlotValue(worldstate.dynamicSlots, Logic.SYM_LOGIC_META_INFERENCE_CACHE, null)))) {
          KeyValueList.setDynamicSlotValue(worldstate.dynamicSlots, Logic.SYM_LOGIC_META_INFERENCE_CACHE, null, null);
        }
        else if (self == ((World)(KeyValueList.dynamicSlotValue(worldstate.dynamicSlots, Logic.SYM_LOGIC_TRUTH_MAINTAINED_INFERENCE_CACHE, null)))) {
          KeyValueList.setDynamicSlotValue(worldstate.dynamicSlots, Logic.SYM_LOGIC_TRUTH_MAINTAINED_INFERENCE_CACHE, null, null);
        }
        KeyValueList.setDynamicSlotValue(self.dynamicSlots, Logic.SYM_LOGIC_INFERENCE_CACHE_OF, null, null);
      }
    }
  }