public static void printGoalInGoalTree(ControlFrame frame, int depth) {
    if (frame.proposition != null) {
      { boolean invertP = frame.reversePolarityP;

        System.out.print("GOAL: ");
        if (invertP) {
          System.out.print("~");
        }
        { Object old$Printmode$000 = Logic.$PRINTMODE$.get();
          Object old$Printlogicalformstream$000 = Logic.$PRINTLOGICALFORMSTREAM$.get();
          Object old$Indentcounter$000 = Logic.$INDENTCOUNTER$.get();

          try {
            Native.setSpecial(Logic.$PRINTMODE$, Logic.KWD_REALISTIC);
            Native.setSpecial(Logic.$PRINTLOGICALFORMSTREAM$, Stella.STANDARD_OUTPUT);
            Native.setIntSpecial(Logic.$INDENTCOUNTER$, (2 * depth) + 7);
            Logic.printUnformattedLogicalForm(frame.proposition, Stella.STANDARD_OUTPUT);
            if (frame.allottedClockTicks != Stella.NULL_INTEGER) {
              System.out.print(" ticks=" + frame.allottedClockTicks);
            }

          } finally {
            Logic.$INDENTCOUNTER$.set(old$Indentcounter$000);
            Logic.$PRINTLOGICALFORMSTREAM$.set(old$Printlogicalformstream$000);
            Logic.$PRINTMODE$.set(old$Printmode$000);
          }
        }
      }
    }
    else {
      System.out.print("STRATEGY: " + frame.up.currentStrategy);
    }
  }