Runtime Environments & Parameter Passing


Answer & solution
Answer: Strict reference-only actuals: invalid call, no defined output. If expression actuals are materialized in a temporary: x=2,z=7. (no official key was published)
Pure call by reference binds each formal to an assignable storage location. The actuals x and z have such locations, but x*y is an arithmetic expression and has no variable location to which a conventional reference formal can bind. Thus in a language requiring variable actuals for reference parameters, this call is rejected and there is no output. This is an important qualification to the otherwise familiar textbook calculation.
If the intended pseudo-language permits an expression actual by evaluating it into a temporary, evaluate x*y=1·5=5 at call entry and bind b to that temporary. Bind a directly to x and c directly to z. Executing a:=2 sets x to 2. The temporary b remains 5; it is not a live expression. Then c:=a+b sets z=2+5=7. On return the program prints x=2,z=7.
The temporary convention is sufficient here because P never assigns to b. It is nevertheless an additional semantic rule, not inherent in reference passing. In particular, re-evaluating x*y after changing x would give 10 and would implement call by name rather than this temporary-backed reference convention.