Skip to content

Commit

Permalink
Fix stale names in comments for the UncontrolledNondeterminismCheckSc…
Browse files Browse the repository at this point in the history
…heduler (#129)
  • Loading branch information
sarsko authored Dec 11, 2023
1 parent 8a23e74 commit 8e70583
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/scheduler/uncontrolled_nondeterminism.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<S: Scheduler> {
scheduler: Box<S>,
Expand All @@ -23,7 +25,7 @@ pub struct UncontrolledNondeterminismCheckScheduler<S: Scheduler> {
}

impl<S: Scheduler> UncontrolledNondeterminismCheckScheduler<S> {
/// 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),
Expand Down

0 comments on commit 8e70583

Please sign in to comment.