News Description of final exam problems 

Forum: Com Sci 221, U Chicago, Autumn 2001, Discuss Classwork
Date: 2001, Dec 02
From: Mike O'Donnell <odonnell@cs.uchicago.edu>

I will administer an in-class comprehensive final exam on Friday, 7 December, 10:30 AM to 12:30 PM in Ryerson Annex 276. You may use the textbook and any written or printed materials that you like during the exam. You may listen to music on headphones, and eat/drink snacks as long as you don't annoy other students.

Rather than just sampling what you remember from the course, the exam is intended to exercise your thinking in a bit more depth. It is very similar in character to the midterm exam. I encourage you to focus your studying and practice on the particular topics of the five questions:

  1. Recall how notational details, such as operator precedence, often lead to "gimmicks" in context-free grammars, and some discrepancy between parse trees and abstract syntax trees. I provide a grammar and example AST for a variant command used in some procedural programming languages. You must critique the slightly greater discrepancy between AST and parse tree in my example.

  2. I describe a well known data structure representation. You must discuss some of its properties in terms of the set-theoretic description of the types involved. I recommend that you study the assignment on parallel arrays and sparse arrays to prepare for this question. Problem 1 of the autumn 2000 final exam is similar in character, but substantially different in detail. I think that the 2000 question is slightly harder than the 2001 question.

  3. I propose a naive and incorrect application of Hoare's rule for reasoning about assignments to an assignment command involving an array reference on the left-hand side. You must explain, both by an example execution and conceptually, why the proposed reasoning is wrong. I couldn't resist mentioning a harder example at the end. You may work on it for extra credit, or just think about it in your later life. But I strongly recommend that you do all of the regular problems first.

  4. You must define a higher-order function simulating a particular control structure that I describe. You may use either LISP or ML notation. I recommend that you study the example control structures that I showed in class, and problem 3 in the autumn 1999 final exam. Pay particular attention to the way that the higher-order simulations of control structures don't actually deal with the internal structure of computation states, but only with other functions that operate on those states and that are provided as parameters to the control structure. You may also study problem 3 in the autumn 2000 exam. I think that the 2001 problem is about as hard, or perhaps slightly harder than, the 1999 problem, but substantially easier than the 2000 problem.

  5. I define another "mother of all ..." recursive reduction operation in ML. You must use my reducer to define the identity function, and one other slightly more interesting function. In this case, the "slightly more interesting function" is chosen to be exactly what the given reducer is good for, so that definition is very straightforward. The identity function is slightly less natural. Defining the identity is one of the best exercises to test understanding of a reducer.



  6. Mike O'D.


Messages

1. Question Number 5 question by Peter Chang, 2001, Dec 06
1. Question Which reduce function; analog to what? by Mike O'Donnell, 2001, Dec 06
(_ Question agnostic98 by Peter Chang, 2001, Dec 06
1. Warning oops, wrong title... i meant to say "higher order reduce?" by Peter Chang, 2001, Dec 06
2. Feedback "slightly more higher order" has to do with parameters, 2001, Dec 06
2. Question 1999 Exam question #3 by Peter Chang, 2001, Dec 07
1. Question Similar Problem by Avi Schwab, 2001, Dec 07
2. Feedback Apply multiple condition parameters to various computed states by Mike O'Donnell, 2001, Dec 07
3. Question Pure Functional by Mamun Tanveer, 2001, Dec 07
1. Feedback Functional languages allow nested everything by Mike O'Donnell, 2001, Dec 07
2. Note Oops by Mamun Tanveer, 2001, Dec 07

to: "Description of final exam problems"