Fixed POS and PCT
This commit is contained in:
Родитель
f4ccb3d54c
Коммит
11e769010c
|
@ -62,13 +62,16 @@ namespace Microsoft.Coyote.Testing.Interleaving
|
|||
if (Debug.IsEnabled)
|
||||
{
|
||||
Debug.WriteLine($"<ScheduleLog> {prioritized} and {op} are racing.");
|
||||
Debug.WriteLine($"<ScheduleLog> Resetting priority of {op.Group}.");
|
||||
Debug.WriteLine($"<ScheduleLog> Resetting priority of {op}.");
|
||||
}
|
||||
|
||||
this.PrioritizedOperations.Remove(op);
|
||||
}
|
||||
}
|
||||
|
||||
this.PrioritizedOperations.Remove(prioritized);
|
||||
Debug.WriteLine($"<ScheduleLog> Resetting priority of {prioritized}.");
|
||||
|
||||
next = ops.First(op => op == prioritized);
|
||||
return true;
|
||||
}
|
||||
|
@ -106,7 +109,7 @@ namespace Microsoft.Coyote.Testing.Interleaving
|
|||
foreach (var op in ops.Where(o => !this.PrioritizedOperations.Contains(o)))
|
||||
{
|
||||
// Randomly choose a priority for this operation.
|
||||
int index = this.RandomValueGenerator.Next(this.PrioritizedOperations.Count) + 1;
|
||||
int index = this.RandomValueGenerator.Next(this.PrioritizedOperations.Count + 1);
|
||||
this.PrioritizedOperations.Insert(index, op);
|
||||
Debug.WriteLine("<ScheduleLog> Assigned priority '{0}' for operation '{1}'.", index, op);
|
||||
}
|
||||
|
|
|
@ -156,7 +156,7 @@ namespace Microsoft.Coyote.Testing.Interleaving
|
|||
foreach (var group in ops.Select(op => op.Group).Where(g => !this.PrioritizedOperationGroups.Contains(g)))
|
||||
{
|
||||
// Randomly choose a priority for this group.
|
||||
int index = this.RandomValueGenerator.Next(this.PrioritizedOperationGroups.Count) + 1;
|
||||
int index = this.RandomValueGenerator.Next(this.PrioritizedOperationGroups.Count + 1);
|
||||
this.PrioritizedOperationGroups.Insert(index, group);
|
||||
Debug.WriteLine("[coyote::strategy] Assigned priority '{0}' for operation group '{1}'.", index, group);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче