Final Exam Studyguide

CS 550 Programming Languages
Sections 501 and 900 (online)
Instructor: Jeremy Johnson
Format: online take home exam with fixed time limit once started Final exam window: Thur. June 4 (after class) through Thur. June 11 (midnight). Graduating students will have a shorter window to accomodate the schedule for submitting their grades. There will be NO extensions.

General Instructions

Students will have upto 5 hours to complete the exam once started and the exam must be started so that it can be completed in the appropriate (graduating vs. non-graduating students) time window. The exam is open book and open notes (any of the class materials may be used, including assignments and solutions). Students may use language documentation and interpreters (scheme, prolog) and may write and test programs. The exam must be done alone using only the explicitly mentioned resources. Do not discuss the questions with fellow students (especially those who have not yet taken the test). I trust everyone to follow these instructions and failure to do so will result in a zero on the final.

Topics

  1. Implementation of Object Orientation as discussed in (Lecture 5) and Chapter 10 of the text.
  2. Mini Language Compiler (Lecture 6)
    1. RAM architecture
    2. Memory layout, symbol table and compiling expressions, conditionals, and loops.
    3. Optimizations (peephole, constant folding, common subexpression elimination, code reordering).
    4. Compiling procedures - call stack, activation records, calling sequence.
    5. Linking and loading.
  3. Streams and delayed evaluation (Chapter 11 Sec. 1-3, 5, 6 of the text and Chapter 3 Sec. 1 and 4 of SICP), and Lecture 4a).
    1. stream processing with map, filter, reduction, etc.
    2. delay and force
    3. thunks and implementing delay and force
    4. Modifications to the scheme interpreter to support delayed evaluation
  4. Lambda Calculus (11 Sec. 8 of the text and Lecture 7b).
    1. Substitution model of computation (abstraction and application)
    2. free and bound variables
    3. alpha conversion and beta reduction and Church-Rosser
    4. universality of lambda calculus (arithmetic, boolean logic, conditionals, lists, and recursion).
  5. Logic programming and prolog (chapter 12 sec. 1-5, chapter 13 sec. 1-2) Lecture 8a and
    1. Horn clauses
    2. Resolution and unification
    3. Prolog syntax and evaluation
    4. Prolog's search strategy (depth-first search and backtracking)
    5. Search order makes a difference - why?
    6. controling search with cut!
    7. Operational semantics of mini language using reduction rules and prolog [only for non-graduating students]
  6. Simple query language (Chapter 4 Sec. 4 of SICP, and Lecture 8b and Lecture 4)
    1. implementation of the query language (streams of frames)
    2. pattern matching and unification

What you should be able to do

  1. Compile a mini language (possibly extended) statements and expressions to RAL.
  2. Build and use activation records for compiling procedures
  3. Write a recursive scheme function and use and manipulate lists, including recursive data structures.
  4. Write and use higher-order scheme functions.
  5. Understand how to use and implement streams.
  6. Understand how to implement classes, objects, and inheritance.
  7. Write simple prolog rules to specify computation
  8. Reduce a horn clause using resolution and unification
  9. Trace through prolog evaluation (resolution, unification, and search with backtracking)
  10. Understand the consequences of cut on prolog search
  11. Use and extend or modify the simple query language
  12. Understand, extend, or modify the implementatio of the simple query language
  13. Implement the operational semantics with reduction rules, using prolog, of the mini language

Review Session

I will also be available during my normal office hours R 4-6 and T 7-9 online to answer questions on the above material. Additionally, I will respond to questions by email and the discussion group.