recategorized by
20,300 views
47 votes
47 votes

Generation of intermediate code based on an abstract machine model is useful in compilers because

  1. it makes implementation of lexical analysis and syntax analysis easier

  2. syntax-directed translations can be written for intermediate code generation

  3. it enhances the portability of the front end of the compiler

  4. it is not possible to generate code for real machines directly from high level language programs

recategorized by

2 Answers

Best answer
49 votes
49 votes
C. stating the actual use of the Intermediate Code.

Also optimizations can be done on intermediate code enhancing the portability of the optimizer.
selected by
0 votes
0 votes
Answer- C  ( it enhances the portability of the front end of the compiler )
Using an abstract machine model for intermediate code generation enables the front end of the compiler to be more portable across different hardware platforms, as it can produce intermediate code that can later be translated into machine code for various target architectures.

When compilers generate intermediate code based on an abstract machine model, they create a representation of the program's logic that is independent of the target hardware architecture. This means that the intermediate code is designed to work on a hypothetical machine, abstracting away specific hardware details.

This abstraction enhances the portability of the compiler's front end because it allows the front end to focus on translating high-level language constructs into the intermediate code without worrying about the intricacies of different hardware platforms. Once the front end generates the intermediate code, the back end of the compiler can then translate this intermediate code into machine code tailored to the specific target architecture.
Answer:

Related questions

4.8k
views
3 answers
17 votes
Kathleen asked Oct 5, 2014
4,773 views
Find the inverse of the matrix $\begin{bmatrix} 1 & 0 & 1 \\ -1 & 1 & 1 \\ 0 & 1 & 0 \end{bmatrix}$
18.6k
views
7 answers
21 votes
Kathleen asked Oct 4, 2014
18,644 views
Algorithm design technique used in quicksort algorithm is?Dynamic programmingBacktrackingDivide and conquerGreedy method
7.7k
views
3 answers
19 votes
Kathleen asked Oct 4, 2014
7,688 views
Which of the following conversions is not possible (algorithmically)?Regular grammar to context free grammarNon-deterministic FSA to deterministic FSANon-deterministic PD...
11.6k
views
2 answers
33 votes
Kathleen asked Oct 4, 2014
11,634 views
A memory page containing a heavily used variable that was initialized very early and is in constant use is removed thenLRU page replacement algorithm is usedFIFO page rep...