CSE526: Principles of Programming Languages Scott Stoller hw5: shared-variable concurrency, lambda calculus version: 5pm,5mar2004 due: 11mar2004 1. Consider adding a new command CU ("conditional update") to the programming language of chapter 8. The syntax of CU is: ::= CU(,,,) Informally, the semantics of CU(x,x0,e,flag) is that it executes the following two atomic steps. (1) evaluate the expression e to an integer i (2) if x=x0 then (x:=i; flag:=1) else flag:=0 Each of these two steps executes atomically. Transitions of other threads may occur between the steps. Extend the transition semantics of section 8.1 with transition rule(s) for CU. Hint: One issue is where to store the value i between the two steps. One possible approach is to augment the variety of configurations by introducing an additional kind of command. 2. Exercise 10.1 (a), (b), (e) for the second of the three expressions. You don't need to do parts (c) and (d). You don't need to do anything for the first and third expressions.