5 Written questions
5 Matching questions
- finite automaton
- synthesized translation
- a in a hash table, a case in which a symbol has the same hash function value as another symbol.
- b lexical analyzer.
- c an abstract computer consisting of an alphabet of symbols, a finite set of states, a starting state, a subset of accepting states, and transition rules that specify transitions from one state to another depending on the input symbol. The machine begins in the starting state; for each input symbol, it makes a transition as specified by the transition rules. If the automaton is in an accepting state at the end of the input, the input is recognized. Also, finite state machine. Abbreviated FA.
- d a kind of parser, due to Cocke, Kasami, and Younger, that efficiently produces all possible parses of an input. Also written CYK.
- e a method of translating statements, e.g. in a programming language, such that the translation of a phrase is built up from the translations of its components.
5 Multiple choice questions
- a scalar type consisting of a finite set of enumerated values, e.g. type boolean = (false, true);.
- a formalism for describing parsers, especially for natural language. Similar to a finite automaton, but augmented in that arbitrary tests may be attached to transition arcs, subgrammars may be called recursively, and structure-building actions may be executed as an arc is traversed.
- an order of visiting trees, in which a node is examined first, followed by recursive examination of its children, in left-to-right order, in the same fashion.
- a data structure that shows how a statement in a language is derived from the context-free grammar of the language; it may be annotated with additional information, e.g. for compilation purposes.
- the hierarchy of formal language types: regular ⊂ context free ⊂ context sensitive ⊂ recursively enumerable; each is a proper subset of the next class.
5 True/False questions
optimization → transformation of a program to produce a program whose input-output behavior is equivalent to that of the original program, but that has lower cost, e.g. faster execution time.
reduction step → in shift-reduce parsing, the reduction of items at the top of the stack to a phrase that encompasses those items.
regular grammar → a grammar that denotes a regular language; its productions can only have on the right-hand side either a terminal string or a terminal string followed by a single nonterminal.
recursive descent → a program or abstract device that can read a string of symbols and decide whether the string is a member of a particular language.
shift-reduce conflict → in shift-reduce parsing, the reduction of items at the top of the stack to a phrase that encompasses those items.