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; } }
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(); }