public void Anon() { TestDriver currentMachine = this; PMachineValue m = null; PMachineValue TMP_tmp0 = null; PMachineValue TMP_tmp1 = null; PMachineValue TMP_tmp2 = null; PMachineValue TMP_tmp3 = null; PMachineValue TMP_tmp4 = null; PMachineValue TMP_tmp5 = null; IEventWithPayload TMP_tmp6 = null; PMachineValue TMP_tmp7 = null; PMachineValue TMP_tmp8 = null; PMachineValue TMP_tmp9 = null; TMP_tmp0 = currentMachine.CreateInterface <I_ReliableStorageMachine>(currentMachine); reliableStorage = TMP_tmp0; TMP_tmp1 = currentMachine.CreateInterface <I_ServiceMachine>(currentMachine); service = TMP_tmp1; TMP_tmp2 = ((PMachineValue)((IPrtValue)service)?.Clone()); TMP_tmp3 = ((PMachineValue)((IPrtValue)reliableStorage)?.Clone()); TMP_tmp4 = currentMachine.CreateInterface <I_FaultTolerantMachine>(currentMachine, TMP_tmp2); m = (PMachineValue)TMP_tmp4; TMP_tmp5 = ((PMachineValue)((IPrtValue)m)?.Clone()); TMP_tmp6 = new PHalt(null); currentMachine.SendEvent(currentMachine, TMP_tmp5, (Event)TMP_tmp6); TMP_tmp7 = ((PMachineValue)((IPrtValue)service)?.Clone()); TMP_tmp8 = ((PMachineValue)((IPrtValue)reliableStorage)?.Clone()); TMP_tmp9 = currentMachine.CreateInterface <I_FaultTolerantMachine>(currentMachine, TMP_tmp7); m = (PMachineValue)TMP_tmp9; }
public void Anon_1() { Timer currentMachine = this; PMachineValue TMP_tmp0_3 = null; IEventWithPayload TMP_tmp1_2 = null; PMachineValue TMP_tmp2_1 = null; TMP_tmp0_3 = ((PMachineValue)((IPrtValue)client)?.Clone()); TMP_tmp1_2 = new TIMEOUT(null); TMP_tmp2_1 = currentMachine.self; currentMachine.SendEvent(currentMachine, TMP_tmp0_3, (Event)TMP_tmp1_2, TMP_tmp2_1); }
public void Anon_7(Event currentMachine_dequeuedEvent) { ReliableStorageMachine currentMachine = this; PMachineValue m_1 = ((PEvent <PMachineValue>)currentMachine_dequeuedEvent).PayloadT; PMachineValue TMP_tmp0_7 = null; IEventWithPayload TMP_tmp1_6 = null; MyState TMP_tmp2_6 = (MyState)(0); TMP_tmp0_7 = ((PMachineValue)((IPrtValue)m_1)?.Clone()); TMP_tmp1_6 = new eQueryStateResponse((MyState)(0)); TMP_tmp2_6 = ((MyState)((IPrtValue)s_1)?.Clone()); currentMachine.SendEvent(currentMachine, TMP_tmp0_7, (Event)TMP_tmp1_6, TMP_tmp2_6); }
public async Task PossiblyRaiseHalt() { FaultTolerantMachine currentMachine = this; IEventWithPayload TMP_tmp0_4 = null; var PGEN_recvEvent_1 = await currentMachine.ReceiveEvent(typeof(PHalt), typeof(DefaultEvent)); switch (PGEN_recvEvent_1) { case PHalt PGEN_evt_1: { TMP_tmp0_4 = new PHalt(null); currentMachine.RaiseEvent(currentMachine, (Event)TMP_tmp0_4); throw new PUnreachableCodeException(); } break; case DefaultEvent PGEN_evt_2: { } break; } }
public async Task Anon_3() { FaultTolerantMachine currentMachine = this; PMachineValue TMP_tmp0_3 = null; IEventWithPayload TMP_tmp1_3 = null; PMachineValue TMP_tmp2_3 = null; IEventWithPayload TMP_tmp3_3 = null; TMP_tmp0_3 = ((PMachineValue)((IPrtValue)service_1)?.Clone()); TMP_tmp1_3 = new eDoOpJ(null); currentMachine.SendEvent(currentMachine, TMP_tmp0_3, (Event)TMP_tmp1_3); await PossiblyRaiseHalt(); TMP_tmp2_3 = ((PMachineValue)((IPrtValue)reliableStorage_1)?.Clone()); TMP_tmp3_3 = new eUpdateToState0(null); currentMachine.SendEvent(currentMachine, TMP_tmp2_3, (Event)TMP_tmp3_3); currentMachine.GotoState <FaultTolerantMachine.State0>(); throw new PUnreachableCodeException(); }
public async Task Anon_1(Event currentMachine_dequeuedEvent) { FaultTolerantMachine currentMachine = this; PrtTuple <PMachineValue, PMachineValue> arg = ((PEvent <PrtTuple <PMachineValue, PMachineValue> >)currentMachine_dequeuedEvent).PayloadT; PMachineValue TMP_tmp0_1 = null; PMachineValue TMP_tmp1_1 = null; PMachineValue TMP_tmp2_1 = null; IEventWithPayload TMP_tmp3_1 = null; PMachineValue TMP_tmp4_1 = null; PrtBool TMP_tmp5_1 = ((PrtBool)false); TMP_tmp0_1 = arg.Item1; service_1 = TMP_tmp0_1; TMP_tmp1_1 = arg.Item2; reliableStorage_1 = TMP_tmp1_1; TMP_tmp2_1 = ((PMachineValue)((IPrtValue)reliableStorage_1)?.Clone()); TMP_tmp3_1 = new eQueryState(null); TMP_tmp4_1 = currentMachine.self; currentMachine.SendEvent(currentMachine, TMP_tmp2_1, (Event)TMP_tmp3_1, TMP_tmp4_1); var PGEN_recvEvent = await currentMachine.ReceiveEvent(typeof(eQueryStateResponse)); switch (PGEN_recvEvent) { case eQueryStateResponse PGEN_evt: { var s = PGEN_evt.PayloadT; TMP_tmp5_1 = ((long)s) == ((long)((PrtInt)(long)MyState.State0)); if (TMP_tmp5_1) { currentMachine.GotoState <FaultTolerantMachine.State0>(); throw new PUnreachableCodeException(); } else { currentMachine.GotoState <FaultTolerantMachine.State1>(); throw new PUnreachableCodeException(); } } break; } }