Docsity

Assume Global Scope - Homework 4 | Programming Language Concepts | COMP 524, Assignments of Programming Languages

Toggle sidebar
bg1
Comp 524—Spring 2007
Homework 4
Due at 3:30 PM, March 1 2007.
1. (15 pts) Exercise 3.9 (page 154)
2. (25 pts) Exercise 3.13 (page 155)—In addition, assume that we are currently in
the print_x statement called by the second function. Show the contents of the
call stack at this point in the code. Draw the static and dynamic links for each
frame. Finally, sketch the contents of a simplified symbol table at that point in the
code. Assume that the surrounding global scope is at scope level 0.
3. (5 pts) Exercise 6.10 (page 299)
4. (15 pts) Exercise 6.22 (page 302)
5. (7 pts) Exercise 6.32 (page 303)
6. (8 pts) Exercise 7.2 (page 398)
7. (15 pts) Exercise 7.11 (page 400)
8. (10 pts) Exercise 7.19 (page 401): Explain your calculation.
Reminder: All homework should be the effort of the student submitting the work. Any
plagiarism will not be tolerated and will result in a zero on the assignment and possible
honor code violations.

Partial preview of the text

Download Assume Global Scope - Homework 4 | Programming Language Concepts | COMP 524 and more Assignments Programming Languages in PDF only on Docsity!

Comp 524—Spring 2007

Homework 4

Due at 3:30 PM, March 1 2007.

  1. (15 pts) Exercise 3.9 (page 154)
  2. (25 pts) Exercise 3.13 (page 155)—In addition, assume that we are currently in the print_x statement called by the second function. Show the contents of the call stack at this point in the code. Draw the static and dynamic links for each frame. Finally, sketch the contents of a simplified symbol table at that point in the code. Assume that the surrounding global scope is at scope level 0.
  3. (5 pts) Exercise 6.10 (page 299)
  4. (15 pts) Exercise 6.22 (page 302)
  5. (7 pts) Exercise 6.32 (page 303)
  6. (8 pts) Exercise 7.2 (page 398)
  7. (15 pts) Exercise 7.11 (page 400)
  8. (10 pts) Exercise 7.19 (page 401): Explain your calculation. Reminder: All homework should be the effort of the student submitting the work. Any plagiarism will not be tolerated and will result in a zero on the assignment and possible honor code violations.