










Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!











Dr.!Jim!Sasaki
1.1 Basic syntax of parallel programs
$$ to # S ',!$'$.
Operational Semantics of skip
! ¬ B.
––––––––––––––––––––––––––––––
Science!of!Programming Spring’09 Notes!#1 1
3.1 Operational semantics of parallel programs
–––––––––––––––––––
where T ' k ' [ S "!||!…!||! Sk -1!||! Tk !||! Sk +1…!||! Sn ].
where $" = $[ x !:=!++1] and $"" = $[ x !:=!++1][ y !:=! 2 +] Science!of!Programming Spring’09 Notes!#1 1
(For the $ subscript, I used a sequence that indicates the path through the evaluation graph; it can come in handy for compli- cated graphs.)
(not just parallel programs) is confluent if execution doesn't have side effects. For example, evaluation of everyday arithmetic expressions is confluent: 2%3 + 4%5 = 26 regardless of whether you calculate 2% 3 or 4%5 first. Evaluation of C expressions with assignment operators is not confluent: x + (x = 2) could differ depending on whether you evaluate left-to-right or right-to-left. 3.4!Unique!Result!of!Disjoint!Parallel!Program
4.1!Introduction
where! = !" = !# Science!of!Programming Spring’09 Notes!#1 1
rule!will!be!powerful,!less!burdensome,!but!a!bit!subtle!in!its!justifica- tion. 4.2!Sequentialization
%!# S #;!…;! Sn ,!$"$ %!# S $;!…;! Sn ,!$#$ %… %!# E ,!$ n +1$
!!!!%!# b !:=!0,!$[ a !:=!0]$ !!!!%!# E ,!$[ a !:=!0][ b !:=!1]$
{ true }![ a !:=! x +1!||! b !:=! x +2]!{ a +1!=! b }”
statement!of! S #!ever!modifies! x : { x !=! 0 }!Run!some!part!of! S #; { x !=! 0 }! x !:=! x +2; { x !=! 2 }!Run!some!more!of! S #; { x !=! 2 }! x !:=! x * { x !=!6}!Finish!running! S # { x !=! 6 } Rule!9:!Disjoint!Parallelism { p "}! S "!{ q "}!!!!!{ p #}! S #!{ q #}!!!!!…!!!!!{ pn }! Sn !{ qn } ––––––––––––––––––––––––––––––––––––––––––––––– { p "!,! p #!,!…!,! pn }![ S "!||!…!||! Sn ]!{ q "!,! q #!,!…!,! qn } where!the!{ pi }! Si !{ qi }!have!pairwise!disjoint!programs!and!conditions.
{ x !=! x '!,! y !=! y '!,! x - y !=! x '- y '} { x !=! x '!,! y !=! y '} [!{ x !=! x '}! x !:=! x +1!{ x -1!=! x '} ||!{ y !=! y '}! y !:=! y +1!{ y -1!=! y '}!] { x -1!=! x '!,! y -1!=! y '} { x - y !=! x '- y '}