Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

COCHIN COLLEGE OF ENGINEERING AND

TECHNOLOGY, VALANCHERY
CLASS TEST
MCS10 104 : Compiler Design
Time: 2 Hours

Maximum: 50 Marks
PART A
Answer all questions

1) Explain the structure of compiler .

(5)

-Software systems
-Translate programs
-Series of phases
-Four phases
1. Lexical Analysis
2.

Syntactic Analysis or parsing

3.

Semantic Checking

4.

Code generation

-Symbol table
-Operating system interface
-One pass compiler
-Two pass compiler

2) Briefly explain importance of code optimization

(5)

-One pass compiler- Less efficient code


-Optimization
-Optimization techniques-Loops-global register allocation-instruction scheduling
-Examples of optimization and difference in performance of programs
-Design principle

3) Explain the syntax of ICAN expressions and ICAN constants of generic simple
types.
(10)
-

4) Explain the two high level structures for an optimization compiler


-Two main models
1. Low level model
2. Mixed model

(10)

5) Explain the structure of optimizing compiler


-Two main models
1. Low level model
2. Mixed model

-Examples-SPARC-Alpha-MIPS, POWER-PowerPC-PA-RISC
-Advantages and disadvantages of two models
-Preprocessor
-Data-cache optimization-YIL-XIL

(10)

6) Explain syntax of ICAN type definitions and ICAN declarations

(10)

You might also like