MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Choose the correct answer
A
The analysis part constructs the target program
B
The synthesis part constructs the target program
C
The synthesis part constructs the assembly code
D
None of these
Explanation: 

Detailed explanation-1: -Analysis and Synthesis are the two parts of compilation. The analysis part breaks up the source program into constituent pieces and creates an intermediate representation of the source program. The synthesis part constructs the desired target program from the intermediate representation.

Detailed explanation-2: -The synthesis part constructs the desired target program from the intermediate representation and the information in the symbol table. The analysis part is often called the front end of the compiler; the synthesis part is the back end.

Detailed explanation-3: -The synthesis phase creates an equivalent target program from the intermediate representation. Symbol Table – It is a data structure being used and maintained by the compiler, consisting of all the identifier’s names along with their types. It helps the compiler to function smoothly by finding the identifiers quickly.

Detailed explanation-4: -Then, the synthesis stage constructs the desired target program from the intermediate representation. Typically, a compiler’s analysis stage is called its front end and the synthesis stage its back end. Each of the stages is broken down into a set of “phases” that handle different parts of the tasks.

There is 1 question to complete.