public static Cons translateLoomContextChange(Cons tree, boolean needsquoteP) {
    { Stella_Object contextform = tree.rest.value;

      { Surrogate testValue000 = Stella_Object.safePrimaryType(contextform);

        if (Surrogate.subtypeOfStringP(testValue000)) {
          { StringWrapper contextform000 = ((StringWrapper)(contextform));

            return (Cons.list$(Cons.cons(Logic.SYM_STELLA_IN_MODULE, Cons.cons(contextform000, Cons.cons(Stella.NIL, Stella.NIL)))));
          }
        }
        else if (Surrogate.subtypeOfSymbolP(testValue000)) {
          { Symbol contextform000 = ((Symbol)(contextform));

            if (needsquoteP) {
              {
                if (!(Stella.stringEqlP(contextform000.symbolName, "SAVEDCONTEXT"))) {
                  Stella.STANDARD_WARNING.nativeStream.println("Warning: Can't translate `" + tree + "' with a non-constant argument");
                }
                return (null);
              }
            }
            else {
              return (Cons.list$(Cons.cons(Logic.SYM_STELLA_IN_MODULE, Cons.cons(StringWrapper.wrapString(contextform000.symbolName), Cons.cons(Stella.NIL, Stella.NIL)))));
            }
          }
        }
        else if (testValue000 == Logic.SGT_STELLA_CONS) {
          { Cons contextform000 = ((Cons)(contextform));

            return (Logic.translateLoomContextChange(contextform000, false));
          }
        }
        else {
          { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

            stream000.nativeStream.print("`" + testValue000 + "' is not a valid case option");
            throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
          }
        }
      }
    }
  }