* @param localP
   */
  public static void upclassifyInstances(Module module, boolean localP) {
    { Object old$Classificationsession$000 = Logic.$CLASSIFICATIONSESSION$.get();
      Object old$Context$000 = Stella.$CONTEXT$.get();

      try {
        Native.setSpecial(Logic.$CLASSIFICATIONSESSION$, Logic.getClassificationSession(Logic.KWD_INSTANCE));
        Native.setSpecial(Stella.$CONTEXT$, ((ClassificationSession)(Logic.$CLASSIFICATIONSESSION$.get())).classificationWorld);
        { Object old$Module$000 = Stella.$MODULE$.get();
          Object old$Context$001 = Stella.$CONTEXT$.get();

          try {
            Native.setSpecial(Stella.$MODULE$, ((module == null) ? ((Module)(Stella.$MODULE$.get())) : module));
            Native.setSpecial(Stella.$CONTEXT$, ((Module)(Stella.$MODULE$.get())));
            if (module == null) {
              Logic.upclassifyAllInstances();
            }
            else if (localP) {
              { LogicObject i = null;
                Iterator iter000 = Logic.allInstances(module, true);

                while (iter000.nextP()) {
                  i = ((LogicObject)(iter000.value));
                  LogicObject.upclassifyOneInstance(i);
                }
              }
            }
            else {
              { Module m = null;
                Iterator iter001 = Module.allIncludedModules(module);

                while (iter001.nextP()) {
                  m = ((Module)(iter001.value));
                  { LogicObject i = null;
                    Iterator iter002 = Logic.allInstances(m, true);

                    while (iter002.nextP()) {
                      i = ((LogicObject)(iter002.value));
                      LogicObject.upclassifyOneInstance(i);
                    }
                  }
                }
              }
            }

          } finally {
            Stella.$CONTEXT$.set(old$Context$001);
            Stella.$MODULE$.set(old$Module$000);
          }
        }

      } finally {
        Stella.$CONTEXT$.set(old$Context$000);
        Logic.$CLASSIFICATIONSESSION$.set(old$Classificationsession$000);
      }
    }
  }