ICD6 - Intermediate Code Generations Flashcards

1
Q

One approach to speeding up an interpreter is to translate pieces of the code being interpreted directly into machine code during program execution, this is called ANSWER.

A

just-in-time compilation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The technical term for the compiler design methodology where the translation closely follows the syntax of the language is ANSWER.

A

syntax-directed translation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Using the straightfoward expression translation scheme in the ICD 2nd edition textbook, if I were to TransExp(‘3 * x + 1’, vtable, ftable), newvar() will be invoked ANSWER times.

A

5

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Using the straightfoward statement translation scheme in the ICD textbook, if I were to TransStat(‘if true then z := 1 else z := 2’, vtable, ftable), newlabel() will be invoked ANSWER times.

A

3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Using the straightfoward statement translation scheme in the ICD textbook, if I were to TransStat(‘while true do z := 1 + z’, vtable, ftable), newlabel() will be invoked ANSWER times.

A

3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Using the straightfoward statement translation scheme in the ICD textbook, if I were to TransStat(‘while z < 3 do z := 1 + z’, vtable, ftable), newvar() will be invoked ANSWER times.

A

5

How well did you know this?
1
Not at all
2
3
4
5
Perfectly