Deck 11: Compilers and Language Translation

ملء الشاشة (f)
exit full mode
سؤال
High-level languages must be translated into hybrid language before they can be executed. _________________________
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Performing local optimization is much more difficult than performing global optimization.
سؤال
____________________ for high-level languages like C++ or Java are very large.
سؤال
One of the possible local ____________________ is eliminating unnecessary operations.
سؤال
The goal symbol is the final nonterminal.
سؤال
The output of a parser is a(n) complete ____________________, or an error message if one cannot be constructed.
سؤال
A BNF rule is also known as a production.
سؤال
Parsing is the first phase of the compilation process. _________________________
سؤال
A high-level language statement is translated into a single machine language instruction.
سؤال
The English-language sentence, "The orange artichoke flew through the elephant" is semantically meaningful. _________________________
سؤال
The singular goal of compilers is correctness.
سؤال
The input to a scanner is the machine language statement from the source program.
سؤال
A grammar that allows the construction of two or more distinct parse trees for the same statement is called a recursive grammar.
سؤال
The righthand side of a BNF rule is the name of a single grammatical category.
سؤال
Building two parse trees implies that the parser has demonstrated correctness in two different ways. _________________________
سؤال
Online debuggers help programmers locate and correct errors in programs.
سؤال
The output of a(n) ____________________ is a list of all the tokens contained in a high-level language statement, as well as the classification number of each token found.
سؤال
If a parser can convert the sequence of input tokens into the goal symbol, then that sequence of tokens is a syntactically ____________________ statement of the language.
سؤال
In BNF, the syntax of a language is specified as a series of grammars. _________________________
سؤال
The code a compiler produces should be reasonably efficient and concise.
سؤال
A(n) ____ is a compiler embedded with a collection of supporting software.

A) debugger
B) reusable code library
C) visual development library
D) integrated development environment
سؤال
A ____ shows how individual tokens can be grouped into predefined grammatical categories until the desired goal is reached.

A) parse tree
B) scanner
C) parser
D) compiler
سؤال
A high-level language program is called a(n) ____ program.

A) object
B) source
C) lexical
D) token
سؤال
____ is where the compiler polishes and fine-tunes the translation so that it runs a little faster or occupies a little less memory.

A) Compilation
B) Generation
C) Optimization
D) Efficiency
سؤال
In the ____ phase, the compiler takes the generated code and sees whether it can be made more efficient, either by making it run faster or having it occupy less memory.

A) code optimization
B) parsing
C) lexical analysis
D) semantic analysis and code generation
سؤال
____ is the replacement of slow arithmetic operations with faster ones.

A) Strength reduction
B) Constant evaluation
C) Eliminating unnecessary operations
D) Parse tree construction
سؤال
____ begins at the productions in the tree that are nearest to the original input tokens.

A) Code generation
B) Parsing
C) Lexical analysis
D) Semantic analysis
سؤال
Following ____, the compiler makes a second pass over the parse tree to produce the translated code.

A) semantic analysis
B) lexical analysis
C) code optimization
D) code generation
سؤال
The Greek character lambda represents ___.

A) zero
B) the null string
C) the defined string
D) the unknown string
سؤال
____ is the ability to write highly optimized programs that contain no wasted time or unnecessary memory cells.

A) Conciseness
B) Ambiguity
C) Code-aware
D) Efficiency
سؤال
In ____ optimization, the compiler looks at large segments of the program to decide how to improve performance.

A) local
B) global
C) semantic
D) syntactical
سؤال
In BNF, a ____ is an intermediate grammatical category used to help explain and organize the language.

A) production
B) rule
C) terminal
D) nonterminal
سؤال
During the ____ phase, the sequence of tokens formed by the scanner is checked to see whether it is syntactically correct according to the rules of the programming language.

A) lexical analysis
B) parsing
C) code optimization
D) semantic analysis and code generation
سؤال
In the ____ phase, the compiler examines the individual characters in the source program and groups them into tokens.

A) semantic analysis and code generation
B) parsing
C) lexical analysis
D) code optimization
سؤال
During parsing, a compiler deals only with the ____ of a statement.

A) semantics
B) syntax
C) grammar
D) rules
سؤال
A ____ is a data structure that stores information about a nonterminal, such as the actual name of the object and its data type.

A) rule
B) production
C) parse tree
D) semantic record
سؤال
In BNF, the ____ is used to separate two alternative definitions of a nonterminal.

A) forward slash
B) vertical bar
C) backward slash
D) asterisk
سؤال
____ parsing algorithms examine several tokens "down the road" to see what would happen if a certain choice was made.

A) Look-ahead
B) Token prediction
C) Down-the-road
D) Recursive
سؤال
The collection of all statements that can be successfully parsed is called the ____ defined by a grammar.

A) language
B) terminal
C) nonterminal
D) rule
سؤال
A(n) ____ definition defines a nonterminal symbol in terms of itself.

