Assignment 8, Parameter passing
Due November 4th, 12 noon
(To be done with your group)
Note: Questions 5 is on material that will be covered after Midterm 2.
- In this question you will discover the parameter passing mechanism for
MYSTERY using
this web page to
access the PL-Detective. For the purpose of this question assume that
the actual's type and the corresponding formal's type must be
the same, using structural type equality. Also assume that
mystery uses static scoping.
- For each parameter passing implementation described in Section 9.5.2 of
text describe the design issues and their implications. The text does
a good job of describing the design issues for all implementations except
for "name". You need to come up with the issues for "name" yourself.
- Determine and describe the parameter passing mechanism in
mystery using the above link.
Be sure to state how MYSTERY's
implementation addresses the issues discussed in part (i). Your
submissions may execute up to 10 PRINTs. Each additional PRINT will be
charged 5% of the points for the question.
- Provide and discuss the evidence that supports your case.
- Repeat parts (ii) and (iii) of the question above using
this link (which
potentially uses a different parameter passing implementation)
- In this question you will use
this link to
determine if MYSTERY uses deep
or shallow binding for procedures that are passed as parameters. For the
purpose of this question assume that the actual's type and the corresponding
formal's type must be the same, using structural type equality
- Determine and describe whether
mystery uses deep or shallow binding for passed procedures. Your
submission may execute up to 4 PRINTs. Each additional PRINT will
be charged 5% of the points for the question.
- Provide and discuss the evidence that supports your case.
- Discuss which one you prefer: deep or shallow binding.
- Problem set, #3 (page 394)
- Give a MYSTERY program which
when run will have static and dynamic links pointing to different activation
records. Explain your example.