Midterm 2 Rubric CS61A-Summer 09 Problem 1: 2 points for each box and pointer diagram. 1 point for each answer. All or nothing. Problem 2: Part A: 5 points 3 points for knowing x 2 points for knowing y Part B: 7 points 1 point for each correct circle -1 point for each wrong circle Problem 3: 15 points total. 14 pts - trivial mistake 12-10 pts - has the idea 8-4 pts - has an idea 2-0 pts - has an attempt A single off by 1 indexing error: -1 pt Multiple off by 1 indexing errors: -3 pts Did not scale old vector index in vector-ref: -3 pts No points off for not subtracting by 1 in (+ 1 (div (- (vector-length vec) 1)) n)) Some people had crazy loops with 5 or 6 counter variables. We tried to follow them the best we could. Let us know if we made a mistake with yours. Problem 4: 12 points total: 11 pts - trivial mistake 10-8 pts - has the idea 6-2 pts - has an idea Tried to stream-add a ints to int-matrix instead of using stream-map: - 4 pts Some tried to use stream-car, thinking that every time in the recursion, the first element is updated. This was a serious error. These solutions tend to get 4 pts total. Problem 5: 12 points total: 4 points for saving a temporary variable to point to (cdr ls1) or (cdr ls2) 4 points for set-cdr! on ls1 4 points for set-cdr! on ls2 -1 point for trivial mistakes. Except for trivial mistakes, your answer had to be completely correct to receive credit. Problem 6: 12 pts total: 1 point for each number. Problem 7: 18 points total: 17 pts - trivial mistake 16 - 12 pts - has the idea, knew to modify mc-apply or extend-env and knew that we had to do case analysis and bind arguments differently 10 - 6 pts - has an idea 4 - 0 pts - has an attempt Some people implemented the new lambda notation but broke the old one. These solutions get 8 pts. Some people had (list args) but missed (list (params fn)). If changing just (list (params fn)) would fix the problem, we took off 2 points. If just changing (list (params fn)) would not fix the problem, i.e. in mc-apply you changed "args" to (if (atom? (params fn)) (list args) args), then we took off 4 points. The difference between a 4 and 0 was whether you demonstrated some understanding of how metacircular evaluator works. i.e. putting mc-apply inside the (lambda-exp? exp) clause would be a 0 since lambda expression just creates a procedure; thinking that a lambda expression calls the procedure is a grave mistake. The difference between a 0 and a 4 was whether your changes seriously broke the existing features of mc-eval.