University of Virginia, Department of Computer Science
CS200: Computer Science, Spring 2003

Notes: Monday 26 February 2003
Schedule

Notes

Places, Frames and Envrionments

(define nest 
  (lambda (x)
    (lambda (x)
      (+ x x))))
Compound Application Rule
  1. Construct a new frame, enclosed in the environment of this procedure (that is, the parent of this frame is the frame this procedure's environment points to)
  2. Make places in that frame with the names of each parameter
  3. Put the values of the parameters in those places
  4. Evaluate the body in the new environment
Why must expressions be evaluated in an environment?






How do we find the value associated with a name in an environment?









GEB Questions

Your reading assignment for Spring Break is to finish reading the first part of Gödel, Escher, Bach (up through and including Chapter IX). The questions below might help you think about the reading. Then again, they might not. I am quite certain, however, that they will not help you prepare for the quiz on March 10.

Answer all the answerable questions, but unask the unanswerable ones. This quiz will not be graded, but it won't be ungraded either. Bring your answers written out to class on Monday, 10 March.

1. Give the "correct" answer, the "more correct" answer, and the "most correct answer" to this question:

Why do programmers comment?
(a) Give compiler extra instructions
(b) Aid readability
(c) To hide code for debugging purposes
(d) (b) and (c)
(e) none of the above
a. (b), (c), and (d)
b. (b), (c), (d) and a..
c. all of the above
d. all of the above except c.
e. none of the below

2. If you knew the answer to this question, what would it be?

3. Does this question have no answer?

4. Is the next question trickier than this one?

5. Was the previous question fairer than this one?

6. If this exam were graded, would your answer to the previous question be different?

6. If this exam were graded, would your answer to the previous question be different?

6. If this exam were graded, would your answer to the previous question be different?

7. If you were Gödel, how would you answer this?

8. Richard Feynman once said "If you think you know how quantum mechanics works, you're wrong." If Feynman were a logician instead, would he have said "If you think you don't understand Gödel's Theorem, then you do." or "If you don't think you don't understand Gödel's Theorem, then you don't."?

9. If this assignment was to be graded, would your answer to this question be different?

10. Ask and answer the question should I have asked instead of this one.

Links

CS101 Exam
CS201 Exam
CS415 Assignment
CS588: Cryptology Midterm [Solutions] CS655 Problem Set [Answers]
PhD Qualifying Exam

Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
Byrd's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.

CS 200


CS 200: Computer Science
Department of Computer Science
University of Virginia

Circle Fractal by Ramsey Arnaoot and Qi Wang

cs200-staff@cs.virginia.edu
Using these Materials