public static void Execute(PSharpRuntime runtime) { // Monitors must be registered before the first P# machine // gets created (which will kickstart the runtime). runtime.RegisterMonitor(typeof(Safety)); runtime.RegisterMonitor(typeof(Liveness)); runtime.CreateMachine(typeof(Driver), new Driver.Config(2)); }
public static void Execute(PSharpRuntime runtime) { runtime.RegisterMonitor(typeof(LivenessMonitor)); runtime.CreateMachine(typeof(Environment)); runtime.Wait(); Console.WriteLine("Done!"); }
public static void Execute(PSharpRuntime runtime) { ActorModel.Start(runtime, () => { runtime.RegisterMonitor(typeof(SafetyMonitor)); var senderProxy = ActorProxy.Create <IDriver>(new ActorId(0), "DriverProxy"); }); }
public static void Execute(PSharpRuntime runtime) { //Configuration conf = Configuration.Create(true, true, true, true, true); //ActorModel.Configure(conf); ActorModel.Start(runtime, () => { var config = ClientConfiguration.LocalhostSilo(); GrainClient.Initialize(config); runtime.RegisterMonitor(typeof(SafetyMonitor)); var clusterManager = GrainClient.GrainFactory.GetGrain <IClusterManager>(0); clusterManager.Configure(); }); }
public static MonitorId NewMonitor(this PSharpRuntime @this, Type type, Event e) { if (@this == null) { throw new ArgumentNullException(nameof(@this)); } var monitorId = new MonitorId(@this, type); if (!GetRegisteredMonitors(@this).TryAdd(monitorId, null)) { return(monitorId); } ms_extProps.GetOrCreateValue(@this).LastCreatedMonitorId = monitorId; @this.RegisterMonitor(type); if (e != null) { @this.InvokeMonitor(monitorId, e); } return(monitorId); }
public static void Execute(PSharpRuntime runtime) { runtime.RegisterMonitor(typeof(Safety)); runtime.CreateMachine(typeof(Driver)); }
public static void Execute(PSharpRuntime runtime) { runtime.RegisterMonitor(typeof(ValMachineCheck)); runtime.CreateMachine(typeof(GodMachine)); }
public static void Execute(PSharpRuntime runtime) { runtime.RegisterMonitor(typeof(ValidityCheck)); runtime.CreateMachine(typeof(GodMachine)); }
public static void Execute(PSharpRuntime runtime) { runtime.RegisterMonitor(typeof(LivenessMonitor)); runtime.CreateMachine(typeof(Environment)); }
public static void Execute(PSharpRuntime runtime) { runtime.RegisterMonitor(typeof(WatchDog)); runtime.CreateMachine(typeof(EventHandler)); }
public static void Execute(PSharpRuntime runtime) { runtime.RegisterMonitor(typeof(InvariantMonitor)); runtime.RegisterMonitor(typeof(ServerResponseSeqMonitor)); runtime.CreateMachine(typeof(Environment)); }
public static void Execute(PSharpRuntime runtime) { runtime.RegisterMonitor(typeof(WatchDog)); runtime.CreateMachine(typeof(EventHandler)); }
public static void Execute(PSharpRuntime runtime) { runtime.RegisterMonitor(typeof(M)); runtime.CreateMachine(typeof(Environment)); }
public static void Execute(PSharpRuntime runtime) { runtime.RegisterMonitor(typeof(SafetyMonitor)); runtime.CreateMachine(typeof(ClusterManager)); }
public static void PaxosTest(PSharpRuntime runtime) { runtime.RegisterMonitor(typeof(SafteyAndLivenessMonitor)); runtime.CreateMachine(typeof(MainMachine), new MainMachineInitEvent(runtime)); }
public static void Execute(PSharpRuntime runtime) { runtime.RegisterMonitor(typeof(M)); runtime.CreateMachine(typeof(Real1)); }
public static void Execute(PSharpRuntime runtime) { runtime.RegisterMonitor(typeof(LivenessMonitor)); runtime.CreateMachine(typeof(M)); }
public static void Execute(PSharpRuntime runtime) { runtime.RegisterMonitor(typeof(LivenessMonitor)); runtime.CreateMachine(typeof(ClusterManager)); }
public static void Execute(PSharpRuntime runtime) { runtime.RegisterMonitor(typeof(InvariantMonitor)); runtime.RegisterMonitor(typeof(ServerResponseSeqMonitor)); runtime.CreateMachine(typeof(Environment)); }