Review for final exam
The final exam will be comprehensive. You can expect about 1/2 of the exam to cover
material introduced after the second mid-term, 1/2 covering material previously on the
previous mid-terms.
The exam will be open-book, open notes.
The outline below lists what I consider to be the most important topics
covered in the latter part of the course. Review the mid-terms as well. In looking
at the sample final remember that it was given in a semester when there was only
one mid-term so the weighting of topics is different than it will be this year.
- Scoping
- terms: scope, lifetime, referencing environment, static scoping, dynamic scoping
- implementation of scoping: static and dynamic links;
- be able to mentally simulate execution of procedure calls and name lookups
using different scoping
rules; this includes drawing representations of the stack at various points in the execution
Parameter passing
- terms: pass by value, pass by reference, pass by name, pass by need, aliasing
- be able to simulate procedure calls using any of the pass-by-* rules
- be able to simulate what happens when aliasing occurs using different rules
- Recursive programming
- Tail recursion
- What is it? Why is it important?
- Be able to distinguish tail-recursive calls from non-tail-recursive calls
- Be able to write a tail-recursive function using an accumulating parameter (discussed when talking about ML and Scheme
- Common list processing patterns
- Common higher-order functions and their use
- Exception handling
- Know how exceptions are raised and handled
- Be able to simulate raising and handling exceptions
- Objects
- virtual and non-virtual methods
- abstract classes
- multiple inheritance: what are the potential problems? What are some different ways the problems are solved?
- Object implementation: virtual method table. Object implementation in C++ including multiple-inheritance
- Differences between Java object system and C++ object system. Examples: no MI in Java; objects always accessed through references, etc.
- Python
- Sequence types and slices
- Be able to simulate evaluations of slice expressions
- The dictionary built-in type and its use
- Syntax for basic control constructs
- Data abstraction
- The general notion of "interface". Distinguish the general notion from the specific
use in of the term in Java. How is the same result accomplished in C++?
- Garbage collection
- Terms: reference counting, mark-and-sweep, copying collection, incremental collection, conservative collection
- Be able to simulate reference counting, mark-and-sweep, and copying collection behavior on simple code examples
- Concurrency
- Understand how a statement like i = i+1 is implemented using multiple instructions
- Be able to simulate all possible interleavings of simple code sequences so as
to illustrate the different behaviors that can occur.
- Understand how locks work and be able to simulate execution of code using locks
- Understand how conditions (java) work and how they are related to locks; be able to
simulate execution of code using conditions
- Axiomatic semantics
- Assignment rule
- Composition (sequencing) rule
- Loop invariants
- Logic and constraint programming
- Unification
- Basic and non-basic constraints
- Constraint store
- Constraint propagation
- Distribution