CS 5966, Lecture of 2/24/09 On Operational Semantics Illustration of how the operational semantics of MPI "works" With respect to Figure 1(a) of the paper at http://www.cs.utah.edu/formal_verification/cav09-slack.html I am doing a hand-simulation of the operational semantics of ISP below... ---------- Legend for c in C: ---------- PS: S_{0,1}(1) l[0] == 1 C = { <0, S_{0,1}(1), F, bot, 1, bot, {}, F, F> } ---------- PW: W_{0,2}(<0,1>) l[0] == 1 C = { <0, S_{0,1}(1), F, bot, 1, bot, {}, F, F> , <0, W_{0,2}(<0,1>), T, bot, bot, <0,2>, {}, F, F> } ---------- PS: S_{1,1}(2) l[1] == 1 C = { <0, S_{0,1}(1), F, bot, 1, bot, {}, F, F> , <0, W_{0,2}(<0,1>), T, bot, bot, <0,2>, {}, F, F> , <1, S_{1,1}(2), F, bot, 2, bot, {}, F, F> , } ---------- PW: W_{1,2}(<1,1>) l[1] == 1 C = { <0, S_{0,1}(1), F, bot, 1, bot, {}, F, F> , <0, W_{0,2}(<0,1>), T, bot, bot, <0,2>, {}, F, F> , <1, S_{1,1}(2), F, bot, 2, bot, {}, F, F> , <1, W_{1,2}(<1,1>), T, bot, bot, <1,1>, {}, F, F> } ---------- PR: R_{2,1}(*) l[2] == 1 C = { <0, S_{0,1}(1), F, bot, 1, bot, {}, F, F> , <0, W_{0,2}(<0,1>), T, bot, bot, <0,2>, {}, F, F> , <1, S_{1,1}(2), F, bot, 2, bot, {}, F, F> , <1, W_{1,2}(<1,1>), T, bot, bot, <1,1>, {}, F, F> , <2, R_{2,1}(*), F, *, bot, bot, {}, F, F> } ---------- PW: W_{2,2}(<2,1>) l[2] == 1 C = { <0, S_{0,1}(1), F, bot, 1, bot, {}, F, F> , <0, W_{0,2}(<0,1>), T, bot, bot, <0,2>, {}, F, F> , <1, S_{1,1}(2), F, bot, 2, bot, {}, F, F> , <1, W_{1,2}(<1,1>), T, bot, bot, <1,1>, {}, F, F> , <2, R_{2,1}(*), F, *, bot, bot, {}, F, F> <2, W_{2,2}(<2,1>), T, bot, bot, <2,1>, {}, F, F> } ---------- Now C_M = { <0, S_{0,1}(1), F, bot, 1, bot, {}, F, F> , <1, S_{1,1}(2), F, bot, 2, bot, {}, F, F> , <2, R_{2,1}(*), F, *, bot, bot, {}, F, F> } ---------- Now RR* can fire with respect to <1, S_{1,1}(2), F, bot, 2, bot, {}, F, F> , <2, R_{2,1}(*), F, *, bot, bot, {}, F, F> ---------- This changes C as follows C = { <0, S_{0,1}(1), F, bot, 1, bot, {}, F, F> , <0, W_{0,2}(<0,1>), T, bot, bot, <0,2>, {}, F, F> , <1, S_{1,1}(2), F, bot, 2, bot, {}, F, F> , <1, W_{1,2}(<1,1>), T, bot, bot, <1,1>, {}, F, F> , -> <2, R_{2,1}(1), F, 1, bot, bot, {<1,1>},F, F> --- --- ------- <2, W_{2,2}(<2,1>), T, bot, bot, <2,1>, {}, F, F> } ---------- Now RS can fire since the receive has found a match with a send The effect is to set the complete for both and match for the send. This changes C and C_M as follows (C_M is defined functionally - "combinationally" -- in terms of C always). Now the records shown by the -> are "spent" and will not participate in the definition of C_M. Since they are gone, the "wait"s are now eligible to be in C_M because they are no longer "shadowed" by the S and R associated with them! C = { <0, S_{0,1}(1), F, bot, 1, bot, {}, F, F> , <0, W_{0,2}(<0,1>), T, bot, bot, <0,2>, {}, F, F> , -> <1, S_{1,1}(2), F, bot, 2, bot, {<2,1>},T, F> , <1, W_{1,2}(<1,1>), T, bot, bot, <1,1>, {}, F, F> , -> <2, R_{2,1}(1), F, 1, bot, bot, {<1,1>},T, F> <2, W_{2,2}(<2,1>), T, bot, bot, <2,1>, {}, F, F> } C_M = { <0, S_{0,1}(1), F, bot, 1, bot, {}, F, F> , <0, W_{0,2}(<0,1>), T, bot, bot, <0,2>, {}, F, F> , <1, W_{1,2}(<1,1>), T, bot, bot, <1,1>, {}, F, F> , <2, W_{2,2}(<2,1>), T, bot, bot, <2,1>, {}, F, F> } ---------- Now the RW can fire because their ancestor R and S have found their matches... Let's quickly fire the waits now. This results in the following C (C_M will be combinationally eye-balled each time) C = { <0, S_{0,1}(1), F, bot, 1, bot, {}, F, F> , <0, W_{0,2}(<0,1>), T, bot, bot, <0,2>, {}, F, F> , <1, S_{1,1}(2), F, bot, 2, bot, {<2,1>},T, F> , <1, W_{1,2}(<1,1>), T, bot, bot, <1,1>, {}, F, F> , <2, R_{2,1}(1), F, 1, bot, bot, {<1,1>},T, F> <2, W_{2,2}(<2,1>), T, bot, bot, <2,1>, {}, F, F> } ---------- (to be continued more before class...)