How To Exam?

a knowledge trading engine...


Annamalai University 2009-6th Sem B.Tech Computer Science and Engineering B.E/ CS1352-PRINCIPLES OF COMPILER DESIGN - Question Paper

Thursday, 14 March 2013 10:10Web

CS1352-PRINCIPLES OF COMPILER DESIGN
(Regulation 2004)

Time:Three hours Maximum:100 marks

ans All ques.

Part A --(10*2=20 marks)

1. elaborate the problems to be considered in the design of lexical analyzer?

2. describe concrete and abstract syntax with example.

3. Derive the string and construct a syntax tree for the input string ceaedbe using
the grammar S->SaA|A,A->AbB|B,B->cSd|e

4. List the factors to be considered for top-down parsing.

5. Why is it necessary to generate intermediate code instead of generating target
program itself?

6. describe back patching.

7. List the problems in code generation.

8. Write the steps for constructing leaders in basic blocks.

9. elaborate the problems in static allocation?

10. What is meant by copy-restor?



PART B--(5*16=80)


11. (a) (i) discuss the need for dividing the compilation process into different phases
and discuss its functions. (

(ii) discuss how abstract stack machine can be used as translators. (

(or)
(b) What is syntax directed translation? How it is used for translation of expresions?
(16)

12. (a) provided the subsequent grammar S->AS|b,A->SA|a Construct a SLR parsing table for
the string baab (16)

(or)

(b) Consider the grammar E->E+T,T->T*F,F->(E)\id.Using predictive parsing the string
id+id*id. (16)

13. (a) discuss in detail how 3 address code are generated and implemented.

(or)
(b) discuss the role of declaration statements in intermediate code generation.

14. (a) Design a simple code generator and discuss with example.

(or)

(b) Write short notes on:

1: Peep hole optimization

2: problems in code generation

15. (a) discuss with an example how basic blocks are optimized.

(or)

(b) discuss the storage allocation strategies used in run time environments.



( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Annamalai University 2009-6th Sem B.Tech Computer Science and Engineering B.E/ CS1352-PRINCIPLES OF COMPILER DESIGN - Question Paper