CS 3040 Final Exam Review
Fall, 2022
Review Questions
- Be sure to review the reviews for Exam
1 and Exam 2
- Note 10 on ANTLR: know the elements of an ANTLR specification, be
able to predict the result of an ANTLR spec on a file, be able to add
short actions to ANTLR productions.
- Note 11 on Semantics:
- Explain ad-hoc vs. operational semantics, be able to distinguish
between the two and explain the advantages of each
- Be able to explain/interpret inference rules (including axioms) and
proof trees.
- Note 12 on Types:
- Be able to discuss various types of types: primitive types, ordinal
types
- Be able to compute the address of an element in a two-dimensional C
array.
- Explain union types and distinguish between Haskel and C union types.
Know the uses and issues of both.
- Note 13 on scope and lifetime: define both terms, discuss dynamic
vs. static scoping, explain why dynamic scoping isn't needed in an OO
language.
- Note 14 on Memory Management:
- Be able to discuss dangling pointers and memory leaks, especially
how to create both. Also, be able to explain why pointers are useful
even though they have these other problems.
- Reference counting and issues.
- Mark-and-sweep collection, its issues, and how some of those issues
are fixed using generational collection.
- Note 15 on Compilation:
- Be able to list the different phases of a compiler (as presented in
the notes) and to give a high-level view of what each phase does.
- Note 17 on Overview:
- Different ways to classify programming languages, the advantages
and disadvantages of each (including keywords involved in each).
Like the midterms, expect a mix of MC (including other select-the-box
question types), fill-in-the-blank, and short essay.
On essay questions (which usually expect you to write 2-4 sentences), I
do not grade for grammar, but when answers are too vague and have a lot of
grammatical mistakes then it can be very difficult for me to determine
what you were saying. It can be a good idea to write complete sentences to
keep that from happening. It is also good to use key terminology from the
class such as "verification" and "quality assurance". A common mistake is
to just repeat the words of the question in your answer; that's fine, but
be sure you provide additional information to show me what you have learned.