Generation of intermediate code based on an abstract machine model is useful…
2020
Generation of intermediate code based on an abstract machine model is useful in compilers because:
- A.
It makes implementation of lexical and syntax analysis easier
- B.
It is difficult to generate executable code from high level language program.
- C.
Syntax translations are easier for intermediate code generation
- D.
It enhances the portability of the compiler system program
Attempted by 74 students.
Show answer & explanation
Correct answer: D
Intermediate Code Generation (ICG) acts as a machine-independent bridge between the front-end (source language) and back-end (target architecture) of a compiler. By targeting a standard abstract machine model, the front-end remains unchanged when porting the compiler to a new architecture. Only a new back-end needs to be written, significantly increasing compiler portability.
Correct Answer: It enhances the portability of the compiler system program (Option D).