diff --git a/src/scheduler/uncontrolled_nondeterminism.rs b/src/scheduler/uncontrolled_nondeterminism.rs index 4861f23..2c63e2e 100644 --- a/src/scheduler/uncontrolled_nondeterminism.rs +++ b/src/scheduler/uncontrolled_nondeterminism.rs @@ -8,12 +8,14 @@ enum ScheduleRecord { Random(u64), } -/// An `UncontrolledRandomnessCheckScheduler` checks whether a given program is deterministic -/// by wrapping an inner `Scheduler` and, for each schedule generated by that scheduler, +/// An `UncontrolledNondeterminismCheckScheduler` checks whether a given program exhibits uncontrolled +/// nondeterminism by wrapping an inner `Scheduler`, and, for each schedule generated by that scheduler, /// replaying the schedule once. When doing the replay, we check that the schedule is still /// valid and that the set of runnable tasks is the same at each step. -/// Violations of these checks means that the program exhibits randomness which is not -/// under Shuttle's control. +/// Violations of these checks means that the program exhibits nondeterminism which is not +/// under Shuttle's control. Note that the opposite is not true — there are no guarantees that +/// the program under test does not have uncontrolled nondeterminism if it passes a run of +/// the `UncontrolledNondeterminismCheckScheduler`, even in the case where the wrapped `scheduler` is exhaustive. #[derive(Debug)] pub struct UncontrolledNondeterminismCheckScheduler { scheduler: Box, @@ -23,7 +25,7 @@ pub struct UncontrolledNondeterminismCheckScheduler { } impl UncontrolledNondeterminismCheckScheduler { - /// Create a new `UncontrolledRandomnessCheckScheduler` by wrapping the given `Scheduler` implementation. + /// Create a new `UncontrolledNondeterminismCheckScheduler` by wrapping the given `Scheduler` implementation. pub fn new(scheduler: S) -> Self { Self { scheduler: Box::new(scheduler),