public static World lookupConstraintPropagationWorld(Context self) {
    if (Logic.worldStateP(self)) {
      if (Logic.$JUST_IN_TIME_FORWARD_INFERENCEp$) {
        if (((QueryIterator)(Logic.$QUERYITERATOR$.get())) != null) {
          return (Logic.getInferenceCache(self, Logic.KWD_JUST_IN_TIME));
        }
        else {
          return (Logic.lookupInferenceCache(self, Logic.KWD_JUST_IN_TIME));
        }
      }
      else {
        return (Logic.lookupInferenceCache(self, Logic.KWD_TMS));
      }
    }
    else {
      return (((World)(self)));
    }
  }