Problem Set

You don't need to submit your solution to these problems.  They are there to assist you in preparing for the exam.

1. Construct an example where intraprocedural class analysis is able to eliminate a dynamic dispatch on a local variable even if the entire class hierarchy is not available.
2. Constract an example where intraprocedural class analysis is able to eliminate a dynamic dispatch on a parameter if (a) the entire class hierarchy is available (b) parts of the class hierarchy are not available.   You should use the language syntax introduced in class for describing intraprocedural class analysis.
3. Construct an example where class hierarchy analysis is not able to eliminate a dynamic dispatch alone but it is able to eliminate the dynamic dispatch if rapid type inference is also used.