News Take-home midterm exam, due 6 November 

Forum: U Chicago, Com Sci 221, autumn 2000
Date: 2000, Oct 29
From: Mike O'Donnell <odonnell@cs.uchicago.edu>

On Monday, 30 October, I will hand out a self-timed take-home midterm exam, covering Chapters 1-4 in the text, and class lectures through datatypes. You may refer to the textbook, your notes, all posted material from class, and any other published material while you take the exam. You may use 3 hours to work on the exam, with a 30-minute optional rest break. You must hand in your work on paper at the beginning of class Monday, 6 November.

Here is a review of the 5 problems:

  1. abstract syntax, pre/in/post/mixfix, evaluation. You will get most of the points on this problem if you can convert correctly between abstract syntax trees, prefix, infix, postfix, and mixfix versions of an expression, and describe machine code evaluating the expression. There's a final kicker to the question, requiring you to really understand the structural relationship between the evaluation code and the abstract syntax tree, and to draw general conclusions from that relationship.
  2. context-free grammar. This problem deals with the use of gimmicks in a grammar to enforce precedence relations. It's a lot like problem 2.12 on page 51 of the text, but smaller and slightly trickier.
  3. structured programs. Show the structural relationship between abstract syntax trees and flowcharts for pure if/while structured programs. Show and discuss briefly how break commands complicate this relationship.
  4. reasoning with invariants. I give you a tiny iterative program, with precisely one while loop in it. You write precondition, postcondition, and loop invariant. No proof in the problem, but of course the assertions must be sufficient to support a proof.
  5. datatypes. Describe the calculation of l values and r values in a given assignment command. You don't need to give the formulae for calculating the values, but you must be precise about which values are calculated from which other values, in what order.


Mike O'D.


Messages

1. Question question about problem 1 by Michael C. Brizic, 2000, Nov 02
1. Feedback Given one form, produce another by Mike O'Donnell, 2000, Nov 02
2. Question question about problem 3 by Michael C. Brizic, 2000, Nov 02
1. Feedback Look at the lecture notes for syntax by Mike O'Donnell, 2000, Nov 02
3. Question question for problem 5 by Michael C. Brizic, 2000, Nov 02
1. Agree Describe the sequence of l-value and r-value operations by Mike O'Donnell, 2000, Nov 02
4. Ok Good grades for midterm exam by Mike O'Donnell, 2000, Nov 08
1. More My solution for problem 5 (l- and r-values) by Mike O'Donnell, 2000, Nov 09
5. Question About the last problem in the Mid-term by Zhenglong Gu, 2000, Nov 08
1. Feedback please correct me by Torkiat Krutpum, 2000, Nov 08
2. Feedback lvalue vs rvalue by Jake Bartolone, 2000, Nov 08
1. None Re: lvalue vs rvalue by Sam TH, 2000, Nov 08
...
2. None I am not convinced by Zhenglong Gu, 2000, Nov 08
...
3. Question question about the question by Michael C. Brizic, 2000, Nov 08
4. Idea well, try it by C. Donour Sizemore, 2000, Nov 08
1. Feedback reference my previous comment by Michael C. Brizic, 2000, Nov 09
...
5. Note More illustrations by Jake Bartolone, 2000, Nov 09
6. Note precedence of dereference and class-member operator by Michael C. Brizic, 2000, Nov 09

to: "Take-home midterm exam, due 6 November"