static Cons helpGetTypes(LogicObject renamed_Object, Module module, Environment environment) {
    { Module mdl000 = module;
      Context cxt000 = mdl000;

      if (mdl000 == null) {
        mdl000 = ((Module)(Stella.$MODULE$.get()));
        cxt000 = ((Context)(Stella.$CONTEXT$.get()));
      }
      { Object old$Module$000 = Stella.$MODULE$.get();
        Object old$Context$000 = Stella.$CONTEXT$.get();

        try {
          Native.setSpecial(Stella.$MODULE$, mdl000);
          Native.setSpecial(Stella.$CONTEXT$, cxt000);
          environment = environment;
          synchronized (Logic.$POWERLOOM_LOCK$) {
            { Cons derivabletypes = Stella.NIL;

              if ((environment == null) ||
                  ((environment != null) &&
                   Stella.stringEqlP(environment.level, "INFERENCE"))) {
                derivabletypes = Logic.allTypes(renamed_Object);
              }
              else if ((environment != null) &&
                  Stella.stringEqlP(environment.level, "ASSERTION")) {
                derivabletypes = Logic.allAssertedTypes(renamed_Object);
              }
              else if ((environment != null) &&
                  Stella.stringEqlP(environment.level, "TAXONOMIC")) {
                derivabletypes = Logic.allTaxonomicTypes(renamed_Object);
              }
              return (derivabletypes);
            }
          }

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