Midterm Exam Studyguide
CS 550 Programming Languages
Sections 501 and 900 (online)
Instructor: Jeremy Johnson
Format: online take home exam to be completed in 3 hours.
Midterm exam date: anytime between April 29 and May 6.
Topics
- Grammars and Parsing
(Lecture 1)
- Mini Language and Interpreter
(Lecture 2)
- Dynamic Memory Allocation and Garbage Collection
(Lecture 3)
- Functional programming and scheme (Chapter 11 Sec. 1-3 of the text
and Lecture 4).
- evaluating S-expressions and the substitution model of evaluation.
normal vs. applicative order.
- recursive functions in scheme
- data structures and list processing in scheme
- higher order functions (functions that are passed or return
functions). E.G. map, filter, reduce, currying.
- Environments and the scheme interpreter (Chapters 5, 11 of the text,
Chapter 4 Sec. 1-2 of SICP).
and Lecture 4).
- why assignment can not be modeled with substitution
- environments - use and implementation
- scheme interpreter from SICP
- static vs. dynamic scope
What you should be able to do
- Demonstrate how dynamic memory and garbage collection works.
- Write a simple recursive descent parser
- Be able to use bison/flex to create a parser
- Use attribute grammars (and attributes in bison/flex) to
build a data structure associated with parsing (e.g. abstract syntax
tree, list, parse tree, etc.)
- Understand and extend the mini-language parser and interpreter
(including the
version that supports functions).
- Write a recursive scheme function and use and manipulate lists,
including recursive data structures (e.g. trees).
- Write and use higher-order scheme functions
- Use substitution model of function application and lambda calculus.
- Use environment model of function application
- Trace through the execution of the scheme interpreter
- Understand the difference between static and dynamic scope and
normal and applicative order.
Review Session
A review for the exam will be held during virtual office hours on Tue. April 28 from 7-9.
Format
Students will have three hours to take the exam once it is
started. The exam is open book and open notes including online links
from the lecture notes and assignment solutions. The exam must be
taken in the window which it is available. The exam must be done alone
using only the explicitly mentioned resources. I trust everyone to
follow these instructions and failure to do so will result in explusion
from the class.
There will be five questions (with multiple parts):
1) grammars, ambiguity, attribute grammars, and parsing
2) functional programming and scheme,
3) scheme interpreter,
4) mini language and the mini language interpreter
along with extensions discussed and in the assignments.
5) one question building on the material presented and the assignments
that students have done.