Final Exam Preparation

The following are questions you should be able to answer, and the study of which
should be sufficient to succeed in the final exam. These questions are compiled from
previous reading, quizzes, and labs. These items are in no particular order.

Study Guide

What are closures? How are they implemented?

How do functions and closures relate? Are functions closures? Are closures functions?

What is the “top-level” of a program?

What is capture-free substitution? Why is it necessary?

What is let? How is it defined?

What is a box? What is it used for?

Why does adding sequencing require the interpreter to take and return the environment?

What is the “store,” and why is it needed? How does adding the store change the environment?

How does adding state change the semantics of existing operations, like addition and multiplication?

What is the difference between identifiers and variables?

What are “call by value” and “call by reference?” What is the difference between them?

What is a recursive data structure?

What is a cyclic data structure?

What does it mean for a computation to diverge?

Why does creating a cyclic datum require a box?

Why can’t you write recursive functions without boxing?

What is the relationship between functions and objects?

Why objects require mutation and recursion to implement?

What are the design axes for names of objects?

What is the difference between classes and prototypes?

Why is multiple inheritance considered a bad idea?

What is the difference between replacing and refining when considering inheritance?

What are mixins? How do they differ from inheritance?

How do mixins differ from traits?

What does it mean for memory management to be complete and sound?

What is fragmentation?

What is a free-list?

What does it mean to trade space for time?

What is padding?

What is reference counting?

What happens if a reference counting mechanism does not track and break references cycles?

What is a root set?

What does it mean for a variable to live?

What is the difference between truth and provability computationally?

What do completeness and soundness mean in the context of garbage collection?

Why is sound, efficient garbage collection so difficult in C and C++?

What is conservative garbage collection?

What is “representation”?

What happens when a language’s features are mapped directly to equivalent host language features?

What are the pros and cons of using existing host language features to represent your language features?

What are two ways the book gives to represent closures?

What are two ways the book gives to represent the environment?

What is a macro?

What is macro expansion?

What is the type of a macro? (Put another way, a macro is a function from what to what?)

What is #' in a Racket program?

What are guards, and why are they useful?

Why should you not copy code?

What is macro hygiene, and why is it good?

What are continuations?

What is continuation-passing style?

What is the difference between static and dynamic continuations?

What is a generator?

What is the relationship between continuations and the program stack?

What are tail calls?

How do continuations relate to exceptions?

What are cooperative and preemptive multitasking?

What is static type checking?

What is the type environment?

Does introducing types change the semantics of a language?

What is strong normalization?

How do desugaring/macros work with type checking?

What does it mean for a type to be invariant across mutation?

What is a type system?

What does it mean for a type system to be sound?

What are progress and preservation?

What are type variables?

What is parametric polymorphism?

What is predicative polymorphism?

What is impredicative polymorphism?

What is relational parametricity?

What is type inference?

What is constraint generation and what is it for?

What is unification?

What does it mean for a program’s types to be under-constrained and over-constrained?

What are the principal types of an expression?

What is let-polymorphism?

What are tagged union types?

What are untagged union types?

What is soft typing?

What does it mean for a type system to be nominal?

What does it mean for a type system to be structural?

What are intersection types?

Why do recursive type signatures require a special constructor?

What is subtyping?

What is width subtyping?

What is depth subtyping?

What are higher-order functions?

What is partial application?

What is currying?

What is a lexer?

What is a parser?

What is an interpreter?

What is ahead of time compilation?

What is just in time compilation?

What is syntax?

What are semantics?

What is desugaring?

What is pattern matching? Is it based on name or position?

What is an “unbound” term?

What is a “bound” term?

What is substitution?

What are static and dynamic scope?

What are deep and shallow binding?

What is the environment?

Can a variable be both bound and free in the same program?

What are typeclasses?

What is a functor?

What is an applicative?

What is a monad?

What are lifetimes?

What is concurrency?

What is parallelism?

What is a data race?

What is livelock?

What is deadlock?

What is starvation?

What is a race condition?

What are processes?

What are threads?

What is a mutex?

What is safety? (be able to provide multiple examples of something that is unsafe)