Header Ads Widget

Responsive Advertisement

CS606 GDB No.1 Spring 2020 _CS606 - Compiler Construction

GDB Statement
During the past few years the high level languages are widely used.  Computers do not understand the high level languages which are easily understandable by the humans. Thus there is a need of a software layer that translate high level executions written in a high level programming language to be compiled and implemented by the underlying computer architecture hardware. This software layer is called compilers that translate high level languages to machine readable code.  Mostly compilers are designed by keeping in mind the language specifications which will be executed by that compiler. Do you think while designing the efficient compilers there is a need to consider the underlying computer architecture as well?

Answer yes or no to agree or disagree with the statement? Briefly explain your answer.

Note:- Keep your comments to 100 words only and to the point, GDB will not be accepted via email in any case.

Answer:

Yes,

A compiler is a software layer that helps the high level executions that are in a programming language to be compiled by the underlying hardware computer architecture. The interaction of the compiler and the high level language majorly depends on what instruction set architecture it works on. To have an understanding of how the variables are allocated and addressed and the number of registers used for it can be obtained on looking into the ways how high level language allocate their data. Generally the major factor affecting the compiler optimization is the machine on which the code is to be executed. An effective compiler allows a more efficient execution of programs for a given computer architecture.

OR

Yes, there is a need to consider the underlying computer architecture as well. A compiler is a software layer that helps the high level executions that are made in a programming language to be compiled and implemented by the underlying hardware computer architecture. Though a compiler is majorly designed based on the language specification, the hardware that it is going to implement on has a significant role in the compiler design. The factors in which the compiler and the computer architecture have to agree on are: regularity, orthogonality and compensability. Any issue with these factors result in a tougher task for the compiler designer as the more perfect the compilation is and less efficient it happens to result; as it would require extensive implementations in the computer architecture. In case of platform independent languages, the task is more demanding as it has to comply with the different sets of hardware, allows the programmer to utilize the full potential of the computer architecture and at the same time make the compilation part efficient. So, making an efficient compiler involves the collaborative work of both a compiler designer and the hardware architects who built the computer architecture.

Post a Comment

0 Comments