コード例 #1
0
ファイル: MockSharedRegister.cs プロジェクト: suriyak/PSharp
 /// <summary>
 /// Initializes the shared register.
 /// </summary>
 /// <param name="value">Initial value</param>
 /// <param name="runtime">this.Runtime</param>
 public MockSharedRegister(T value, TestingRuntime runtime)
 {
     this.Runtime         = runtime;
     this.RegisterMachine = this.Runtime.CreateMachine(typeof(SharedRegisterMachine <T>));
     this.Runtime.SendEvent(this.RegisterMachine, SharedRegisterEvent.SetEvent(value));
 }
コード例 #2
0
ファイル: MockSharedRegister.cs プロジェクト: suriyak/PSharp
 /// <summary>
 /// Sets current value of the register.
 /// </summary>
 /// <param name="value">Value</param>
 public void SetValue(T value)
 {
     this.Runtime.SendEvent(this.RegisterMachine, SharedRegisterEvent.SetEvent(value));
 }
コード例 #3
0
 /// <summary>
 /// Initializes the shared register.
 /// </summary>
 /// <param name="value">Initial value</param>
 /// <param name="Runtime">Runtime</param>
 public MockSharedRegister(T value, BugFindingRuntime Runtime)
 {
     this.Runtime    = Runtime;
     registerMachine = Runtime.CreateMachine(typeof(SharedRegisterMachine <T>));
     Runtime.SendEvent(registerMachine, SharedRegisterEvent.SetEvent(value));
 }