A) ambiguous
B) recursive
C) local
D) global
سؤال
If a parser is analyzing a statement in a language and it sees exactly the same sequence of objects that appears on the right-hand side of a BNF rule, what is it allowed to do?
سؤال
Explain what metasymbols are and discuss their use as part of BNF rules.
سؤال
What are the four phases of compilation?
سؤال
Explain what the goal in compiler design today is.
سؤال
List three possible local optimizations.
سؤال
What does this BNF rule say?
::= +
سؤال
Explain what the goal symbol is, and explain what its significance is.
سؤال
Regardless of which programming language is being analyzed, every scanner performs virtually the same set of operations. What are they?
سؤال
Present what each individual BNF rule looks like, and briefly explain its components.
سؤال
What is the fundamental rule of parsing?
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 11: Compilers and Language Translation
1
High-level languages must be translated into hybrid language before they can be executed. _________________________
False
machine
2
Performing local optimization is much more difficult than performing global optimization.
False
3
____________________ for high-level languages like C++ or Java are very large.
Grammars
4
One of the possible local ____________________ is eliminating unnecessary operations.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
The goal symbol is the final nonterminal.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
The output of a parser is a(n) complete ____________________, or an error message if one cannot be constructed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
A BNF rule is also known as a production.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
Parsing is the first phase of the compilation process. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
A high-level language statement is translated into a single machine language instruction.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
The English-language sentence, "The orange artichoke flew through the elephant" is semantically meaningful. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
The singular goal of compilers is correctness.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
The input to a scanner is the machine language statement from the source program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
A grammar that allows the construction of two or more distinct parse trees for the same statement is called a recursive grammar.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
The righthand side of a BNF rule is the name of a single grammatical category.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
Building two parse trees implies that the parser has demonstrated correctness in two different ways. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
Online debuggers help programmers locate and correct errors in programs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
The output of a(n) ____________________ is a list of all the tokens contained in a high-level language statement, as well as the classification number of each token found.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
If a parser can convert the sequence of input tokens into the goal symbol, then that sequence of tokens is a syntactically ____________________ statement of the language.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
In BNF, the syntax of a language is specified as a series of grammars. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
The code a compiler produces should be reasonably efficient and concise.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
A(n) ____ is a compiler embedded with a collection of supporting software.

A) debugger
B) reusable code library
C) visual development library
D) integrated development environment
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
A ____ shows how individual tokens can be grouped into predefined grammatical categories until the desired goal is reached.

A) parse tree
B) scanner
C) parser
D) compiler
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
A high-level language program is called a(n) ____ program.

A) object
B) source
C) lexical
D) token
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
____ is where the compiler polishes and fine-tunes the translation so that it runs a little faster or occupies a little less memory.

A) Compilation
B) Generation
C) Optimization
D) Efficiency
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
In the ____ phase, the compiler takes the generated code and sees whether it can be made more efficient, either by making it run faster or having it occupy less memory.

A) code optimization
B) parsing
C) lexical analysis
D) semantic analysis and code generation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
____ is the replacement of slow arithmetic operations with faster ones.

A) Strength reduction
B) Constant evaluation
C) Eliminating unnecessary operations
D) Parse tree construction
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
____ begins at the productions in the tree that are nearest to the original input tokens.

A) Code generation
B) Parsing
C) Lexical analysis
D) Semantic analysis
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
Following ____, the compiler makes a second pass over the parse tree to produce the translated code.

A) semantic analysis
B) lexical analysis
C) code optimization
D) code generation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
The Greek character lambda represents ___.

A) zero
B) the null string
C) the defined string
D) the unknown string
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
____ is the ability to write highly optimized programs that contain no wasted time or unnecessary memory cells.

A) Conciseness
B) Ambiguity
C) Code-aware
D) Efficiency
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
In ____ optimization, the compiler looks at large segments of the program to decide how to improve performance.

A) local
B) global
C) semantic
D) syntactical
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
In BNF, a ____ is an intermediate grammatical category used to help explain and organize the language.

A) production
B) rule
C) terminal
D) nonterminal
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
During the ____ phase, the sequence of tokens formed by the scanner is checked to see whether it is syntactically correct according to the rules of the programming language.

A) lexical analysis
B) parsing
C) code optimization
D) semantic analysis and code generation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
In the ____ phase, the compiler examines the individual characters in the source program and groups them into tokens.

A) semantic analysis and code generation
B) parsing
C) lexical analysis
D) code optimization
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
During parsing, a compiler deals only with the ____ of a statement.

A) semantics
B) syntax
C) grammar
D) rules
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
A ____ is a data structure that stores information about a nonterminal, such as the actual name of the object and its data type.

A) rule
B) production
C) parse tree
D) semantic record
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
In BNF, the ____ is used to separate two alternative definitions of a nonterminal.

A) forward slash
B) vertical bar
C) backward slash
D) asterisk
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
____ parsing algorithms examine several tokens "down the road" to see what would happen if a certain choice was made.

A) Look-ahead
B) Token prediction
C) Down-the-road
D) Recursive
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
The collection of all statements that can be successfully parsed is called the ____ defined by a grammar.

A) language
B) terminal
C) nonterminal
D) rule
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
A(n) ____ definition defines a nonterminal symbol in terms of itself.

A) ambiguous
B) recursive
C) local
D) global
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
If a parser is analyzing a statement in a language and it sees exactly the same sequence of objects that appears on the right-hand side of a BNF rule, what is it allowed to do?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
Explain what metasymbols are and discuss their use as part of BNF rules.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
What are the four phases of compilation?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
Explain what the goal in compiler design today is.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
List three possible local optimizations.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
What does this BNF rule say?
::= +
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
Explain what the goal symbol is, and explain what its significance is.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
Regardless of which programming language is being analyzed, every scanner performs virtually the same set of operations. What are they?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
Present what each individual BNF rule looks like, and briefly explain its components.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
What is the fundamental rule of parsing?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.