public static void createChoicePoint(ControlFrame frame) {
    { PatternRecord patternrecord = frame.inheritedPatternRecord;

      if ((Stella.$TRACED_KEYWORDS$ != null) &&
          Stella.$TRACED_KEYWORDS$.membP(Logic.KWD_QUERY_STACKS)) {
        System.out.println("create-choice-point: F " + ControlFrame.debugFrameId(frame) + " CP= " + frame.choicePointUnbindingOffset + " NEWCP= " + (patternrecord.topUnbindingStackOffset + 1));
      }
      if (frame.choicePointUnbindingOffset == Stella.NULL_INTEGER) {
        frame.choicePointUnbindingOffset = patternrecord.topUnbindingStackOffset + 1;
      }
      else {
        PatternRecord.unbindVariablesBeginningAt(patternrecord, frame.choicePointUnbindingOffset);
      }
    }
  }