Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DPORStrategy"/> class.
 /// </summary>
 public DPORStrategy(
     IRandomNumberGenerator rand     = null,
     int raceReversalIterationsLimit = -1,
     int stepLimit     = -1,
     bool useSleepSets = true,
     bool dpor         = true)
 {
     this.Rand         = rand;
     this.StepLimit    = stepLimit;
     this.Stack        = new Stack(rand);
     this.Dpor         = dpor ? new DPORAlgorithm() : null;
     this.UseSleepSets = rand is null && useSleepSets;
     this.RaceReversalIterationsLimit = raceReversalIterationsLimit;
     this.Reset();
 }
Beispiel #2
0
 /// <summary>
 /// Creates the DPOR strategy.
 /// </summary>
 public DPORStrategy(
     IContract contract,
     IRandomNumberGenerator rand     = null,
     int raceReversalIterationsLimit = -1,
     int stepLimit     = -1,
     bool useSleepSets = true,
     bool dpor         = true)
 {
     Contract     = contract;
     Rand         = rand;
     StepLimit    = stepLimit;
     Stack        = new Stack(rand, Contract);
     Dpor         = dpor ? new DPORAlgorithm(Contract) : null;
     UseSleepSets = rand == null && useSleepSets;
     RaceReversalIterationsLimit = raceReversalIterationsLimit;
     Reset();
 }