Exam
It will cover chapters 1-5, 6.1.1, 11 & 12, and values, types, and type equivalence.
- Once you start the exam, a timer will begin for 60 minutes and your work will automatically be submitted when the timer ends. That timer continues regardless of whether you have the tab open.
- The exam will be posted on Moodle. Do not take the exam in Teams. Use a web browser and open Moodle from there.
- You can start the exam any time beginning Friday 9/25 at 8am, but it is due by 11:59pm Friday 9/25. We will not meet for class that day so that you have time to take the exam.
- I will be available on Teams during our normal class time in the event of questions. I will not be available outside of our regular class time.
I suggest you do the following BEFORE you start:
- plug in your laptop charger so you don’t lose battery
- check that your internet is working
- ensure you have 60 minutes of uninterrupted time
- Your score will be taken out of 100 points.
- It is open book and open notes, but you will not have time to consult your book/notes for all questions, so please study accordingly.
- It must be completed individually.
Here are a few example questions:
- Describe the language paradigms.
- Give examples of abstraction in programming languages. In each case, what is being abstracted?
- Explain the difference between compilers and interpreters.
- Describe three methods used to formally define the semantics of a language.
- Describe the elements of a context free grammar.
- How are regular grammars and context free grammars different?
- Convert between a given regular grammar, a regular expression, and a finite state machine.
- How are regular grammars used in the specification of a programming language?
- How does the tokenizer distinguish between identifiers and keywords?
- Why do we need a CFG instead of an RG to describe language syntax?
- Is it important that the grammar produce unique syntax trees for each input combination. Why?
- Identify and describe each phase of a translator. Indicate what each phase produces.
- What is a token? What is a lexeme? How are they related?
- Given a grammar, be able to produce a leftmost/rightmost derivation and produce a parse tree.
- Given a grammar, be able to determine the precedence of the operators in the rules.
- Given a set of declarations, be able to state which are type equivalent under structural equivalence, name equivalence, and declaration euivalence.
- Why is left-recursion a problem for recursive-descent parsers? Give an example.
- What are the requirements of an LL(1) grammar? What does LL(1) mean?