/// <summary>
        /// Returns the next boolean choice.
        /// </summary>
        /// <param name="maxValue">Max value</param>
        /// <param name="next">Next</param>
        /// <returns>Boolean</returns>
        public override bool GetNextBooleanChoice(int maxValue, out bool next)
        {
            CaptureAndCheckProgramState();

            if (IsReplayingCycle)
            {
                ScheduleStep nextStep = PotentialCycle[CurrentCycleIndex];
                if ((nextStep.Type == ScheduleStepType.SchedulingChoice) || nextStep.BooleanChoice == null)
                {
                    Debug.WriteLine("<LivenessDebug> Trace is not reproducible: next step is not a nondeterministic boolean choice.");
                    EscapeUnfairCycle();
                    return(SchedulingStrategy.GetNextBooleanChoice(maxValue, out next));
                }

                Debug.WriteLine("<LivenessDebug> Replaying '{0}' '{1}'.", nextStep.Index, nextStep.BooleanChoice.Value);

                next = nextStep.BooleanChoice.Value;

                SchedulingStrategy.ForceNextBooleanChoice(maxValue, next);

                CurrentCycleIndex++;
                if (CurrentCycleIndex == PotentialCycle.Count)
                {
                    CurrentCycleIndex = 0;
                }

                return(true);
            }
            else
            {
                return(SchedulingStrategy.GetNextBooleanChoice(maxValue, out next));
            }
        }
 /// <summary>
 /// Returns the next boolean choice.
 /// </summary>
 /// <param name="maxValue">The max value.</param>
 /// <param name="next">Next</param>
 /// <returns>Boolean</returns>
 public override bool GetNextBooleanChoice(int maxValue, out bool next)
 {
     CheckLivenessTemperature();
     return(SchedulingStrategy.GetNextBooleanChoice(maxValue, out next));
 }