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
- Implementation of Object Orientation as discussed in
(Lecture 5) and Chapter 10 of the
text.
- Mini Language Compiler (Lecture 6)
- RAM architecture
- Memory layout, symbol table and compiling expressions, conditionals, and loops.
- Optimizations (peephole, constant folding, common subexpression elimination, code reordering).
- Compiling procedures - call stack, activation records, calling sequence.
- Linking and loading.
- 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).
- stream processing with map, filter, reduction, etc.
- delay and force
- thunks and implementing delay and force
- Modifications to the scheme interpreter to support delayed evaluation
- Lambda Calculus (11 Sec. 8 of the text
and Lecture 7b).
- Substitution model of computation (abstraction and application)
- free and bound variables
- alpha conversion and beta reduction and Church-Rosser
- universality of lambda calculus (arithmetic, boolean logic,
conditionals, lists, and recursion).
- Logic programming and prolog (chapter 12 sec. 1-5, chapter 13 sec. 1-2)
Lecture 8a and
- Horn clauses
- Resolution and unification
- Prolog syntax and evaluation
- Prolog's search strategy (depth-first search and backtracking)
- Search order makes a difference - why?
- controling search with cut!
- Operational semantics of mini language using reduction rules and prolog [only for non-graduating students]
- Simple query language (Chapter 4 Sec. 4 of SICP, and
Lecture 8b and
Lecture 4)
- implementation of the query language (streams of frames)
- pattern matching and unification
What you should be able to do
- Compile a mini language (possibly extended) statements and expressions to RAL.
- Build and use activation records for compiling procedures
- Write a recursive scheme function and use and manipulate lists,
including recursive data structures.
- Write and use higher-order scheme functions.
- Understand how to use and implement streams.
- Understand how to implement classes, objects, and inheritance.
- Write simple prolog rules to specify computation
- Reduce a horn clause using resolution and unification
- Trace through prolog evaluation (resolution, unification, and
search with backtracking)
- Understand the consequences of cut on prolog search
- Use and extend or modify the simple query language
- Understand, extend, or modify the implementatio of the simple query
language
- 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.