public static void printControlFrame(ControlFrame self, PrintableStringWriter stream) {
    if (Surrogate.subtypeOfP(Stella_Object.safePrimaryType(self), Logic.SGT_LOGIC_PARALLEL_CONTROL_FRAME)) {
      { ParallelControlFrame self000 = ((ParallelControlFrame)(self));

        stream.print("|PLL-CF|" + ControlFrame.debugFrameId(self000) + "[");
      }
    }
    else {
      stream.print("|CF|" + ControlFrame.debugFrameId(self) + "[");
    }
    if (self.choicePointUnbindingOffset != Stella.NULL_INTEGER) {
      stream.print(self.choicePointUnbindingOffset);
    }
    else {
      stream.print("_");
    }
    { Object old$Printinframe$000 = Logic.$PRINTINFRAME$.get();

      try {
        Native.setSpecial(Logic.$PRINTINFRAME$, self);
        { boolean printtimesP = self.allottedClockTicks != Stella.NULL_INTEGER;

          stream.print(" " + self.state + " " + self.currentStrategy);
          if (self.up != null) {
            stream.print("  UP: " + ControlFrame.debugFrameId(self.up));
          }
          else {
            stream.print("  UP: -");
          }
          if (self.down != null) {
            stream.print("  DOWN: " + ControlFrame.debugFrameId(self.down));
          }
          else {
            stream.print("  DOWN: -");
          }
          stream.print("  DEPTH: " + ControlFrame.computeFrameDepth(self));
          if (((Description)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Logic.SYM_LOGIC_DESCRIPTION, null))) != null) {
            stream.print(" DESC: " + ((Description)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Logic.SYM_LOGIC_DESCRIPTION, null))));
          }
          if (printtimesP) {
            stream.print(" CLOCK: " + ((QueryIterator)(Logic.$QUERYITERATOR$.get())).currentClockTicks + " START: " + self.startingClockTicks + " TICKS: " + self.allottedClockTicks);
          }
          stream.print(((self.reversePolarityP ? " ~" : " ")) + self.proposition + "]");
        }

      } finally {
        Logic.$PRINTINFRAME$.set(old$Printinframe$000);
      }
    }
  }