logo
 
Final Review
CptS 355 - Programming Language Design
Washington State University
Home
Calendar
Syllabus
Resources
People
Project turn-in

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. In my opinion many people on the midterm relied too much on their notes. The underlying principles here are not difficult. A word or two of notes to assure you that you are thinking of the right topic might be helpful. But if you are counting on the notes to hold all the answers you are probably going to be in trouble. 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. The sample also asks about Java which we did not cover this year: while there will be no Java-specific questions this year the Java questions on the sample nevertheless reflect topics that I think are important so don't ignore them.

  • 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
  • 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
  • Exception handling
    • Know how exceptions are raised and handled
    • Be able to simulate raising and handling exceptions (see homework)
  • Objects
    • virtual and non-virtual methods
    • abstract classes
    • multiple inheritance: what are the potential problems? How are the problems solved in different languages?
    • 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
    • Libraries: importing libraries and naming values imported from libraries
  • Data abstraction
    • The general notion of "interface". Distinguish the general notion from the specific use in of the term in Java.
    • Relationship between abstract data types and objects
    • ML structures -- know how they differ fundamentally from C structs.
    • Polymorphic data abstraction: C++ templates, ML functors. Know that the term "functor" used to refer to "function objects" and ML functors are fundamentally different ideas.
  • 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
    • 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 condition variables work and how they are related to locks; be able to simulate execution of code using condition variables
    • Know the kinds approaches that are used to create threads in different languages and how the choice is affected by the rest of the language design: i.e., in C you pass a function pointer and argument pointer, in ML you pass a function closure, and in Java you create an object.
  • Constraint Programming
  • What is a constraint? Basic and non-basic constraints
  • Abstract execution model for constraint programming: constraint store and constraint propagators
  • Insufficiency of propagation/need for distribution; be able to recognize the need for distribution and show how new constraint stores are created in order to do distribution
  • Study through section 2.7 of the posted notes on constraint programming

                                                                                                                                                                                                                                                                                                                                             
  (c) 2003 Curtis Dyreson, (c) 2004, 2005 Carl H. Hauser           E-mail questions or comments to Prof. Carl Hauser